33 *
44 * This is the public Twilio REST API.
55 *
6- * API version: 1.8.0
6+ * API version: 0.1.1
7788 * Generated by: OpenAPI Generator (https://openapi-generator.tech)
99 */
@@ -13,9 +13,10 @@ package openapi
1313import (
1414 "encoding/json"
1515 "fmt"
16- twilio "github.com/twilio/twilio-go/client"
1716 "net/url"
1817 "strings"
18+
19+ twilio "github.com/twilio/twilio-go/client"
1920)
2021
2122type DefaultApiService struct {
@@ -24,15 +25,16 @@ type DefaultApiService struct {
2425}
2526
2627func NewDefaultApiService (client * twilio.Client ) * DefaultApiService {
27- return & DefaultApiService {
28- client : client ,
28+ return & DefaultApiService {
29+ client : client ,
2930 baseURL : fmt .Sprintf ("https://accounts.twilio.com" ),
3031 }
3132}
33+
3234// CreateCredentialAwsParams Optional parameters for the method 'CreateCredentialAws'
3335type CreateCredentialAwsParams struct {
34- AccountSid * string `json:"AccountSid,omitempty"`
35- Credentials * string `json:"Credentials,omitempty"`
36+ AccountSid * string `json:"AccountSid,omitempty"`
37+ Credentials * string `json:"Credentials,omitempty"`
3638 FriendlyName * string `json:"FriendlyName,omitempty"`
3739}
3840
@@ -48,21 +50,19 @@ Create a new AWS Credential
4850func (c * DefaultApiService ) CreateCredentialAws (params * CreateCredentialAwsParams ) (* AccountsV1CredentialCredentialAws , error ) {
4951 path := "/v1/Credentials/AWS"
5052
51-
5253 data := url.Values {}
5354 headers := 0
5455
5556 if params != nil && params .AccountSid != nil {
56- data .Set ("AccountSid" , * params .AccountSid )
57+ data .Set ("AccountSid" , * params .AccountSid )
5758 }
5859 if params != nil && params .Credentials != nil {
59- data .Set ("Credentials" , * params .Credentials )
60+ data .Set ("Credentials" , * params .Credentials )
6061 }
6162 if params != nil && params .FriendlyName != nil {
62- data .Set ("FriendlyName" , * params .FriendlyName )
63+ data .Set ("FriendlyName" , * params .FriendlyName )
6364 }
6465
65-
6666 resp , err := c .client .Post (c .baseURL + path , data , headers )
6767 if err != nil {
6868 return nil , err
@@ -77,11 +77,12 @@ func (c *DefaultApiService) CreateCredentialAws(params *CreateCredentialAwsParam
7777
7878 return ps , err
7979}
80+
8081// CreateCredentialPublicKeyParams Optional parameters for the method 'CreateCredentialPublicKey'
8182type CreateCredentialPublicKeyParams struct {
82- AccountSid * string `json:"AccountSid,omitempty"`
83+ AccountSid * string `json:"AccountSid,omitempty"`
8384 FriendlyName * string `json:"FriendlyName,omitempty"`
84- PublicKey * string `json:"PublicKey,omitempty"`
85+ PublicKey * string `json:"PublicKey,omitempty"`
8586}
8687
8788/*
@@ -96,21 +97,19 @@ Create a new Public Key Credential
9697func (c * DefaultApiService ) CreateCredentialPublicKey (params * CreateCredentialPublicKeyParams ) (* AccountsV1CredentialCredentialPublicKey , error ) {
9798 path := "/v1/Credentials/PublicKeys"
9899
99-
100100 data := url.Values {}
101101 headers := 0
102102
103103 if params != nil && params .AccountSid != nil {
104- data .Set ("AccountSid" , * params .AccountSid )
104+ data .Set ("AccountSid" , * params .AccountSid )
105105 }
106106 if params != nil && params .FriendlyName != nil {
107- data .Set ("FriendlyName" , * params .FriendlyName )
107+ data .Set ("FriendlyName" , * params .FriendlyName )
108108 }
109109 if params != nil && params .PublicKey != nil {
110- data .Set ("PublicKey" , * params .PublicKey )
110+ data .Set ("PublicKey" , * params .PublicKey )
111111 }
112112
113-
114113 resp , err := c .client .Post (c .baseURL + path , data , headers )
115114 if err != nil {
116115 return nil , err
@@ -134,12 +133,9 @@ Create a new secondary Auth Token
134133func (c * DefaultApiService ) CreateSecondaryAuthToken () (* AccountsV1SecondaryAuthToken , error ) {
135134 path := "/v1/AuthTokens/Secondary"
136135
137-
138136 data := url.Values {}
139137 headers := 0
140138
141-
142-
143139 resp , err := c .client .Post (c .baseURL + path , data , headers )
144140 if err != nil {
145141 return nil , err
@@ -160,16 +156,13 @@ DeleteCredentialAws Method for DeleteCredentialAws
160156Delete a Credential from your account
161157 * @param Sid The Twilio-provided string that uniquely identifies the AWS resource to delete.
162158*/
163- func (c * DefaultApiService ) DeleteCredentialAws (Sid string ) ( error ) {
159+ func (c * DefaultApiService ) DeleteCredentialAws (Sid string ) error {
164160 path := "/v1/Credentials/AWS/{Sid}"
165161 path = strings .Replace (path , "{" + "Sid" + "}" , Sid , - 1 )
166162
167-
168163 data := url.Values {}
169164 headers := 0
170165
171-
172-
173166 resp , err := c .client .Delete (c .baseURL + path , data , headers )
174167 if err != nil {
175168 return err
@@ -185,16 +178,13 @@ DeleteCredentialPublicKey Method for DeleteCredentialPublicKey
185178Delete a Credential from your account
186179 * @param Sid The Twilio-provided string that uniquely identifies the PublicKey resource to delete.
187180*/
188- func (c * DefaultApiService ) DeleteCredentialPublicKey (Sid string ) ( error ) {
181+ func (c * DefaultApiService ) DeleteCredentialPublicKey (Sid string ) error {
189182 path := "/v1/Credentials/PublicKeys/{Sid}"
190183 path = strings .Replace (path , "{" + "Sid" + "}" , Sid , - 1 )
191184
192-
193185 data := url.Values {}
194186 headers := 0
195187
196-
197-
198188 resp , err := c .client .Delete (c .baseURL + path , data , headers )
199189 if err != nil {
200190 return err
@@ -209,15 +199,12 @@ func (c *DefaultApiService) DeleteCredentialPublicKey(Sid string) (error) {
209199DeleteSecondaryAuthToken Method for DeleteSecondaryAuthToken
210200Delete the secondary Auth Token from your account
211201*/
212- func (c * DefaultApiService ) DeleteSecondaryAuthToken () ( error ) {
202+ func (c * DefaultApiService ) DeleteSecondaryAuthToken () error {
213203 path := "/v1/AuthTokens/Secondary"
214204
215-
216205 data := url.Values {}
217206 headers := 0
218207
219-
220-
221208 resp , err := c .client .Delete (c .baseURL + path , data , headers )
222209 if err != nil {
223210 return err
@@ -238,12 +225,9 @@ func (c *DefaultApiService) FetchCredentialAws(Sid string) (*AccountsV1Credentia
238225 path := "/v1/Credentials/AWS/{Sid}"
239226 path = strings .Replace (path , "{" + "Sid" + "}" , Sid , - 1 )
240227
241-
242228 data := url.Values {}
243229 headers := 0
244230
245-
246-
247231 resp , err := c .client .Get (c .baseURL + path , data , headers )
248232 if err != nil {
249233 return nil , err
@@ -269,12 +253,9 @@ func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1Cre
269253 path := "/v1/Credentials/PublicKeys/{Sid}"
270254 path = strings .Replace (path , "{" + "Sid" + "}" , Sid , - 1 )
271255
272-
273256 data := url.Values {}
274257 headers := 0
275258
276-
277-
278259 resp , err := c .client .Get (c .baseURL + path , data , headers )
279260 if err != nil {
280261 return nil , err
@@ -289,6 +270,7 @@ func (c *DefaultApiService) FetchCredentialPublicKey(Sid string) (*AccountsV1Cre
289270
290271 return ps , err
291272}
273+
292274// ListCredentialAwsParams Optional parameters for the method 'ListCredentialAws'
293275type ListCredentialAwsParams struct {
294276 PageSize * int32 `json:"PageSize,omitempty"`
@@ -304,15 +286,13 @@ Retrieves a collection of AWS Credentials belonging to the account used to make
304286func (c * DefaultApiService ) ListCredentialAws (params * ListCredentialAwsParams ) (* ListCredentialAwsResponse , error ) {
305287 path := "/v1/Credentials/AWS"
306288
307-
308289 data := url.Values {}
309290 headers := 0
310291
311292 if params != nil && params .PageSize != nil {
312- data .Set ("PageSize" , fmt .Sprint (* params .PageSize ))
293+ data .Set ("PageSize" , fmt .Sprint (* params .PageSize ))
313294 }
314295
315-
316296 resp , err := c .client .Get (c .baseURL + path , data , headers )
317297 if err != nil {
318298 return nil , err
@@ -327,6 +307,7 @@ func (c *DefaultApiService) ListCredentialAws(params *ListCredentialAwsParams) (
327307
328308 return ps , err
329309}
310+
330311// ListCredentialPublicKeyParams Optional parameters for the method 'ListCredentialPublicKey'
331312type ListCredentialPublicKeyParams struct {
332313 PageSize * int32 `json:"PageSize,omitempty"`
@@ -342,15 +323,13 @@ Retrieves a collection of Public Key Credentials belonging to the account used t
342323func (c * DefaultApiService ) ListCredentialPublicKey (params * ListCredentialPublicKeyParams ) (* ListCredentialPublicKeyResponse , error ) {
343324 path := "/v1/Credentials/PublicKeys"
344325
345-
346326 data := url.Values {}
347327 headers := 0
348328
349329 if params != nil && params .PageSize != nil {
350- data .Set ("PageSize" , fmt .Sprint (* params .PageSize ))
330+ data .Set ("PageSize" , fmt .Sprint (* params .PageSize ))
351331 }
352332
353-
354333 resp , err := c .client .Get (c .baseURL + path , data , headers )
355334 if err != nil {
356335 return nil , err
@@ -374,12 +353,9 @@ Promote the secondary Auth Token to primary. After promoting the new token, all
374353func (c * DefaultApiService ) UpdateAuthTokenPromotion () (* AccountsV1AuthTokenPromotion , error ) {
375354 path := "/v1/AuthTokens/Promote"
376355
377-
378356 data := url.Values {}
379357 headers := 0
380358
381-
382-
383359 resp , err := c .client .Post (c .baseURL + path , data , headers )
384360 if err != nil {
385361 return nil , err
@@ -394,6 +370,7 @@ func (c *DefaultApiService) UpdateAuthTokenPromotion() (*AccountsV1AuthTokenProm
394370
395371 return ps , err
396372}
373+
397374// UpdateCredentialAwsParams Optional parameters for the method 'UpdateCredentialAws'
398375type UpdateCredentialAwsParams struct {
399376 FriendlyName * string `json:"FriendlyName,omitempty"`
@@ -411,15 +388,13 @@ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCreden
411388 path := "/v1/Credentials/AWS/{Sid}"
412389 path = strings .Replace (path , "{" + "Sid" + "}" , Sid , - 1 )
413390
414-
415391 data := url.Values {}
416392 headers := 0
417393
418394 if params != nil && params .FriendlyName != nil {
419- data .Set ("FriendlyName" , * params .FriendlyName )
395+ data .Set ("FriendlyName" , * params .FriendlyName )
420396 }
421397
422-
423398 resp , err := c .client .Post (c .baseURL + path , data , headers )
424399 if err != nil {
425400 return nil , err
@@ -434,6 +409,7 @@ func (c *DefaultApiService) UpdateCredentialAws(Sid string, params *UpdateCreden
434409
435410 return ps , err
436411}
412+
437413// UpdateCredentialPublicKeyParams Optional parameters for the method 'UpdateCredentialPublicKey'
438414type UpdateCredentialPublicKeyParams struct {
439415 FriendlyName * string `json:"FriendlyName,omitempty"`
@@ -451,15 +427,13 @@ func (c *DefaultApiService) UpdateCredentialPublicKey(Sid string, params *Update
451427 path := "/v1/Credentials/PublicKeys/{Sid}"
452428 path = strings .Replace (path , "{" + "Sid" + "}" , Sid , - 1 )
453429
454-
455430 data := url.Values {}
456431 headers := 0
457432
458433 if params != nil && params .FriendlyName != nil {
459- data .Set ("FriendlyName" , * params .FriendlyName )
434+ data .Set ("FriendlyName" , * params .FriendlyName )
460435 }
461436
462-
463437 resp , err := c .client .Post (c .baseURL + path , data , headers )
464438 if err != nil {
465439 return nil , err
0 commit comments