Skip to content

Commit

Permalink
[Librarian] Regenerated @ 1820de764052a95e2f0570d74a5de0ba04f74f2e
Browse files Browse the repository at this point in the history
  • Loading branch information
twilio-dx committed Feb 17, 2021
1 parent a3ad58a commit b47f742
Show file tree
Hide file tree
Showing 1,388 changed files with 16,695 additions and 16,038 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
twilio-go changelog
====================
[2021-02-17] Version 0.1.1
--------------------------


[2021-02-11] Version 0.1.0
--------------------------

1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ go 1.15
require (
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.6.1
golang.org/x/tools v0.1.0 // indirect
)
26 changes: 26 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.6.1 h1:hDPOHmpOpP40lSULcqw7IrRb/u7w6RpDC9399XyoNd0=
github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4 h1:myAQVi0cGEoqQVR5POX+8RR2mrocKqNN1hmeMqhX27k=
golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
golang.org/x/tools v0.1.0 h1:po9/4sTYwZU9lPhi1tOrb4hCv3qrhiQ77LZfGa2OjwY=
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
2 changes: 1 addition & 1 deletion twilio/rest/accounts/v1/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ 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.8.0
- API version: 0.1.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)
Expand Down
82 changes: 28 additions & 54 deletions twilio/rest/accounts/v1/api_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* This is the public Twilio REST API.
*
* API version: 1.8.0
* API version: 0.1.1
* Contact: [email protected]
* Generated by: OpenAPI Generator (https://openapi-generator.tech)
*/
Expand All @@ -13,9 +13,10 @@ package openapi
import (
"encoding/json"
"fmt"
twilio "github.com/twilio/twilio-go/client"
"net/url"
"strings"

twilio "github.com/twilio/twilio-go/client"
)

type DefaultApiService struct {
Expand All @@ -24,15 +25,16 @@ type DefaultApiService struct {
}

func NewDefaultApiService(client *twilio.Client) *DefaultApiService {
return &DefaultApiService {
client: client,
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"`
AccountSid *string `json:"AccountSid,omitempty"`
Credentials *string `json:"Credentials,omitempty"`
FriendlyName *string `json:"FriendlyName,omitempty"`
}

Expand All @@ -48,21 +50,19 @@ Create a new AWS Credential
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)
data.Set("AccountSid", *params.AccountSid)
}
if params != nil && params.Credentials != nil {
data.Set("Credentials", *params.Credentials)
data.Set("Credentials", *params.Credentials)
}
if params != nil && params.FriendlyName != nil {
data.Set("FriendlyName", *params.FriendlyName)
data.Set("FriendlyName", *params.FriendlyName)
}


resp, err := c.client.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
Expand All @@ -77,11 +77,12 @@ func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParam

return ps, err
}

// CreateCredentialPublicKeyParams Optional parameters for the method 'CreateCredentialPublicKey'
type CreateCredentialPublicKeyParams struct {
AccountSid *string `json:"AccountSid,omitempty"`
AccountSid *string `json:"AccountSid,omitempty"`
FriendlyName *string `json:"FriendlyName,omitempty"`
PublicKey *string `json:"PublicKey,omitempty"`
PublicKey *string `json:"PublicKey,omitempty"`
}

/*
Expand All @@ -96,21 +97,19 @@ Create a new Public Key Credential
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)
data.Set("AccountSid", *params.AccountSid)
}
if params != nil && params.FriendlyName != nil {
data.Set("FriendlyName", *params.FriendlyName)
data.Set("FriendlyName", *params.FriendlyName)
}
if params != nil && params.PublicKey != nil {
data.Set("PublicKey", *params.PublicKey)
data.Set("PublicKey", *params.PublicKey)
}


resp, err := c.client.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
Expand All @@ -134,12 +133,9 @@ Create a new secondary Auth Token
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
Expand All @@ -160,16 +156,13 @@ 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) {
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
Expand All @@ -185,16 +178,13 @@ 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) {
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
Expand All @@ -209,15 +199,12 @@ func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string) (error) {
DeleteSecondaryAuthToken Method for DeleteSecondaryAuthToken
Delete the secondary Auth Token from your account
*/
func (c *DefaultApiService) DeleteSecondaryAuthToken() (error) {
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
Expand All @@ -238,12 +225,9 @@ func (c *DefaultApiService) FetchCredentialAws(Sid string) (*AccountsV1Credentia
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
Expand All @@ -269,12 +253,9 @@ func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1Cre
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
Expand All @@ -289,6 +270,7 @@ func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1Cre

return ps, err
}

// ListCredentialAwsParams Optional parameters for the method 'ListCredentialAws'
type ListCredentialAwsParams struct {
PageSize *int32 `json:"PageSize,omitempty"`
Expand All @@ -304,15 +286,13 @@ Retrieves a collection of AWS Credentials belonging to the account used to make
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))
data.Set("PageSize", fmt.Sprint(*params.PageSize))
}


resp, err := c.client.Get(c.baseURL+path, data, headers)
if err != nil {
return nil, err
Expand All @@ -327,6 +307,7 @@ func (c *DefaultApiService) ListCredentialAws(params *ListCredentialAwsParams) (

return ps, err
}

// ListCredentialPublicKeyParams Optional parameters for the method 'ListCredentialPublicKey'
type ListCredentialPublicKeyParams struct {
PageSize *int32 `json:"PageSize,omitempty"`
Expand All @@ -342,15 +323,13 @@ Retrieves a collection of Public Key Credentials belonging to the account used t
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))
data.Set("PageSize", fmt.Sprint(*params.PageSize))
}


resp, err := c.client.Get(c.baseURL+path, data, headers)
if err != nil {
return nil, err
Expand All @@ -374,12 +353,9 @@ Promote the secondary Auth Token to primary. After promoting the new token, all
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
Expand All @@ -394,6 +370,7 @@ func (c *DefaultApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenProm

return ps, err
}

// UpdateCredentialAwsParams Optional parameters for the method 'UpdateCredentialAws'
type UpdateCredentialAwsParams struct {
FriendlyName *string `json:"FriendlyName,omitempty"`
Expand All @@ -411,15 +388,13 @@ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCreden
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)
data.Set("FriendlyName", *params.FriendlyName)
}


resp, err := c.client.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
Expand All @@ -434,6 +409,7 @@ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCreden

return ps, err
}

// UpdateCredentialPublicKeyParams Optional parameters for the method 'UpdateCredentialPublicKey'
type UpdateCredentialPublicKeyParams struct {
FriendlyName *string `json:"FriendlyName,omitempty"`
Expand All @@ -451,15 +427,13 @@ func (c *DefaultApiService) UpdateCredentialPublicKey(Sid string, params *Update
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)
data.Set("FriendlyName", *params.FriendlyName)
}


resp, err := c.client.Post(c.baseURL+path, data, headers)
if err != nil {
return nil, err
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,22 @@
*
* This is the public Twilio REST API.
*
* API version: 1.8.0
* API version: 0.1.1
* Contact: [email protected]
* 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"`
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"`
Url string `json:"Url,omitempty"`
}
Loading

0 comments on commit b47f742

Please sign in to comment.