Skip to content

Commit

Permalink
regenerate & run gofmt -w .
Browse files Browse the repository at this point in the history
  • Loading branch information
natebrennand committed Nov 8, 2022
1 parent bcedc72 commit add173a
Show file tree
Hide file tree
Showing 162 changed files with 73 additions and 876 deletions.
2 changes: 1 addition & 1 deletion client/form/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright 2014 Alvaro J. Genial. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//nolint
// nolint
package form

import (
Expand Down
2 changes: 1 addition & 1 deletion client/form/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright 2014 Alvaro J. Genial. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//nolint
// nolint
package form

import (
Expand Down
2 changes: 1 addition & 1 deletion client/page_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"strings"
)

//Takes a limit on the max number of records to read and a max pageSize and calculates the max number of pages to read.
// Takes a limit on the max number of records to read and a max pageSize and calculates the max number of pages to read.
func ReadLimits(pageSize *int, limit *int) int {
//don't care about pageSize
if pageSize == nil {
Expand Down
8 changes: 0 additions & 8 deletions rest/api/v2010/accounts_addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,10 @@ func (params *CreateAddressParams) SetAutoCorrectAddress(AutoCorrectAddress bool
return params
}

//
func (c *ApiService) CreateAddress(params *CreateAddressParams) (*ApiV2010Address, error) {
return c.CreateAddressWithCtx(context.TODO(), params)
}

//
func (c *ApiService) CreateAddressWithCtx(ctx context.Context, params *CreateAddressParams) (*ApiV2010Address, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -160,12 +158,10 @@ func (params *DeleteAddressParams) SetPathAccountSid(PathAccountSid string) *Del
return params
}

//
func (c *ApiService) DeleteAddress(Sid string, params *DeleteAddressParams) error {
return c.DeleteAddressWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) DeleteAddressWithCtx(ctx context.Context, Sid string, params *DeleteAddressParams) error {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -199,12 +195,10 @@ func (params *FetchAddressParams) SetPathAccountSid(PathAccountSid string) *Fetc
return params
}

//
func (c *ApiService) FetchAddress(Sid string, params *FetchAddressParams) (*ApiV2010Address, error) {
return c.FetchAddressWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) FetchAddressWithCtx(ctx context.Context, Sid string, params *FetchAddressParams) (*ApiV2010Address, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -481,12 +475,10 @@ func (params *UpdateAddressParams) SetAutoCorrectAddress(AutoCorrectAddress bool
return params
}

//
func (c *ApiService) UpdateAddress(Sid string, params *UpdateAddressParams) (*ApiV2010Address, error) {
return c.UpdateAddressWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) UpdateAddressWithCtx(ctx context.Context, Sid string, params *UpdateAddressParams) (*ApiV2010Address, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Addresses/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_available_phone_numbers.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ func (params *FetchAvailablePhoneNumberCountryParams) SetPathAccountSid(PathAcco
return params
}

//
func (c *ApiService) FetchAvailablePhoneNumberCountry(CountryCode string, params *FetchAvailablePhoneNumberCountryParams) (*ApiV2010AvailablePhoneNumberCountry, error) {
return c.FetchAvailablePhoneNumberCountryWithCtx(context.TODO(), CountryCode, params)
}

//
func (c *ApiService) FetchAvailablePhoneNumberCountryWithCtx(ctx context.Context, CountryCode string, params *FetchAvailablePhoneNumberCountryParams) (*ApiV2010AvailablePhoneNumberCountry, error) {
path := "/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_calls_notifications.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ func (params *FetchCallNotificationParams) SetPathAccountSid(PathAccountSid stri
return params
}

//
func (c *ApiService) FetchCallNotification(CallSid string, Sid string, params *FetchCallNotificationParams) (*ApiV2010CallNotificationInstance, error) {
return c.FetchCallNotificationWithCtx(context.TODO(), CallSid, Sid, params)
}

//
func (c *ApiService) FetchCallNotificationWithCtx(ctx context.Context, CallSid string, Sid string, params *FetchCallNotificationParams) (*ApiV2010CallNotificationInstance, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package openapi

import (
"context"
"encoding/json"
"net/url"
"strings"
Expand Down Expand Up @@ -51,6 +52,11 @@ func (params *CreateUserDefinedMessageSubscriptionParams) SetIdempotencyKey(Idem

// Subscribe to User Defined Messages for a given call sid.
func (c *ApiService) CreateUserDefinedMessageSubscription(CallSid string, params *CreateUserDefinedMessageSubscriptionParams) (*ApiV2010UserDefinedMessageSubscription, error) {
return c.CreateUserDefinedMessageSubscriptionWithCtx(context.TODO(), CallSid, params)
}

// Subscribe to User Defined Messages for a given call sid.
func (c *ApiService) CreateUserDefinedMessageSubscriptionWithCtx(ctx context.Context, CallSid string, params *CreateUserDefinedMessageSubscriptionParams) (*ApiV2010UserDefinedMessageSubscription, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessageSubscriptions.json"
if params != nil && params.PathAccountSid != nil {
path = strings.Replace(path, "{"+"AccountSid"+"}", *params.PathAccountSid, -1)
Expand All @@ -72,7 +78,7 @@ func (c *ApiService) CreateUserDefinedMessageSubscription(CallSid string, params
data.Set("IdempotencyKey", *params.IdempotencyKey)
}

resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
resp, err := c.requestHandler.Post(ctx, c.baseURL+path, data, headers)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -100,6 +106,11 @@ func (params *DeleteUserDefinedMessageSubscriptionParams) SetPathAccountSid(Path

// Delete a specific User Defined Message Subscription.
func (c *ApiService) DeleteUserDefinedMessageSubscription(CallSid string, Sid string, params *DeleteUserDefinedMessageSubscriptionParams) error {
return c.DeleteUserDefinedMessageSubscriptionWithCtx(context.TODO(), CallSid, Sid, params)
}

// Delete a specific User Defined Message Subscription.
func (c *ApiService) DeleteUserDefinedMessageSubscriptionWithCtx(ctx context.Context, CallSid string, Sid string, params *DeleteUserDefinedMessageSubscriptionParams) error {
path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessageSubscriptions/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
path = strings.Replace(path, "{"+"AccountSid"+"}", *params.PathAccountSid, -1)
Expand All @@ -112,7 +123,7 @@ func (c *ApiService) DeleteUserDefinedMessageSubscription(CallSid string, Sid st
data := url.Values{}
headers := make(map[string]interface{})

resp, err := c.requestHandler.Delete(c.baseURL+path, data, headers)
resp, err := c.requestHandler.Delete(ctx, c.baseURL+path, data, headers)
if err != nil {
return err
}
Expand Down
8 changes: 7 additions & 1 deletion rest/api/v2010/accounts_calls_user_defined_messages.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package openapi

import (
"context"
"encoding/json"
"net/url"
"strings"
Expand Down Expand Up @@ -45,6 +46,11 @@ func (params *CreateUserDefinedMessageParams) SetIdempotencyKey(IdempotencyKey s

// Create a new User Defined Message for the given call sid.
func (c *ApiService) CreateUserDefinedMessage(CallSid string, params *CreateUserDefinedMessageParams) (*ApiV2010UserDefinedMessage, error) {
return c.CreateUserDefinedMessageWithCtx(context.TODO(), CallSid, params)
}

// Create a new User Defined Message for the given call sid.
func (c *ApiService) CreateUserDefinedMessageWithCtx(ctx context.Context, CallSid string, params *CreateUserDefinedMessageParams) (*ApiV2010UserDefinedMessage, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessages.json"
if params != nil && params.PathAccountSid != nil {
path = strings.Replace(path, "{"+"AccountSid"+"}", *params.PathAccountSid, -1)
Expand All @@ -63,7 +69,7 @@ func (c *ApiService) CreateUserDefinedMessage(CallSid string, params *CreateUser
data.Set("IdempotencyKey", *params.IdempotencyKey)
}

resp, err := c.requestHandler.Post(c.baseURL+path, data, headers)
resp, err := c.requestHandler.Post(ctx, c.baseURL+path, data, headers)
if err != nil {
return nil, err
}
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_conferences.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,12 +332,10 @@ func (params *UpdateConferenceParams) SetAnnounceMethod(AnnounceMethod string) *
return params
}

//
func (c *ApiService) UpdateConference(Sid string, params *UpdateConferenceParams) (*ApiV2010Conference, error) {
return c.UpdateConferenceWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) UpdateConferenceWithCtx(ctx context.Context, Sid string, params *UpdateConferenceParams) (*ApiV2010Conference, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_conferences_participants.go
Original file line number Diff line number Diff line change
Expand Up @@ -311,12 +311,10 @@ func (params *CreateParticipantParams) SetAmdStatusCallbackMethod(AmdStatusCallb
return params
}

//
func (c *ApiService) CreateParticipant(ConferenceSid string, params *CreateParticipantParams) (*ApiV2010Participant, error) {
return c.CreateParticipantWithCtx(context.TODO(), ConferenceSid, params)
}

//
func (c *ApiService) CreateParticipantWithCtx(ctx context.Context, ConferenceSid string, params *CreateParticipantParams) (*ApiV2010Participant, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_incoming_phone_numbers_local.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,10 @@ func (params *CreateIncomingPhoneNumberLocalParams) SetBundleSid(BundleSid strin
return params
}

//
func (c *ApiService) CreateIncomingPhoneNumberLocal(params *CreateIncomingPhoneNumberLocalParams) (*ApiV2010IncomingPhoneNumberLocal, error) {
return c.CreateIncomingPhoneNumberLocalWithCtx(context.TODO(), params)
}

//
func (c *ApiService) CreateIncomingPhoneNumberLocalWithCtx(ctx context.Context, params *CreateIncomingPhoneNumberLocalParams) (*ApiV2010IncomingPhoneNumberLocal, error) {
path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Local.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_incoming_phone_numbers_mobile.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,10 @@ func (params *CreateIncomingPhoneNumberMobileParams) SetBundleSid(BundleSid stri
return params
}

//
func (c *ApiService) CreateIncomingPhoneNumberMobile(params *CreateIncomingPhoneNumberMobileParams) (*ApiV2010IncomingPhoneNumberMobile, error) {
return c.CreateIncomingPhoneNumberMobileWithCtx(context.TODO(), params)
}

//
func (c *ApiService) CreateIncomingPhoneNumberMobileWithCtx(ctx context.Context, params *CreateIncomingPhoneNumberMobileParams) (*ApiV2010IncomingPhoneNumberMobile, error) {
path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/Mobile.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_incoming_phone_numbers_toll_free.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,10 @@ func (params *CreateIncomingPhoneNumberTollFreeParams) SetBundleSid(BundleSid st
return params
}

//
func (c *ApiService) CreateIncomingPhoneNumberTollFree(params *CreateIncomingPhoneNumberTollFreeParams) (*ApiV2010IncomingPhoneNumberTollFree, error) {
return c.CreateIncomingPhoneNumberTollFreeWithCtx(context.TODO(), params)
}

//
func (c *ApiService) CreateIncomingPhoneNumberTollFreeWithCtx(ctx context.Context, params *CreateIncomingPhoneNumberTollFreeParams) (*ApiV2010IncomingPhoneNumberTollFree, error) {
path := "/2010-04-01/Accounts/{AccountSid}/IncomingPhoneNumbers/TollFree.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
8 changes: 0 additions & 8 deletions rest/api/v2010/accounts_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@ func (params *CreateNewKeyParams) SetFriendlyName(FriendlyName string) *CreateNe
return params
}

//
func (c *ApiService) CreateNewKey(params *CreateNewKeyParams) (*ApiV2010NewKey, error) {
return c.CreateNewKeyWithCtx(context.TODO(), params)
}

//
func (c *ApiService) CreateNewKeyWithCtx(ctx context.Context, params *CreateNewKeyParams) (*ApiV2010NewKey, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Keys.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -88,12 +86,10 @@ func (params *DeleteKeyParams) SetPathAccountSid(PathAccountSid string) *DeleteK
return params
}

//
func (c *ApiService) DeleteKey(Sid string, params *DeleteKeyParams) error {
return c.DeleteKeyWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) DeleteKeyWithCtx(ctx context.Context, Sid string, params *DeleteKeyParams) error {
path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -127,12 +123,10 @@ func (params *FetchKeyParams) SetPathAccountSid(PathAccountSid string) *FetchKey
return params
}

//
func (c *ApiService) FetchKey(Sid string, params *FetchKeyParams) (*ApiV2010Key, error) {
return c.FetchKeyWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) FetchKeyWithCtx(ctx context.Context, Sid string, params *FetchKeyParams) (*ApiV2010Key, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -340,12 +334,10 @@ func (params *UpdateKeyParams) SetFriendlyName(FriendlyName string) *UpdateKeyPa
return params
}

//
func (c *ApiService) UpdateKey(Sid string, params *UpdateKeyParams) (*ApiV2010Key, error) {
return c.UpdateKeyWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) UpdateKeyWithCtx(ctx context.Context, Sid string, params *UpdateKeyParams) (*ApiV2010Key, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Keys/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_messages_feedback.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,10 @@ func (params *CreateMessageFeedbackParams) SetOutcome(Outcome string) *CreateMes
return params
}

//
func (c *ApiService) CreateMessageFeedback(MessageSid string, params *CreateMessageFeedbackParams) (*ApiV2010MessageFeedback, error) {
return c.CreateMessageFeedbackWithCtx(context.TODO(), MessageSid, params)
}

//
func (c *ApiService) CreateMessageFeedbackWithCtx(ctx context.Context, MessageSid string, params *CreateMessageFeedbackParams) (*ApiV2010MessageFeedback, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Messages/{MessageSid}/Feedback.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
2 changes: 0 additions & 2 deletions rest/api/v2010/accounts_outgoing_caller_ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,10 @@ func (params *CreateValidationRequestParams) SetStatusCallbackMethod(StatusCallb
return params
}

//
func (c *ApiService) CreateValidationRequest(params *CreateValidationRequestParams) (*ApiV2010ValidationRequest, error) {
return c.CreateValidationRequestWithCtx(context.TODO(), params)
}

//
func (c *ApiService) CreateValidationRequestWithCtx(ctx context.Context, params *CreateValidationRequestParams) (*ApiV2010ValidationRequest, error) {
path := "/2010-04-01/Accounts/{AccountSid}/OutgoingCallerIds.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
4 changes: 0 additions & 4 deletions rest/api/v2010/accounts_recordings_transcriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,10 @@ func (params *DeleteRecordingTranscriptionParams) SetPathAccountSid(PathAccountS
return params
}

//
func (c *ApiService) DeleteRecordingTranscription(RecordingSid string, Sid string, params *DeleteRecordingTranscriptionParams) error {
return c.DeleteRecordingTranscriptionWithCtx(context.TODO(), RecordingSid, Sid, params)
}

//
func (c *ApiService) DeleteRecordingTranscriptionWithCtx(ctx context.Context, RecordingSid string, Sid string, params *DeleteRecordingTranscriptionParams) error {
path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -75,12 +73,10 @@ func (params *FetchRecordingTranscriptionParams) SetPathAccountSid(PathAccountSi
return params
}

//
func (c *ApiService) FetchRecordingTranscription(RecordingSid string, Sid string, params *FetchRecordingTranscriptionParams) (*ApiV2010RecordingTranscription, error) {
return c.FetchRecordingTranscriptionWithCtx(context.TODO(), RecordingSid, Sid, params)
}

//
func (c *ApiService) FetchRecordingTranscriptionWithCtx(ctx context.Context, RecordingSid string, Sid string, params *FetchRecordingTranscriptionParams) (*ApiV2010RecordingTranscription, error) {
path := "/2010-04-01/Accounts/{AccountSid}/Recordings/{RecordingSid}/Transcriptions/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
6 changes: 0 additions & 6 deletions rest/api/v2010/accounts_signing_keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,10 @@ func (params *DeleteSigningKeyParams) SetPathAccountSid(PathAccountSid string) *
return params
}

//
func (c *ApiService) DeleteSigningKey(Sid string, params *DeleteSigningKeyParams) error {
return c.DeleteSigningKeyWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) DeleteSigningKeyWithCtx(ctx context.Context, Sid string, params *DeleteSigningKeyParams) error {
path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -127,12 +125,10 @@ func (params *FetchSigningKeyParams) SetPathAccountSid(PathAccountSid string) *F
return params
}

//
func (c *ApiService) FetchSigningKey(Sid string, params *FetchSigningKeyParams) (*ApiV2010SigningKey, error) {
return c.FetchSigningKeyWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) FetchSigningKeyWithCtx(ctx context.Context, Sid string, params *FetchSigningKeyParams) (*ApiV2010SigningKey, error) {
path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down Expand Up @@ -340,12 +336,10 @@ func (params *UpdateSigningKeyParams) SetFriendlyName(FriendlyName string) *Upda
return params
}

//
func (c *ApiService) UpdateSigningKey(Sid string, params *UpdateSigningKeyParams) (*ApiV2010SigningKey, error) {
return c.UpdateSigningKeyWithCtx(context.TODO(), Sid, params)
}

//
func (c *ApiService) UpdateSigningKeyWithCtx(ctx context.Context, Sid string, params *UpdateSigningKeyParams) (*ApiV2010SigningKey, error) {
path := "/2010-04-01/Accounts/{AccountSid}/SigningKeys/{Sid}.json"
if params != nil && params.PathAccountSid != nil {
Expand Down
Loading

0 comments on commit add173a

Please sign in to comment.