diff --git a/.changelog/178ad7d4f39542ec894697dde61c45fa.json b/.changelog/178ad7d4f39542ec894697dde61c45fa.json new file mode 100644 index 00000000000..ff9b0dbe251 --- /dev/null +++ b/.changelog/178ad7d4f39542ec894697dde61c45fa.json @@ -0,0 +1,8 @@ +{ + "id": "178ad7d4-f395-42ec-8946-97dde61c45fa", + "type": "feature", + "description": "Removes the Amazon Chime SDK APIs from the \"chime\" namespace. Amazon Chime SDK APIs continue to be available in the AWS SDK via the dedicated Amazon Chime SDK namespaces: chime-sdk-identity, chime-sdk-mediapipelines, chime-sdk-meetings, chime-sdk-messaging, and chime-sdk-voice.", + "modules": [ + "service/chime" + ] +} \ No newline at end of file diff --git a/.changelog/58b1cdc3c71b42dabd4d6783ec2ab17f.json b/.changelog/58b1cdc3c71b42dabd4d6783ec2ab17f.json new file mode 100644 index 00000000000..55769503295 --- /dev/null +++ b/.changelog/58b1cdc3c71b42dabd4d6783ec2ab17f.json @@ -0,0 +1,8 @@ +{ + "id": "58b1cdc3-c71b-42da-bd4d-6783ec2ab17f", + "type": "feature", + "description": "This release adds API support for reading Service Level Objectives and Services from monitoring accounts, from SLO and Service-scoped operations, including ListServices and ListServiceLevelObjectives.", + "modules": [ + "service/applicationsignals" + ] +} \ No newline at end of file diff --git a/.changelog/62c4ef5f1ba14dcea74521df9f63a9f6.json b/.changelog/62c4ef5f1ba14dcea74521df9f63a9f6.json new file mode 100644 index 00000000000..12102e7a00e --- /dev/null +++ b/.changelog/62c4ef5f1ba14dcea74521df9f63a9f6.json @@ -0,0 +1,8 @@ +{ + "id": "62c4ef5f-1ba1-4dce-a745-21df9f63a9f6", + "type": "documentation", + "description": "Documentation update for VPC origin config.", + "modules": [ + "service/cloudfront" + ] +} \ No newline at end of file diff --git a/.changelog/68325feae0d048d3ac5a6403403a66e5.json b/.changelog/68325feae0d048d3ac5a6403403a66e5.json new file mode 100644 index 00000000000..c09b1c00f45 --- /dev/null +++ b/.changelog/68325feae0d048d3ac5a6403403a66e5.json @@ -0,0 +1,8 @@ +{ + "id": "68325fea-e0d0-48d3-ac5a-6403403a66e5", + "type": "feature", + "description": "AWS SageMaker InferenceComponents now support rolling update deployments for Inference Components.", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/.changelog/a5cd00f4dfad4d169aaa4a9526a334e8.json b/.changelog/a5cd00f4dfad4d169aaa4a9526a334e8.json new file mode 100644 index 00000000000..50005f5c4ee --- /dev/null +++ b/.changelog/a5cd00f4dfad4d169aaa4a9526a334e8.json @@ -0,0 +1,8 @@ +{ + "id": "a5cd00f4-dfad-4d16-9aaa-4a9526a334e8", + "type": "feature", + "description": "This release adds support for sharing AWS::ApplicationSignals::Service and AWS::ApplicationSignals::ServiceLevelObjective resources.", + "modules": [ + "service/oam" + ] +} \ No newline at end of file diff --git a/.changelog/d7aecaa199ad4a82b2ac89c5fa4bb985.json b/.changelog/d7aecaa199ad4a82b2ac89c5fa4bb985.json new file mode 100644 index 00000000000..3c6f6ec4fa7 --- /dev/null +++ b/.changelog/d7aecaa199ad4a82b2ac89c5fa4bb985.json @@ -0,0 +1,8 @@ +{ + "id": "d7aecaa1-99ad-4a82-b2ac-89c5fa4bb985", + "type": "feature", + "description": "Amazon EC2 Fleet customers can now override the Block Device Mapping specified in the Launch Template when creating a new Fleet request, saving the effort of creating and associating new Launch Templates to customize the Block Device Mapping.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/e7c67fe2d6b54334a542ba42caf06a05.json b/.changelog/e7c67fe2d6b54334a542ba42caf06a05.json new file mode 100644 index 00000000000..042e38b8192 --- /dev/null +++ b/.changelog/e7c67fe2d6b54334a542ba42caf06a05.json @@ -0,0 +1,8 @@ +{ + "id": "e7c67fe2-d6b5-4334-a542-ba42caf06a05", + "type": "feature", + "description": "This release adds an optional listResponseScope request parameter in certain list API requests to limit the response to metadata only.", + "modules": [ + "service/iotfleetwise" + ] +} \ No newline at end of file diff --git a/.changelog/f4c583675ada428e816b99bd7ca9e4fa.json b/.changelog/f4c583675ada428e816b99bd7ca9e4fa.json new file mode 100644 index 00000000000..b3fae67b027 --- /dev/null +++ b/.changelog/f4c583675ada428e816b99bd7ca9e4fa.json @@ -0,0 +1,8 @@ +{ + "id": "f4c58367-5ada-428e-816b-99bd7ca9e4fa", + "type": "feature", + "description": "AWS Batch: Resource Aware Scheduling feature support", + "modules": [ + "service/batch" + ] +} \ No newline at end of file diff --git a/service/applicationsignals/api_op_CreateServiceLevelObjective.go b/service/applicationsignals/api_op_CreateServiceLevelObjective.go index af4cdc94f69..40951395e00 100644 --- a/service/applicationsignals/api_op_CreateServiceLevelObjective.go +++ b/service/applicationsignals/api_op_CreateServiceLevelObjective.go @@ -29,6 +29,10 @@ import ( // You can also set SLOs against any CloudWatch metric or math expression that // produces a time series. // +// You can't create an SLO for a service operation that was discovered by +// Application Signals until after that operation has reported standard metrics to +// Application Signals. +// // When you create an SLO, you specify whether it is a period-based SLO or a // request-based SLO. Each type of SLO has a different way of evaluating your // application's performance against its attainment goal. diff --git a/service/applicationsignals/api_op_ListServiceLevelObjectives.go b/service/applicationsignals/api_op_ListServiceLevelObjectives.go index 0710ddbaea1..ba59362a5ee 100644 --- a/service/applicationsignals/api_op_ListServiceLevelObjectives.go +++ b/service/applicationsignals/api_op_ListServiceLevelObjectives.go @@ -29,6 +29,15 @@ func (c *Client) ListServiceLevelObjectives(ctx context.Context, params *ListSer type ListServiceLevelObjectivesInput struct { + // If you are using this operation in a monitoring account, specify true to + // include SLO from source accounts in the returned data. + // + // When you are monitoring an account, you can use Amazon Web Services account ID + // in KeyAttribute filter for service source account and SloOwnerawsaccountID for + // SLO source account with IncludeLinkedAccounts to filter the returned data to + // only a single source account. + IncludeLinkedAccounts bool + // You can use this optional field to specify which services you want to retrieve // SLO information for. // @@ -60,6 +69,9 @@ type ListServiceLevelObjectivesInput struct { // The name of the operation that this SLO is associated with. OperationName *string + // SLO's Amazon Web Services account ID. + SloOwnerAwsAccountId *string + noSmithyDocumentSerde } diff --git a/service/applicationsignals/api_op_ListServices.go b/service/applicationsignals/api_op_ListServices.go index d0f430ab35c..03e63bb3a2b 100644 --- a/service/applicationsignals/api_op_ListServices.go +++ b/service/applicationsignals/api_op_ListServices.go @@ -51,6 +51,13 @@ type ListServicesInput struct { // This member is required. StartTime *time.Time + // Amazon Web Services Account ID. + AwsAccountId *string + + // If you are using this operation in a monitoring account, specify true to + // include services from source accounts in the returned data. + IncludeLinkedAccounts bool + // The maximum number of results to return in one operation. If you omit this // parameter, the default of 50 is used. MaxResults *int32 diff --git a/service/applicationsignals/deserializers.go b/service/applicationsignals/deserializers.go index af9176aa948..9ab61cce7ee 100644 --- a/service/applicationsignals/deserializers.go +++ b/service/applicationsignals/deserializers.go @@ -3374,6 +3374,15 @@ func awsRestjson1_deserializeDocumentMetricReference(v **types.MetricReference, for key, value := range shape { switch key { + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AwsAccountId to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) + } + case "Dimensions": if err := awsRestjson1_deserializeDocumentDimensions(&sv.Dimensions, value); err != nil { return err diff --git a/service/applicationsignals/serializers.go b/service/applicationsignals/serializers.go index 9194865faa6..7c65ded46c2 100644 --- a/service/applicationsignals/serializers.go +++ b/service/applicationsignals/serializers.go @@ -739,6 +739,10 @@ func awsRestjson1_serializeOpHttpBindingsListServiceLevelObjectivesInput(v *List return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.IncludeLinkedAccounts { + encoder.SetQuery("IncludeLinkedAccounts").Boolean(v.IncludeLinkedAccounts) + } + if v.MaxResults != nil { encoder.SetQuery("MaxResults").Integer(*v.MaxResults) } @@ -751,6 +755,10 @@ func awsRestjson1_serializeOpHttpBindingsListServiceLevelObjectivesInput(v *List encoder.SetQuery("OperationName").String(*v.OperationName) } + if v.SloOwnerAwsAccountId != nil { + encoder.SetQuery("SloOwnerAwsAccountId").String(*v.SloOwnerAwsAccountId) + } + return nil } @@ -930,10 +938,18 @@ func awsRestjson1_serializeOpHttpBindingsListServicesInput(v *ListServicesInput, return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AwsAccountId != nil { + encoder.SetQuery("AwsAccountId").String(*v.AwsAccountId) + } + if v.EndTime != nil { encoder.SetQuery("EndTime").String(smithytime.FormatDateTime(*v.EndTime)) } + if v.IncludeLinkedAccounts { + encoder.SetQuery("IncludeLinkedAccounts").Boolean(v.IncludeLinkedAccounts) + } + if v.MaxResults != nil { encoder.SetQuery("MaxResults").Integer(*v.MaxResults) } diff --git a/service/applicationsignals/types/types.go b/service/applicationsignals/types/types.go index 6ad7e8d7d0d..e0f709c9ee8 100644 --- a/service/applicationsignals/types/types.go +++ b/service/applicationsignals/types/types.go @@ -15,7 +15,7 @@ import ( // For example, if you specify 60 as the number of minutes in the look-back // window, the burn rate is calculated as the following: // -// burn rate = error rate over the look-back window / (1 - attainment goal +// burn rate = error rate over the look-back window / (100% - attainment goal // percentage) // // For more information about burn rates, see [Calculate burn rates]. @@ -290,6 +290,9 @@ type MetricReference struct { // This member is required. Namespace *string + // Amazon Web Services account ID. + AccountId *string + // An array of one or more dimensions that further define the metric. For more // information, see [CloudWatchDimensions]. // diff --git a/service/batch/api_client.go b/service/batch/api_client.go index 2aa7d2c9c1e..ee0388381d2 100644 --- a/service/batch/api_client.go +++ b/service/batch/api_client.go @@ -4,6 +4,7 @@ package batch import ( "context" + cryptorand "crypto/rand" "errors" "fmt" "github.com/aws/aws-sdk-go-v2/aws" @@ -22,6 +23,7 @@ import ( "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/metrics" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" "net" @@ -184,6 +186,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveHTTPSignerV4(&options) + resolveIdempotencyTokenProvider(&options) + resolveEndpointResolverV2(&options) resolveTracerProvider(&options) @@ -679,6 +683,13 @@ func addIsPaginatorUserAgent(o *Options) { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetry(stack *middleware.Stack, o Options) error { attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { m.LogAttempts = o.ClientLogMode.IsRetries() @@ -773,6 +784,11 @@ func resolveMeterProvider(options *Options) { } } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRecursionDetection(stack *middleware.Stack) error { return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) } diff --git a/service/batch/api_op_CreateComputeEnvironment.go b/service/batch/api_op_CreateComputeEnvironment.go index 8031d29a198..6f413471e43 100644 --- a/service/batch/api_op_CreateComputeEnvironment.go +++ b/service/batch/api_op_CreateComputeEnvironment.go @@ -206,8 +206,8 @@ type CreateComputeEnvironmentInput struct { Tags map[string]string // The maximum number of vCPUs for an unmanaged compute environment. This - // parameter is only used for fair-share scheduling to reserve vCPU capacity for - // new share identifiers. If this parameter isn't provided for a fair-share job + // parameter is only used for fair share scheduling to reserve vCPU capacity for + // new share identifiers. If this parameter isn't provided for a fair share job // queue, no vCPU capacity is reserved. // // This parameter is only supported when the type parameter is set to UNMANAGED . diff --git a/service/chime/api_op_StopMeetingTranscription.go b/service/batch/api_op_CreateConsumableResource.go similarity index 57% rename from service/chime/api_op_StopMeetingTranscription.go rename to service/batch/api_op_CreateConsumableResource.go index da645dce9e8..cff53ece93a 100644 --- a/service/chime/api_op_StopMeetingTranscription.go +++ b/service/batch/api_op_CreateConsumableResource.go @@ -1,6 +1,6 @@ // Code generated by smithy-go-codegen DO NOT EDIT. -package chime +package batch import ( "context" @@ -10,64 +10,82 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Stops transcription for the specified meetingId . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [StopMeetingTranscription], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by StopMeetingTranscription in the Amazon Chime SDK -// Meetings Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [StopMeetingTranscription]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_StopMeetingTranscription.html -func (c *Client) StopMeetingTranscription(ctx context.Context, params *StopMeetingTranscriptionInput, optFns ...func(*Options)) (*StopMeetingTranscriptionOutput, error) { +// Creates an Batch consumable resource. +func (c *Client) CreateConsumableResource(ctx context.Context, params *CreateConsumableResourceInput, optFns ...func(*Options)) (*CreateConsumableResourceOutput, error) { if params == nil { - params = &StopMeetingTranscriptionInput{} + params = &CreateConsumableResourceInput{} } - result, metadata, err := c.invokeOperation(ctx, "StopMeetingTranscription", params, optFns, c.addOperationStopMeetingTranscriptionMiddlewares) + result, metadata, err := c.invokeOperation(ctx, "CreateConsumableResource", params, optFns, c.addOperationCreateConsumableResourceMiddlewares) if err != nil { return nil, err } - out := result.(*StopMeetingTranscriptionOutput) + out := result.(*CreateConsumableResourceOutput) out.ResultMetadata = metadata return out, nil } -type StopMeetingTranscriptionInput struct { +type CreateConsumableResourceInput struct { - // The unique ID of the meeting for which you stop transcription. + // The name of the consumable resource. Must be unique. // // This member is required. - MeetingId *string + ConsumableResourceName *string + + // Indicates whether the resource is available to be re-used after a job + // completes. Can be one of: + // + // - REPLENISHABLE (default) + // + // - NON_REPLENISHABLE + ResourceType *string + + // The tags that you apply to the consumable resource to help you categorize and + // organize your resources. Each tag consists of a key and an optional value. For + // more information, see [Tagging your Batch resources]. + // + // [Tagging your Batch resources]: https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html + Tags map[string]string + + // The total amount of the consumable resource that is available. Must be + // non-negative. + TotalQuantity *int64 noSmithyDocumentSerde } -type StopMeetingTranscriptionOutput struct { +type CreateConsumableResourceOutput struct { + + // The Amazon Resource Name (ARN) of the consumable resource. + // + // This member is required. + ConsumableResourceArn *string + + // The name of the consumable resource. + // + // This member is required. + ConsumableResourceName *string + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } -func (c *Client) addOperationStopMeetingTranscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { +func (c *Client) addOperationCreateConsumableResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { return err } - err = stack.Serialize.Add(&awsRestjson1_serializeOpStopMeetingTranscription{}, middleware.After) + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateConsumableResource{}, middleware.After) if err != nil { return err } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStopMeetingTranscription{}, middleware.After) + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateConsumableResource{}, middleware.After) if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "StopMeetingTranscription"); err != nil { + if err := addProtocolFinalizerMiddlewares(stack, options, "CreateConsumableResource"); err != nil { return fmt.Errorf("add protocol finalizers: %v", err) } @@ -119,10 +137,10 @@ func (c *Client) addOperationStopMeetingTranscriptionMiddlewares(stack *middlewa if err = addUserAgentRetryMode(stack, options); err != nil { return err } - if err = addOpStopMeetingTranscriptionValidationMiddleware(stack); err != nil { + if err = addOpCreateConsumableResourceValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStopMeetingTranscription(options.Region), middleware.Before); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateConsumableResource(options.Region), middleware.Before); err != nil { return err } if err = addRecursionDetection(stack); err != nil { @@ -155,10 +173,10 @@ func (c *Client) addOperationStopMeetingTranscriptionMiddlewares(stack *middlewa return nil } -func newServiceMetadataMiddleware_opStopMeetingTranscription(region string) *awsmiddleware.RegisterServiceMetadata { +func newServiceMetadataMiddleware_opCreateConsumableResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - OperationName: "StopMeetingTranscription", + OperationName: "CreateConsumableResource", } } diff --git a/service/batch/api_op_CreateJobQueue.go b/service/batch/api_op_CreateJobQueue.go index 884e6d5c907..fb63119ecc8 100644 --- a/service/batch/api_op_CreateJobQueue.go +++ b/service/batch/api_op_CreateJobQueue.go @@ -76,21 +76,20 @@ type CreateJobQueueInput struct { // maxTimeSeconds is 600 (10 minutes) and its maximum value is 86,400 (24 hours).) JobStateTimeLimitActions []types.JobStateTimeLimitAction - // The Amazon Resource Name (ARN) of the fair-share scheduling policy. Job queues - // that don't have a fair-share scheduling policy are scheduled in a first-in, - // first-out (FIFO) model. After a job queue has a fair-share scheduling policy, it - // can be replaced but can't be removed. + // The Amazon Resource Name (ARN) of the fair share scheduling policy. Job queues + // that don't have a scheduling policy are scheduled in a first-in, first-out + // (FIFO) model. After a job queue has a scheduling policy, it can be replaced but + // can't be removed. // // The format is aws:Partition:batch:Region:Account:scheduling-policy/Name . // // An example is // aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy . // - // A job queue without a fair-share scheduling policy is scheduled as a FIFO job - // queue and can't have a fair-share scheduling policy added. Jobs queues with a - // fair-share scheduling policy can have a maximum of 500 active share identifiers. - // When the limit has been reached, submissions of any jobs that add a new share - // identifier fail. + // A job queue without a scheduling policy is scheduled as a FIFO job queue and + // can't have a scheduling policy added. Jobs queues with a scheduling policy can + // have a maximum of 500 active fair share identifiers. When the limit has been + // reached, submissions of any jobs that add a new fair share identifier fail. SchedulingPolicyArn *string // The state of the job queue. If the job queue state is ENABLED , it is able to diff --git a/service/batch/api_op_CreateSchedulingPolicy.go b/service/batch/api_op_CreateSchedulingPolicy.go index fd87241749c..4e42ef46031 100644 --- a/service/batch/api_op_CreateSchedulingPolicy.go +++ b/service/batch/api_op_CreateSchedulingPolicy.go @@ -30,14 +30,14 @@ func (c *Client) CreateSchedulingPolicy(ctx context.Context, params *CreateSched // Contains the parameters for CreateSchedulingPolicy . type CreateSchedulingPolicyInput struct { - // The name of the fair-share scheduling policy. It can be up to 128 letters long. - // It can contain uppercase and lowercase letters, numbers, hyphens (-), and - // underscores (_). + // The name of the scheduling policy. It can be up to 128 letters long. It can + // contain uppercase and lowercase letters, numbers, hyphens (-), and underscores + // (_). // // This member is required. Name *string - // The fair-share scheduling policy details. + // The fair share policy of the scheduling policy. FairsharePolicy *types.FairsharePolicy // The tags that you apply to the scheduling policy to help you categorize and diff --git a/service/chime/api_op_UntagAttendee.go b/service/batch/api_op_DeleteConsumableResource.go similarity index 62% rename from service/chime/api_op_UntagAttendee.go rename to service/batch/api_op_DeleteConsumableResource.go index 636a188b412..857ca390b01 100644 --- a/service/chime/api_op_UntagAttendee.go +++ b/service/batch/api_op_DeleteConsumableResource.go @@ -1,6 +1,6 @@ // Code generated by smithy-go-codegen DO NOT EDIT. -package chime +package batch import ( "context" @@ -10,68 +10,52 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Untags the specified tags from the specified Amazon Chime SDK attendee. -// -// UntagAttendee is not supported in the Amazon Chime SDK Meetings Namespace. -// Update your application to remove calls to this API. -// -// Deprecated: Attendee Tags are not supported in the Amazon Chime SDK Meetings -// Namespace. Update your application to remove calls to this API. -func (c *Client) UntagAttendee(ctx context.Context, params *UntagAttendeeInput, optFns ...func(*Options)) (*UntagAttendeeOutput, error) { +// Deletes the specified consumable resource. +func (c *Client) DeleteConsumableResource(ctx context.Context, params *DeleteConsumableResourceInput, optFns ...func(*Options)) (*DeleteConsumableResourceOutput, error) { if params == nil { - params = &UntagAttendeeInput{} + params = &DeleteConsumableResourceInput{} } - result, metadata, err := c.invokeOperation(ctx, "UntagAttendee", params, optFns, c.addOperationUntagAttendeeMiddlewares) + result, metadata, err := c.invokeOperation(ctx, "DeleteConsumableResource", params, optFns, c.addOperationDeleteConsumableResourceMiddlewares) if err != nil { return nil, err } - out := result.(*UntagAttendeeOutput) + out := result.(*DeleteConsumableResourceOutput) out.ResultMetadata = metadata return out, nil } -type UntagAttendeeInput struct { +type DeleteConsumableResourceInput struct { - // The Amazon Chime SDK attendee ID. + // The name or ARN of the consumable resource that will be deleted. // // This member is required. - AttendeeId *string - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - // The tag keys. - // - // This member is required. - TagKeys []string + ConsumableResource *string noSmithyDocumentSerde } -type UntagAttendeeOutput struct { +type DeleteConsumableResourceOutput struct { // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } -func (c *Client) addOperationUntagAttendeeMiddlewares(stack *middleware.Stack, options Options) (err error) { +func (c *Client) addOperationDeleteConsumableResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { return err } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagAttendee{}, middleware.After) + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteConsumableResource{}, middleware.After) if err != nil { return err } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagAttendee{}, middleware.After) + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteConsumableResource{}, middleware.After) if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "UntagAttendee"); err != nil { + if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteConsumableResource"); err != nil { return fmt.Errorf("add protocol finalizers: %v", err) } @@ -123,10 +107,10 @@ func (c *Client) addOperationUntagAttendeeMiddlewares(stack *middleware.Stack, o if err = addUserAgentRetryMode(stack, options); err != nil { return err } - if err = addOpUntagAttendeeValidationMiddleware(stack); err != nil { + if err = addOpDeleteConsumableResourceValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagAttendee(options.Region), middleware.Before); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteConsumableResource(options.Region), middleware.Before); err != nil { return err } if err = addRecursionDetection(stack); err != nil { @@ -159,10 +143,10 @@ func (c *Client) addOperationUntagAttendeeMiddlewares(stack *middleware.Stack, o return nil } -func newServiceMetadataMiddleware_opUntagAttendee(region string) *awsmiddleware.RegisterServiceMetadata { +func newServiceMetadataMiddleware_opDeleteConsumableResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - OperationName: "UntagAttendee", + OperationName: "DeleteConsumableResource", } } diff --git a/service/chime/api_op_DeleteMediaCapturePipeline.go b/service/batch/api_op_DescribeConsumableResource.go similarity index 54% rename from service/chime/api_op_DeleteMediaCapturePipeline.go rename to service/batch/api_op_DescribeConsumableResource.go index 36173ca0da6..0827a6ae84a 100644 --- a/service/chime/api_op_DeleteMediaCapturePipeline.go +++ b/service/batch/api_op_DescribeConsumableResource.go @@ -1,6 +1,6 @@ // Code generated by smithy-go-codegen DO NOT EDIT. -package chime +package batch import ( "context" @@ -10,64 +10,91 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the media capture pipeline. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteMediaCapturePipeline], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteMediaCapturePipeline in the Amazon Chime SDK -// Media Pipelines Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteMediaCapturePipeline]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_media-pipelines-chime_DeleteMediaCapturePipeline.html -func (c *Client) DeleteMediaCapturePipeline(ctx context.Context, params *DeleteMediaCapturePipelineInput, optFns ...func(*Options)) (*DeleteMediaCapturePipelineOutput, error) { +// Returns a description of the specified consumable resource. +func (c *Client) DescribeConsumableResource(ctx context.Context, params *DescribeConsumableResourceInput, optFns ...func(*Options)) (*DescribeConsumableResourceOutput, error) { if params == nil { - params = &DeleteMediaCapturePipelineInput{} + params = &DescribeConsumableResourceInput{} } - result, metadata, err := c.invokeOperation(ctx, "DeleteMediaCapturePipeline", params, optFns, c.addOperationDeleteMediaCapturePipelineMiddlewares) + result, metadata, err := c.invokeOperation(ctx, "DescribeConsumableResource", params, optFns, c.addOperationDescribeConsumableResourceMiddlewares) if err != nil { return nil, err } - out := result.(*DeleteMediaCapturePipelineOutput) + out := result.(*DescribeConsumableResourceOutput) out.ResultMetadata = metadata return out, nil } -type DeleteMediaCapturePipelineInput struct { +type DescribeConsumableResourceInput struct { - // The ID of the media capture pipeline being deleted. + // The name or ARN of the consumable resource whose description will be returned. // // This member is required. - MediaPipelineId *string + ConsumableResource *string noSmithyDocumentSerde } -type DeleteMediaCapturePipelineOutput struct { +type DescribeConsumableResourceOutput struct { + + // The Amazon Resource Name (ARN) of the consumable resource. + // + // This member is required. + ConsumableResourceArn *string + + // The name of the consumable resource. + // + // This member is required. + ConsumableResourceName *string + + // The amount of the consumable resource that is currently available to use. + AvailableQuantity *int64 + + // The Unix timestamp (in milliseconds) for when the consumable resource was + // created. + CreatedAt *int64 + + // The amount of the consumable resource that is currently in use. + InUseQuantity *int64 + + // Indicates whether the resource is available to be re-used after a job + // completes. Can be one of: + // + // - REPLENISHABLE + // + // - NON_REPLENISHABLE + ResourceType *string + + // The tags that you apply to the consumable resource to help you categorize and + // organize your resources. Each tag consists of a key and an optional value. For + // more information, see [Tagging your Batch resources]. + // + // [Tagging your Batch resources]: https://docs.aws.amazon.com/batch/latest/userguide/using-tags.html + Tags map[string]string + + // The total amount of the consumable resource that is available. + TotalQuantity *int64 + // Metadata pertaining to the operation's result. ResultMetadata middleware.Metadata noSmithyDocumentSerde } -func (c *Client) addOperationDeleteMediaCapturePipelineMiddlewares(stack *middleware.Stack, options Options) (err error) { +func (c *Client) addOperationDescribeConsumableResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { return err } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteMediaCapturePipeline{}, middleware.After) + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeConsumableResource{}, middleware.After) if err != nil { return err } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteMediaCapturePipeline{}, middleware.After) + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeConsumableResource{}, middleware.After) if err != nil { return err } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMediaCapturePipeline"); err != nil { + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeConsumableResource"); err != nil { return fmt.Errorf("add protocol finalizers: %v", err) } @@ -119,10 +146,10 @@ func (c *Client) addOperationDeleteMediaCapturePipelineMiddlewares(stack *middle if err = addUserAgentRetryMode(stack, options); err != nil { return err } - if err = addOpDeleteMediaCapturePipelineValidationMiddleware(stack); err != nil { + if err = addOpDescribeConsumableResourceValidationMiddleware(stack); err != nil { return err } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMediaCapturePipeline(options.Region), middleware.Before); err != nil { + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeConsumableResource(options.Region), middleware.Before); err != nil { return err } if err = addRecursionDetection(stack); err != nil { @@ -155,10 +182,10 @@ func (c *Client) addOperationDeleteMediaCapturePipelineMiddlewares(stack *middle return nil } -func newServiceMetadataMiddleware_opDeleteMediaCapturePipeline(region string) *awsmiddleware.RegisterServiceMetadata { +func newServiceMetadataMiddleware_opDescribeConsumableResource(region string) *awsmiddleware.RegisterServiceMetadata { return &awsmiddleware.RegisterServiceMetadata{ Region: region, ServiceID: ServiceID, - OperationName: "DeleteMediaCapturePipeline", + OperationName: "DescribeConsumableResource", } } diff --git a/service/batch/api_op_GetJobQueueSnapshot.go b/service/batch/api_op_GetJobQueueSnapshot.go index 80dfc8a0400..3b2d39575b5 100644 --- a/service/batch/api_op_GetJobQueueSnapshot.go +++ b/service/batch/api_op_GetJobQueueSnapshot.go @@ -41,7 +41,7 @@ type GetJobQueueSnapshotOutput struct { // The list of the first 100 RUNNABLE jobs in each job queue. For // first-in-first-out (FIFO) job queues, jobs are ordered based on their submission - // time. For fair-share scheduling (FSS) job queues, jobs are ordered based on + // time. For fair share scheduling (FSS) job queues, jobs are ordered based on // their job priority and share usage. FrontOfQueue *types.FrontOfQueueDetail diff --git a/service/batch/api_op_ListConsumableResources.go b/service/batch/api_op_ListConsumableResources.go new file mode 100644 index 00000000000..7f7cd08df08 --- /dev/null +++ b/service/batch/api_op_ListConsumableResources.go @@ -0,0 +1,290 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package batch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/batch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of Batch consumable resources. +func (c *Client) ListConsumableResources(ctx context.Context, params *ListConsumableResourcesInput, optFns ...func(*Options)) (*ListConsumableResourcesOutput, error) { + if params == nil { + params = &ListConsumableResourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListConsumableResources", params, optFns, c.addOperationListConsumableResourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListConsumableResourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListConsumableResourcesInput struct { + + // The filters to apply to the consumable resource list query. If used, only those + // consumable resources that match the filter are listed. Filter names and values + // can be: + // + // - name: CONSUMABLE_RESOURCE_NAME + // + // values: case-insensitive matches for the consumable resource name. If a filter + // value ends with an asterisk (*), it matches any consumable resource name that + // begins with the string before the '*'. + Filters []types.KeyValuesPair + + // The maximum number of results returned by ListConsumableResources in paginated + // output. When this parameter is used, ListConsumableResources only returns + // maxResults results in a single page and a nextToken response element. The + // remaining results of the initial request can be seen by sending another + // ListConsumableResources request with the returned nextToken value. This value + // can be between 1 and 100. If this parameter isn't used, then + // ListConsumableResources returns up to 100 results and a nextToken value if + // applicable. + MaxResults *int32 + + // The nextToken value returned from a previous paginated ListConsumableResources + // request where maxResults was used and the results exceeded the value of that + // parameter. Pagination continues from the end of the previous results that + // returned the nextToken value. This value is null when there are no more results + // to return. + // + // Treat this token as an opaque identifier that's only used to retrieve the next + // items in a list and not for other programmatic purposes. + NextToken *string + + noSmithyDocumentSerde +} + +type ListConsumableResourcesOutput struct { + + // A list of consumable resources that match the request. + // + // This member is required. + ConsumableResources []types.ConsumableResourceSummary + + // The nextToken value to include in a future ListConsumableResources request. + // When the results of a ListConsumableResources request exceed maxResults , this + // value can be used to retrieve the next page of results. This value is null when + // there are no more results to return. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListConsumableResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListConsumableResources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListConsumableResources{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListConsumableResources"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListConsumableResources(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListConsumableResourcesPaginatorOptions is the paginator options for +// ListConsumableResources +type ListConsumableResourcesPaginatorOptions struct { + // The maximum number of results returned by ListConsumableResources in paginated + // output. When this parameter is used, ListConsumableResources only returns + // maxResults results in a single page and a nextToken response element. The + // remaining results of the initial request can be seen by sending another + // ListConsumableResources request with the returned nextToken value. This value + // can be between 1 and 100. If this parameter isn't used, then + // ListConsumableResources returns up to 100 results and a nextToken value if + // applicable. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListConsumableResourcesPaginator is a paginator for ListConsumableResources +type ListConsumableResourcesPaginator struct { + options ListConsumableResourcesPaginatorOptions + client ListConsumableResourcesAPIClient + params *ListConsumableResourcesInput + nextToken *string + firstPage bool +} + +// NewListConsumableResourcesPaginator returns a new +// ListConsumableResourcesPaginator +func NewListConsumableResourcesPaginator(client ListConsumableResourcesAPIClient, params *ListConsumableResourcesInput, optFns ...func(*ListConsumableResourcesPaginatorOptions)) *ListConsumableResourcesPaginator { + if params == nil { + params = &ListConsumableResourcesInput{} + } + + options := ListConsumableResourcesPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListConsumableResourcesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListConsumableResourcesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListConsumableResources page. +func (p *ListConsumableResourcesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListConsumableResourcesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListConsumableResources(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListConsumableResourcesAPIClient is a client that implements the +// ListConsumableResources operation. +type ListConsumableResourcesAPIClient interface { + ListConsumableResources(context.Context, *ListConsumableResourcesInput, ...func(*Options)) (*ListConsumableResourcesOutput, error) +} + +var _ ListConsumableResourcesAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListConsumableResources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListConsumableResources", + } +} diff --git a/service/batch/api_op_ListJobsByConsumableResource.go b/service/batch/api_op_ListJobsByConsumableResource.go new file mode 100644 index 00000000000..bdbec76ae0f --- /dev/null +++ b/service/batch/api_op_ListJobsByConsumableResource.go @@ -0,0 +1,303 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package batch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/batch/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Returns a list of Batch jobs that require a specific consumable resource. +func (c *Client) ListJobsByConsumableResource(ctx context.Context, params *ListJobsByConsumableResourceInput, optFns ...func(*Options)) (*ListJobsByConsumableResourceOutput, error) { + if params == nil { + params = &ListJobsByConsumableResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListJobsByConsumableResource", params, optFns, c.addOperationListJobsByConsumableResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListJobsByConsumableResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListJobsByConsumableResourceInput struct { + + // The name or ARN of the consumable resource. + // + // This member is required. + ConsumableResource *string + + // The filters to apply to the job list query. If used, only those jobs requiring + // the specified consumable resource ( consumableResource ) and that match the + // value of the filters are listed. The filter names and values can be: + // + // - name: JOB_STATUS + // + // values: SUBMITTED | PENDING | RUNNABLE | STARTING | RUNNING | SUCCEEDED | FAILED + // + // - name: JOB_NAME + // + // The values are case-insensitive matches for the job name. If a filter value + // ends with an asterisk (*), it matches any job name that begins with the string + // before the '*'. + Filters []types.KeyValuesPair + + // The maximum number of results returned by ListJobsByConsumableResource in + // paginated output. When this parameter is used, ListJobsByConsumableResource + // only returns maxResults results in a single page and a nextToken response + // element. The remaining results of the initial request can be seen by sending + // another ListJobsByConsumableResource request with the returned nextToken value. + // This value can be between 1 and 100. If this parameter isn't used, then + // ListJobsByConsumableResource returns up to 100 results and a nextToken value if + // applicable. + MaxResults *int32 + + // The nextToken value returned from a previous paginated + // ListJobsByConsumableResource request where maxResults was used and the results + // exceeded the value of that parameter. Pagination continues from the end of the + // previous results that returned the nextToken value. This value is null when + // there are no more results to return. + // + // Treat this token as an opaque identifier that's only used to retrieve the next + // items in a list and not for other programmatic purposes. + NextToken *string + + noSmithyDocumentSerde +} + +type ListJobsByConsumableResourceOutput struct { + + // The list of jobs that require the specified consumable resources. + // + // This member is required. + Jobs []types.ListJobsByConsumableResourceSummary + + // The nextToken value to include in a future ListJobsByConsumableResource + // request. When the results of a ListJobsByConsumableResource request exceed + // maxResults , this value can be used to retrieve the next page of results. This + // value is null when there are no more results to return. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListJobsByConsumableResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListJobsByConsumableResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListJobsByConsumableResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListJobsByConsumableResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpListJobsByConsumableResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListJobsByConsumableResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +// ListJobsByConsumableResourcePaginatorOptions is the paginator options for +// ListJobsByConsumableResource +type ListJobsByConsumableResourcePaginatorOptions struct { + // The maximum number of results returned by ListJobsByConsumableResource in + // paginated output. When this parameter is used, ListJobsByConsumableResource + // only returns maxResults results in a single page and a nextToken response + // element. The remaining results of the initial request can be seen by sending + // another ListJobsByConsumableResource request with the returned nextToken value. + // This value can be between 1 and 100. If this parameter isn't used, then + // ListJobsByConsumableResource returns up to 100 results and a nextToken value if + // applicable. + Limit int32 + + // Set to true if pagination should stop if the service returns a pagination token + // that matches the most recent token provided to the service. + StopOnDuplicateToken bool +} + +// ListJobsByConsumableResourcePaginator is a paginator for +// ListJobsByConsumableResource +type ListJobsByConsumableResourcePaginator struct { + options ListJobsByConsumableResourcePaginatorOptions + client ListJobsByConsumableResourceAPIClient + params *ListJobsByConsumableResourceInput + nextToken *string + firstPage bool +} + +// NewListJobsByConsumableResourcePaginator returns a new +// ListJobsByConsumableResourcePaginator +func NewListJobsByConsumableResourcePaginator(client ListJobsByConsumableResourceAPIClient, params *ListJobsByConsumableResourceInput, optFns ...func(*ListJobsByConsumableResourcePaginatorOptions)) *ListJobsByConsumableResourcePaginator { + if params == nil { + params = &ListJobsByConsumableResourceInput{} + } + + options := ListJobsByConsumableResourcePaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListJobsByConsumableResourcePaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListJobsByConsumableResourcePaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListJobsByConsumableResource page. +func (p *ListJobsByConsumableResourcePaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListJobsByConsumableResourceOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListJobsByConsumableResource(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +// ListJobsByConsumableResourceAPIClient is a client that implements the +// ListJobsByConsumableResource operation. +type ListJobsByConsumableResourceAPIClient interface { + ListJobsByConsumableResource(context.Context, *ListJobsByConsumableResourceInput, ...func(*Options)) (*ListJobsByConsumableResourceOutput, error) +} + +var _ ListJobsByConsumableResourceAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListJobsByConsumableResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListJobsByConsumableResource", + } +} diff --git a/service/batch/api_op_RegisterJobDefinition.go b/service/batch/api_op_RegisterJobDefinition.go index a63c454b600..a09a99cc5a2 100644 --- a/service/batch/api_op_RegisterJobDefinition.go +++ b/service/batch/api_op_RegisterJobDefinition.go @@ -52,6 +52,9 @@ type RegisterJobDefinitionInput struct { // This member is required. Type types.JobDefinitionType + // Contains a list of consumable resources required by the job. + ConsumableResourceProperties *types.ConsumableResourceProperties + // An object with properties specific to Amazon ECS-based single-node // container-based jobs. If the job definition's type parameter is container , then // you must specify either containerProperties or nodeProperties . This must not be @@ -113,7 +116,7 @@ type RegisterJobDefinitionInput struct { RetryStrategy *types.RetryStrategy // The scheduling priority for jobs that are submitted with this job definition. - // This only affects jobs in job queues with a fair-share policy. Jobs with a + // This only affects jobs in job queues with a fair share policy. Jobs with a // higher scheduling priority are scheduled before jobs with a lower scheduling // priority. // diff --git a/service/batch/api_op_SubmitJob.go b/service/batch/api_op_SubmitJob.go index 38c9b01ff46..dd43c644a07 100644 --- a/service/batch/api_op_SubmitJob.go +++ b/service/batch/api_op_SubmitJob.go @@ -19,8 +19,8 @@ import ( // parameters in a resourceRequirements object that's included in the // containerOverrides parameter. // -// Job queues with a scheduling policy are limited to 500 active share identifiers -// at a time. +// Job queues with a scheduling policy are limited to 500 active fair share +// identifiers at a time. // // Jobs that run on Fargate resources can't be guaranteed to run for more than 14 // days. This is because, after 14 days, Fargate resources might become unavailable @@ -74,6 +74,9 @@ type SubmitJobInput struct { // [Array Jobs]: https://docs.aws.amazon.com/batch/latest/userguide/array_jobs.html ArrayProperties *types.ArrayProperties + // An object that contains overrides for the consumable resources of a job. + ConsumableResourcePropertiesOverride *types.ConsumableResourceProperties + // An object with properties that override the defaults for the job definition // that specify the name of a container in the specified job definition and the // overrides it should receive. You can override the default command for a @@ -126,7 +129,7 @@ type SubmitJobInput struct { RetryStrategy *types.RetryStrategy // The scheduling priority for the job. This only affects jobs in job queues with - // a fair-share policy. Jobs with a higher scheduling priority are scheduled before + // a fair share policy. Jobs with a higher scheduling priority are scheduled before // jobs with a lower scheduling priority. This overrides any scheduling priority in // the job definition and works only within a single share identifier. // @@ -134,8 +137,8 @@ type SubmitJobInput struct { SchedulingPriorityOverride *int32 // The share identifier for the job. Don't specify this parameter if the job queue - // doesn't have a fair-share scheduling policy. If the job queue has a fair-share - // scheduling policy, then this parameter must be specified. + // doesn't have a scheduling policy. If the job queue has a scheduling policy, then + // this parameter must be specified. // // This string is limited to 255 alphanumeric characters, and can be followed by // an asterisk (*). diff --git a/service/batch/api_op_UpdateComputeEnvironment.go b/service/batch/api_op_UpdateComputeEnvironment.go index 435567d5cbf..ae2a968af4b 100644 --- a/service/batch/api_op_UpdateComputeEnvironment.go +++ b/service/batch/api_op_UpdateComputeEnvironment.go @@ -98,8 +98,8 @@ type UpdateComputeEnvironmentInput struct { // The maximum number of vCPUs expected to be used for an unmanaged compute // environment. Don't specify this parameter for a managed compute environment. - // This parameter is only used for fair-share scheduling to reserve vCPU capacity - // for new share identifiers. If this parameter isn't provided for a fair-share job + // This parameter is only used for fair share scheduling to reserve vCPU capacity + // for new share identifiers. If this parameter isn't provided for a fair share job // queue, no vCPU capacity is reserved. UnmanagedvCpus *int32 diff --git a/service/batch/api_op_UpdateConsumableResource.go b/service/batch/api_op_UpdateConsumableResource.go new file mode 100644 index 00000000000..c8b39d1264c --- /dev/null +++ b/service/batch/api_op_UpdateConsumableResource.go @@ -0,0 +1,233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package batch + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates a consumable resource. +func (c *Client) UpdateConsumableResource(ctx context.Context, params *UpdateConsumableResourceInput, optFns ...func(*Options)) (*UpdateConsumableResourceOutput, error) { + if params == nil { + params = &UpdateConsumableResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateConsumableResource", params, optFns, c.addOperationUpdateConsumableResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateConsumableResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateConsumableResourceInput struct { + + // The name or ARN of the consumable resource to be updated. + // + // This member is required. + ConsumableResource *string + + // If this parameter is specified and two update requests with identical payloads + // and clientToken s are received, these requests are considered the same request + // and the second request is rejected. A clientToken is valid for 8 hours or until + // one hour after the consumable resource is deleted, whichever is less. + ClientToken *string + + // Indicates how the quantity of the consumable resource will be updated. Must be + // one of: + // + // - SET + // + // Sets the quantity of the resource to the value specified by the quantity + // parameter. + // + // - ADD + // + // Increases the quantity of the resource by the value specified by the quantity + // parameter. + // + // - REMOVE + // + // Reduces the quantity of the resource by the value specified by the quantity + // parameter. + Operation *string + + // The change in the total quantity of the consumable resource. The operation + // parameter determines whether the value specified here will be the new total + // quantity, or the amount by which the total quantity will be increased or + // reduced. Must be a non-negative value. + Quantity *int64 + + noSmithyDocumentSerde +} + +type UpdateConsumableResourceOutput struct { + + // The Amazon Resource Name (ARN) of the consumable resource. + // + // This member is required. + ConsumableResourceArn *string + + // The name of the consumable resource to be updated. + // + // This member is required. + ConsumableResourceName *string + + // The total amount of the consumable resource that is available. + TotalQuantity *int64 + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateConsumableResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateConsumableResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateConsumableResource{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateConsumableResource"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addSpanRetryLoop(stack, options); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addIdempotencyToken_opUpdateConsumableResourceMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateConsumableResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateConsumableResource(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + if err = addSpanInitializeStart(stack); err != nil { + return err + } + if err = addSpanInitializeEnd(stack); err != nil { + return err + } + if err = addSpanBuildRequestStart(stack); err != nil { + return err + } + if err = addSpanBuildRequestEnd(stack); err != nil { + return err + } + return nil +} + +type idempotencyToken_initializeOpUpdateConsumableResource struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpUpdateConsumableResource) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpUpdateConsumableResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*UpdateConsumableResourceInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *UpdateConsumableResourceInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opUpdateConsumableResourceMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpUpdateConsumableResource{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opUpdateConsumableResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateConsumableResource", + } +} diff --git a/service/batch/api_op_UpdateJobQueue.go b/service/batch/api_op_UpdateJobQueue.go index 7fb1415dc0c..ef2b3e6bcaf 100644 --- a/service/batch/api_op_UpdateJobQueue.go +++ b/service/batch/api_op_UpdateJobQueue.go @@ -62,8 +62,8 @@ type UpdateJobQueueInput struct { // FARGATE_SPOT ). EC2 and Fargate compute environments can't be mixed. Priority *int32 - // Amazon Resource Name (ARN) of the fair-share scheduling policy. Once a job - // queue is created, the fair-share scheduling policy can be replaced but not + // Amazon Resource Name (ARN) of the fair share scheduling policy. Once a job + // queue is created, the fair share scheduling policy can be replaced but not // removed. The format is // aws:Partition:batch:Region:Account:scheduling-policy/Name . For example, // aws:aws:batch:us-west-2:123456789012:scheduling-policy/MySchedulingPolicy . diff --git a/service/batch/api_op_UpdateSchedulingPolicy.go b/service/batch/api_op_UpdateSchedulingPolicy.go index 991672b4064..846791b1f09 100644 --- a/service/batch/api_op_UpdateSchedulingPolicy.go +++ b/service/batch/api_op_UpdateSchedulingPolicy.go @@ -35,7 +35,7 @@ type UpdateSchedulingPolicyInput struct { // This member is required. Arn *string - // The fair-share policy scheduling details. + // The fair share policy. FairsharePolicy *types.FairsharePolicy noSmithyDocumentSerde diff --git a/service/batch/deserializers.go b/service/batch/deserializers.go index 0fa4061b177..657ed78c8d5 100644 --- a/service/batch/deserializers.go +++ b/service/batch/deserializers.go @@ -289,6 +289,174 @@ func awsRestjson1_deserializeOpDocumentCreateComputeEnvironmentOutput(v **Create return nil } +type awsRestjson1_deserializeOpCreateConsumableResource struct { +} + +func (*awsRestjson1_deserializeOpCreateConsumableResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateConsumableResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorCreateConsumableResource(response, &metadata) + } + output := &CreateConsumableResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentCreateConsumableResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorCreateConsumableResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentCreateConsumableResourceOutput(v **CreateConsumableResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateConsumableResourceOutput + if *v == nil { + sv = &CreateConsumableResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "consumableResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConsumableResourceArn = ptr.String(jtv) + } + + case "consumableResourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConsumableResourceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateJobQueue struct { } @@ -716,6 +884,97 @@ func awsRestjson1_deserializeOpErrorDeleteComputeEnvironment(response *smithyhtt } } +type awsRestjson1_deserializeOpDeleteConsumableResource struct { +} + +func (*awsRestjson1_deserializeOpDeleteConsumableResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteConsumableResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDeleteConsumableResource(response, &metadata) + } + output := &DeleteConsumableResourceOutput{} + out.Result = output + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDeleteConsumableResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDeleteJobQueue struct { } @@ -1153,14 +1412,14 @@ func awsRestjson1_deserializeOpDocumentDescribeComputeEnvironmentsOutput(v **Des return nil } -type awsRestjson1_deserializeOpDescribeJobDefinitions struct { +type awsRestjson1_deserializeOpDescribeConsumableResource struct { } -func (*awsRestjson1_deserializeOpDescribeJobDefinitions) ID() string { +func (*awsRestjson1_deserializeOpDescribeConsumableResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeJobDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeConsumableResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1178,9 +1437,9 @@ func (m *awsRestjson1_deserializeOpDescribeJobDefinitions) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeJobDefinitions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeConsumableResource(response, &metadata) } - output := &DescribeJobDefinitionsOutput{} + output := &DescribeConsumableResourceOutput{} out.Result = output var buff [1024]byte @@ -1201,7 +1460,7 @@ func (m *awsRestjson1_deserializeOpDescribeJobDefinitions) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeJobDefinitionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeConsumableResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1215,7 +1474,7 @@ func (m *awsRestjson1_deserializeOpDescribeJobDefinitions) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeJobDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeConsumableResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1272,7 +1531,7 @@ func awsRestjson1_deserializeOpErrorDescribeJobDefinitions(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentDescribeJobDefinitionsOutput(v **DescribeJobDefinitionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeConsumableResourceOutput(v **DescribeConsumableResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1285,23 +1544,257 @@ func awsRestjson1_deserializeOpDocumentDescribeJobDefinitionsOutput(v **Describe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeJobDefinitionsOutput + var sv *DescribeConsumableResourceOutput if *v == nil { - sv = &DescribeJobDefinitionsOutput{} + sv = &DescribeConsumableResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobDefinitions": - if err := awsRestjson1_deserializeDocumentJobDefinitionList(&sv.JobDefinitions, value); err != nil { - return err - } - - case "nextToken": + case "availableQuantity": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AvailableQuantity = ptr.Int64(i64) + } + + case "consumableResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConsumableResourceArn = ptr.String(jtv) + } + + case "consumableResourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConsumableResourceName = ptr.String(jtv) + } + + case "createdAt": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Int64(i64) + } + + case "inUseQuantity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InUseQuantity = ptr.Int64(i64) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagrisTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "totalQuantity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalQuantity = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeJobDefinitions struct { +} + +func (*awsRestjson1_deserializeOpDescribeJobDefinitions) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeJobDefinitions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeJobDefinitions(response, &metadata) + } + output := &DescribeJobDefinitionsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeJobDefinitionsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeJobDefinitions(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeJobDefinitionsOutput(v **DescribeJobDefinitionsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeJobDefinitionsOutput + if *v == nil { + sv = &DescribeJobDefinitionsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobDefinitions": + if err := awsRestjson1_deserializeDocumentJobDefinitionList(&sv.JobDefinitions, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } @@ -1508,7 +2001,317 @@ func (m *awsRestjson1_deserializeOpDescribeJobs) HandleDeserialize(ctx context.C if response.StatusCode < 200 || response.StatusCode >= 300 { return out, metadata, awsRestjson1_deserializeOpErrorDescribeJobs(response, &metadata) } - output := &DescribeJobsOutput{} + output := &DescribeJobsOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeJobsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeJobsOutput(v **DescribeJobsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeJobsOutput + if *v == nil { + sv = &DescribeJobsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "jobs": + if err := awsRestjson1_deserializeDocumentJobDetailList(&sv.Jobs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDescribeSchedulingPolicies struct { +} + +func (*awsRestjson1_deserializeOpDescribeSchedulingPolicies) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDescribeSchedulingPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorDescribeSchedulingPolicies(response, &metadata) + } + output := &DescribeSchedulingPoliciesOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentDescribeSchedulingPoliciesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorDescribeSchedulingPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentDescribeSchedulingPoliciesOutput(v **DescribeSchedulingPoliciesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DescribeSchedulingPoliciesOutput + if *v == nil { + sv = &DescribeSchedulingPoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "schedulingPolicies": + if err := awsRestjson1_deserializeDocumentSchedulingPolicyDetailList(&sv.SchedulingPolicies, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetJobQueueSnapshot struct { +} + +func (*awsRestjson1_deserializeOpGetJobQueueSnapshot) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetJobQueueSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorGetJobQueueSnapshot(response, &metadata) + } + output := &GetJobQueueSnapshotOutput{} out.Result = output var buff [1024]byte @@ -1529,7 +2332,7 @@ func (m *awsRestjson1_deserializeOpDescribeJobs) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetJobQueueSnapshotOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1543,7 +2346,7 @@ func (m *awsRestjson1_deserializeOpDescribeJobs) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetJobQueueSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1600,7 +2403,7 @@ func awsRestjson1_deserializeOpErrorDescribeJobs(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDescribeJobsOutput(v **DescribeJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetJobQueueSnapshotOutput(v **GetJobQueueSnapshotOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1613,17 +2416,17 @@ func awsRestjson1_deserializeOpDocumentDescribeJobsOutput(v **DescribeJobsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeJobsOutput + var sv *GetJobQueueSnapshotOutput if *v == nil { - sv = &DescribeJobsOutput{} + sv = &GetJobQueueSnapshotOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobs": - if err := awsRestjson1_deserializeDocumentJobDetailList(&sv.Jobs, value); err != nil { + case "frontOfQueue": + if err := awsRestjson1_deserializeDocumentFrontOfQueueDetail(&sv.FrontOfQueue, value); err != nil { return err } @@ -1636,14 +2439,14 @@ func awsRestjson1_deserializeOpDocumentDescribeJobsOutput(v **DescribeJobsOutput return nil } -type awsRestjson1_deserializeOpDescribeSchedulingPolicies struct { +type awsRestjson1_deserializeOpListConsumableResources struct { } -func (*awsRestjson1_deserializeOpDescribeSchedulingPolicies) ID() string { +func (*awsRestjson1_deserializeOpListConsumableResources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeSchedulingPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListConsumableResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1661,9 +2464,9 @@ func (m *awsRestjson1_deserializeOpDescribeSchedulingPolicies) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeSchedulingPolicies(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListConsumableResources(response, &metadata) } - output := &DescribeSchedulingPoliciesOutput{} + output := &ListConsumableResourcesOutput{} out.Result = output var buff [1024]byte @@ -1684,7 +2487,7 @@ func (m *awsRestjson1_deserializeOpDescribeSchedulingPolicies) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeSchedulingPoliciesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListConsumableResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1698,7 +2501,7 @@ func (m *awsRestjson1_deserializeOpDescribeSchedulingPolicies) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeSchedulingPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListConsumableResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1755,7 +2558,7 @@ func awsRestjson1_deserializeOpErrorDescribeSchedulingPolicies(response *smithyh } } -func awsRestjson1_deserializeOpDocumentDescribeSchedulingPoliciesOutput(v **DescribeSchedulingPoliciesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListConsumableResourcesOutput(v **ListConsumableResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1768,20 +2571,29 @@ func awsRestjson1_deserializeOpDocumentDescribeSchedulingPoliciesOutput(v **Desc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeSchedulingPoliciesOutput + var sv *ListConsumableResourcesOutput if *v == nil { - sv = &DescribeSchedulingPoliciesOutput{} + sv = &ListConsumableResourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "schedulingPolicies": - if err := awsRestjson1_deserializeDocumentSchedulingPolicyDetailList(&sv.SchedulingPolicies, value); err != nil { + case "consumableResources": + if err := awsRestjson1_deserializeDocumentConsumableResourceSummaryList(&sv.ConsumableResources, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -1791,14 +2603,14 @@ func awsRestjson1_deserializeOpDocumentDescribeSchedulingPoliciesOutput(v **Desc return nil } -type awsRestjson1_deserializeOpGetJobQueueSnapshot struct { +type awsRestjson1_deserializeOpListJobs struct { } -func (*awsRestjson1_deserializeOpGetJobQueueSnapshot) ID() string { +func (*awsRestjson1_deserializeOpListJobs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetJobQueueSnapshot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1816,9 +2628,9 @@ func (m *awsRestjson1_deserializeOpGetJobQueueSnapshot) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetJobQueueSnapshot(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListJobs(response, &metadata) } - output := &GetJobQueueSnapshotOutput{} + output := &ListJobsOutput{} out.Result = output var buff [1024]byte @@ -1839,7 +2651,7 @@ func (m *awsRestjson1_deserializeOpGetJobQueueSnapshot) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetJobQueueSnapshotOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListJobsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1853,7 +2665,7 @@ func (m *awsRestjson1_deserializeOpGetJobQueueSnapshot) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetJobQueueSnapshot(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1910,7 +2722,7 @@ func awsRestjson1_deserializeOpErrorGetJobQueueSnapshot(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentGetJobQueueSnapshotOutput(v **GetJobQueueSnapshotOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListJobsOutput(v **ListJobsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1923,20 +2735,29 @@ func awsRestjson1_deserializeOpDocumentGetJobQueueSnapshotOutput(v **GetJobQueue return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetJobQueueSnapshotOutput + var sv *ListJobsOutput if *v == nil { - sv = &GetJobQueueSnapshotOutput{} + sv = &ListJobsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "frontOfQueue": - if err := awsRestjson1_deserializeDocumentFrontOfQueueDetail(&sv.FrontOfQueue, value); err != nil { + case "jobSummaryList": + if err := awsRestjson1_deserializeDocumentJobSummaryList(&sv.JobSummaryList, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -1946,14 +2767,14 @@ func awsRestjson1_deserializeOpDocumentGetJobQueueSnapshotOutput(v **GetJobQueue return nil } -type awsRestjson1_deserializeOpListJobs struct { +type awsRestjson1_deserializeOpListJobsByConsumableResource struct { } -func (*awsRestjson1_deserializeOpListJobs) ID() string { +func (*awsRestjson1_deserializeOpListJobsByConsumableResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListJobs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListJobsByConsumableResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1971,9 +2792,9 @@ func (m *awsRestjson1_deserializeOpListJobs) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListJobs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListJobsByConsumableResource(response, &metadata) } - output := &ListJobsOutput{} + output := &ListJobsByConsumableResourceOutput{} out.Result = output var buff [1024]byte @@ -1994,7 +2815,7 @@ func (m *awsRestjson1_deserializeOpListJobs) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListJobsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListJobsByConsumableResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2008,7 +2829,7 @@ func (m *awsRestjson1_deserializeOpListJobs) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListJobs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListJobsByConsumableResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2065,7 +2886,7 @@ func awsRestjson1_deserializeOpErrorListJobs(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentListJobsOutput(v **ListJobsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListJobsByConsumableResourceOutput(v **ListJobsByConsumableResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2078,17 +2899,17 @@ func awsRestjson1_deserializeOpDocumentListJobsOutput(v **ListJobsOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListJobsOutput + var sv *ListJobsByConsumableResourceOutput if *v == nil { - sv = &ListJobsOutput{} + sv = &ListJobsByConsumableResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "jobSummaryList": - if err := awsRestjson1_deserializeDocumentJobSummaryList(&sv.JobSummaryList, value); err != nil { + case "jobs": + if err := awsRestjson1_deserializeDocumentListJobsByConsumableResourceSummaryList(&sv.Jobs, value); err != nil { return err } @@ -3047,27 +3868,195 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("ClientException", errorCode): return awsRestjson1_deserializeErrorClientException(response, errorBody) - case strings.EqualFold("ServerException", errorCode): - return awsRestjson1_deserializeErrorServerException(response, errorBody) + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateComputeEnvironment struct { +} + +func (*awsRestjson1_deserializeOpUpdateComputeEnvironment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateComputeEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateComputeEnvironment(response, &metadata) + } + output := &UpdateComputeEnvironmentOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateComputeEnvironmentOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateComputeEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ClientException", errorCode): + return awsRestjson1_deserializeErrorClientException(response, errorBody) + + case strings.EqualFold("ServerException", errorCode): + return awsRestjson1_deserializeErrorServerException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateComputeEnvironmentOutput(v **UpdateComputeEnvironmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateComputeEnvironmentOutput + if *v == nil { + sv = &UpdateComputeEnvironmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "computeEnvironmentArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ComputeEnvironmentArn = ptr.String(jtv) + } + + case "computeEnvironmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ComputeEnvironmentName = ptr.String(jtv) + } + + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpUpdateComputeEnvironment struct { +type awsRestjson1_deserializeOpUpdateConsumableResource struct { } -func (*awsRestjson1_deserializeOpUpdateComputeEnvironment) ID() string { +func (*awsRestjson1_deserializeOpUpdateConsumableResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateComputeEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateConsumableResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3085,9 +4074,9 @@ func (m *awsRestjson1_deserializeOpUpdateComputeEnvironment) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateComputeEnvironment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateConsumableResource(response, &metadata) } - output := &UpdateComputeEnvironmentOutput{} + output := &UpdateConsumableResourceOutput{} out.Result = output var buff [1024]byte @@ -3108,7 +4097,7 @@ func (m *awsRestjson1_deserializeOpUpdateComputeEnvironment) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateComputeEnvironmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateConsumableResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3122,7 +4111,7 @@ func (m *awsRestjson1_deserializeOpUpdateComputeEnvironment) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateComputeEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateConsumableResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3179,7 +4168,7 @@ func awsRestjson1_deserializeOpErrorUpdateComputeEnvironment(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentUpdateComputeEnvironmentOutput(v **UpdateComputeEnvironmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateConsumableResourceOutput(v **UpdateConsumableResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3192,31 +4181,44 @@ func awsRestjson1_deserializeOpDocumentUpdateComputeEnvironmentOutput(v **Update return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateComputeEnvironmentOutput + var sv *UpdateConsumableResourceOutput if *v == nil { - sv = &UpdateComputeEnvironmentOutput{} + sv = &UpdateConsumableResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "computeEnvironmentArn": + case "consumableResourceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ComputeEnvironmentArn = ptr.String(jtv) + sv.ConsumableResourceArn = ptr.String(jtv) } - case "computeEnvironmentName": + case "consumableResourceName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ComputeEnvironmentName = ptr.String(jtv) + sv.ConsumableResourceName = ptr.String(jtv) + } + + case "totalQuantity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalQuantity = ptr.Int64(i64) } default: @@ -4453,85 +5455,292 @@ func awsRestjson1_deserializeDocumentComputeResource(v **types.ComputeResource, if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.InstanceRole = ptr.String(jtv) - } - - case "instanceTypes": - if err := awsRestjson1_deserializeDocumentStringList(&sv.InstanceTypes, value); err != nil { - return err - } - - case "launchTemplate": - if err := awsRestjson1_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplate, value); err != nil { - return err + sv.InstanceRole = ptr.String(jtv) + } + + case "instanceTypes": + if err := awsRestjson1_deserializeDocumentStringList(&sv.InstanceTypes, value); err != nil { + return err + } + + case "launchTemplate": + if err := awsRestjson1_deserializeDocumentLaunchTemplateSpecification(&sv.LaunchTemplate, value); err != nil { + return err + } + + case "maxvCpus": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxvCpus = ptr.Int32(int32(i64)) + } + + case "minvCpus": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MinvCpus = ptr.Int32(int32(i64)) + } + + case "placementGroup": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PlacementGroup = ptr.String(jtv) + } + + case "securityGroupIds": + if err := awsRestjson1_deserializeDocumentStringList(&sv.SecurityGroupIds, value); err != nil { + return err + } + + case "spotIamFleetRole": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.SpotIamFleetRole = ptr.String(jtv) + } + + case "subnets": + if err := awsRestjson1_deserializeDocumentStringList(&sv.Subnets, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CRType to be of type string, got %T instead", value) + } + sv.Type = types.CRType(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConsumableResourceList(v *[]types.ConsumableResourceRequirement, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ConsumableResourceRequirement + if *v == nil { + cv = []types.ConsumableResourceRequirement{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConsumableResourceRequirement + destAddr := &col + if err := awsRestjson1_deserializeDocumentConsumableResourceRequirement(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConsumableResourceProperties(v **types.ConsumableResourceProperties, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConsumableResourceProperties + if *v == nil { + sv = &types.ConsumableResourceProperties{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "consumableResourceList": + if err := awsRestjson1_deserializeDocumentConsumableResourceList(&sv.ConsumableResourceList, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConsumableResourceRequirement(v **types.ConsumableResourceRequirement, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConsumableResourceRequirement + if *v == nil { + sv = &types.ConsumableResourceRequirement{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "consumableResource": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConsumableResource = ptr.String(jtv) + } + + case "quantity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Quantity = ptr.Int64(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConsumableResourceSummary(v **types.ConsumableResourceSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConsumableResourceSummary + if *v == nil { + sv = &types.ConsumableResourceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "consumableResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ConsumableResourceArn = ptr.String(jtv) } - case "maxvCpus": + case "consumableResourceName": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.MaxvCpus = ptr.Int32(int32(i64)) + sv.ConsumableResourceName = ptr.String(jtv) } - case "minvCpus": + case "inUseQuantity": if value != nil { jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) } i64, err := jtv.Int64() if err != nil { return err } - sv.MinvCpus = ptr.Int32(int32(i64)) + sv.InUseQuantity = ptr.Int64(i64) } - case "placementGroup": + case "resourceType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.PlacementGroup = ptr.String(jtv) - } - - case "securityGroupIds": - if err := awsRestjson1_deserializeDocumentStringList(&sv.SecurityGroupIds, value); err != nil { - return err + sv.ResourceType = ptr.String(jtv) } - case "spotIamFleetRole": + case "totalQuantity": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) } - sv.SpotIamFleetRole = ptr.String(jtv) - } - - case "subnets": - if err := awsRestjson1_deserializeDocumentStringList(&sv.Subnets, value); err != nil { - return err - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { - return err - } - - case "type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CRType to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.Type = types.CRType(jtv) + sv.TotalQuantity = ptr.Int64(i64) } default: @@ -4543,6 +5752,40 @@ func awsRestjson1_deserializeDocumentComputeResource(v **types.ComputeResource, return nil } +func awsRestjson1_deserializeDocumentConsumableResourceSummaryList(v *[]types.ConsumableResourceSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ConsumableResourceSummary + if *v == nil { + cv = []types.ConsumableResourceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ConsumableResourceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentConsumableResourceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentContainerDetail(v **types.ContainerDetail, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7849,6 +9092,11 @@ func awsRestjson1_deserializeDocumentJobDefinition(v **types.JobDefinition, valu for key, value := range shape { switch key { + case "consumableResourceProperties": + if err := awsRestjson1_deserializeDocumentConsumableResourceProperties(&sv.ConsumableResourceProperties, value); err != nil { + return err + } + case "containerOrchestrationType": if value != nil { jtv, ok := value.(string) @@ -8132,6 +9380,11 @@ func awsRestjson1_deserializeDocumentJobDetail(v **types.JobDetail, value interf return err } + case "consumableResourceProperties": + if err := awsRestjson1_deserializeDocumentConsumableResourceProperties(&sv.ConsumableResourceProperties, value); err != nil { + return err + } + case "container": if err := awsRestjson1_deserializeDocumentContainerDetail(&sv.Container, value); err != nil { return err @@ -9289,6 +10542,178 @@ func awsRestjson1_deserializeDocumentListEcsTaskProperties(v *[]types.EcsTaskPro return nil } +func awsRestjson1_deserializeDocumentListJobsByConsumableResourceSummary(v **types.ListJobsByConsumableResourceSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ListJobsByConsumableResourceSummary + if *v == nil { + sv = &types.ListJobsByConsumableResourceSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "consumableResourceProperties": + if err := awsRestjson1_deserializeDocumentConsumableResourceProperties(&sv.ConsumableResourceProperties, value); err != nil { + return err + } + + case "createdAt": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CreatedAt = ptr.Int64(i64) + } + + case "jobArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.JobArn = ptr.String(jtv) + } + + case "jobDefinitionArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.JobDefinitionArn = ptr.String(jtv) + } + + case "jobName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.JobName = ptr.String(jtv) + } + + case "jobQueueArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.JobQueueArn = ptr.String(jtv) + } + + case "jobStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.JobStatus = ptr.String(jtv) + } + + case "quantity": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Quantity = ptr.Int64(i64) + } + + case "shareIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ShareIdentifier = ptr.String(jtv) + } + + case "startedAt": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Long to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.StartedAt = ptr.Int64(i64) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentListJobsByConsumableResourceSummaryList(v *[]types.ListJobsByConsumableResourceSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.ListJobsByConsumableResourceSummary + if *v == nil { + cv = []types.ListJobsByConsumableResourceSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListJobsByConsumableResourceSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentListJobsByConsumableResourceSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentListTaskContainerDetails(v *[]types.TaskContainerDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -9904,6 +11329,11 @@ func awsRestjson1_deserializeDocumentNodeRangeProperty(v **types.NodeRangeProper for key, value := range shape { switch key { + case "consumableResourceProperties": + if err := awsRestjson1_deserializeDocumentConsumableResourceProperties(&sv.ConsumableResourceProperties, value); err != nil { + return err + } + case "container": if err := awsRestjson1_deserializeDocumentContainerProperties(&sv.Container, value); err != nil { return err diff --git a/service/batch/generated.json b/service/batch/generated.json index c4f4aa31b93..c28c218d5bf 100644 --- a/service/batch/generated.json +++ b/service/batch/generated.json @@ -10,19 +10,24 @@ "api_client_test.go", "api_op_CancelJob.go", "api_op_CreateComputeEnvironment.go", + "api_op_CreateConsumableResource.go", "api_op_CreateJobQueue.go", "api_op_CreateSchedulingPolicy.go", "api_op_DeleteComputeEnvironment.go", + "api_op_DeleteConsumableResource.go", "api_op_DeleteJobQueue.go", "api_op_DeleteSchedulingPolicy.go", "api_op_DeregisterJobDefinition.go", "api_op_DescribeComputeEnvironments.go", + "api_op_DescribeConsumableResource.go", "api_op_DescribeJobDefinitions.go", "api_op_DescribeJobQueues.go", "api_op_DescribeJobs.go", "api_op_DescribeSchedulingPolicies.go", "api_op_GetJobQueueSnapshot.go", + "api_op_ListConsumableResources.go", "api_op_ListJobs.go", + "api_op_ListJobsByConsumableResource.go", "api_op_ListSchedulingPolicies.go", "api_op_ListTagsForResource.go", "api_op_RegisterJobDefinition.go", @@ -31,6 +36,7 @@ "api_op_TerminateJob.go", "api_op_UntagResource.go", "api_op_UpdateComputeEnvironment.go", + "api_op_UpdateConsumableResource.go", "api_op_UpdateJobQueue.go", "api_op_UpdateSchedulingPolicy.go", "auth.go", diff --git a/service/batch/options.go b/service/batch/options.go index edd6671d582..86749edb721 100644 --- a/service/batch/options.go +++ b/service/batch/options.go @@ -65,6 +65,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger diff --git a/service/batch/serializers.go b/service/batch/serializers.go index aa96a28b63e..97984d3f83c 100644 --- a/service/batch/serializers.go +++ b/service/batch/serializers.go @@ -229,6 +229,104 @@ func awsRestjson1_serializeOpDocumentCreateComputeEnvironmentInput(v *CreateComp return nil } +type awsRestjson1_serializeOpCreateConsumableResource struct { +} + +func (*awsRestjson1_serializeOpCreateConsumableResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateConsumableResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*CreateConsumableResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/createconsumableresource") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateConsumableResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateConsumableResourceInput(v *CreateConsumableResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateConsumableResourceInput(v *CreateConsumableResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumableResourceName != nil { + ok := object.Key("consumableResourceName") + ok.String(*v.ConsumableResourceName) + } + + if v.ResourceType != nil { + ok := object.Key("resourceType") + ok.String(*v.ResourceType) + } + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagrisTagsMap(v.Tags, ok); err != nil { + return err + } + } + + if v.TotalQuantity != nil { + ok := object.Key("totalQuantity") + ok.Long(*v.TotalQuantity) + } + + return nil +} + type awsRestjson1_serializeOpCreateJobQueue struct { } @@ -522,6 +620,87 @@ func awsRestjson1_serializeOpDocumentDeleteComputeEnvironmentInput(v *DeleteComp return nil } +type awsRestjson1_serializeOpDeleteConsumableResource struct { +} + +func (*awsRestjson1_serializeOpDeleteConsumableResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteConsumableResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DeleteConsumableResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/deleteconsumableresource") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDeleteConsumableResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDeleteConsumableResourceInput(v *DeleteConsumableResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDeleteConsumableResourceInput(v *DeleteConsumableResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumableResource != nil { + ok := object.Key("consumableResource") + ok.String(*v.ConsumableResource) + } + + return nil +} + type awsRestjson1_serializeOpDeleteJobQueue struct { } @@ -858,6 +1037,87 @@ func awsRestjson1_serializeOpDocumentDescribeComputeEnvironmentsInput(v *Describ return nil } +type awsRestjson1_serializeOpDescribeConsumableResource struct { +} + +func (*awsRestjson1_serializeOpDescribeConsumableResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeConsumableResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeConsumableResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/describeconsumableresource") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDescribeConsumableResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeConsumableResourceInput(v *DescribeConsumableResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeConsumableResourceInput(v *DescribeConsumableResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumableResource != nil { + ok := object.Key("consumableResource") + ok.String(*v.ConsumableResource) + } + + return nil +} + type awsRestjson1_serializeOpDescribeJobDefinitions struct { } @@ -1123,28 +1383,192 @@ func awsRestjson1_serializeOpHttpBindingsDescribeJobsInput(v *DescribeJobsInput, return nil } -func awsRestjson1_serializeOpDocumentDescribeJobsInput(v *DescribeJobsInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentDescribeJobsInput(v *DescribeJobsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Jobs != nil { + ok := object.Key("jobs") + if err := awsRestjson1_serializeDocumentStringList(v.Jobs, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDescribeSchedulingPolicies struct { +} + +func (*awsRestjson1_serializeOpDescribeSchedulingPolicies) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeSchedulingPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*DescribeSchedulingPoliciesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/describeschedulingpolicies") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDescribeSchedulingPoliciesInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsDescribeSchedulingPoliciesInput(v *DescribeSchedulingPoliciesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeSchedulingPoliciesInput(v *DescribeSchedulingPoliciesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Arns != nil { + ok := object.Key("arns") + if err := awsRestjson1_serializeDocumentStringList(v.Arns, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpGetJobQueueSnapshot struct { +} + +func (*awsRestjson1_serializeOpGetJobQueueSnapshot) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetJobQueueSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*GetJobQueueSnapshotInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/getjobqueuesnapshot") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGetJobQueueSnapshotInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGetJobQueueSnapshotInput(v *GetJobQueueSnapshotInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGetJobQueueSnapshotInput(v *GetJobQueueSnapshotInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Jobs != nil { - ok := object.Key("jobs") - if err := awsRestjson1_serializeDocumentStringList(v.Jobs, ok); err != nil { - return err - } + if v.JobQueue != nil { + ok := object.Key("jobQueue") + ok.String(*v.JobQueue) } return nil } -type awsRestjson1_serializeOpDescribeSchedulingPolicies struct { +type awsRestjson1_serializeOpListConsumableResources struct { } -func (*awsRestjson1_serializeOpDescribeSchedulingPolicies) ID() string { +func (*awsRestjson1_serializeOpListConsumableResources) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeSchedulingPolicies) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListConsumableResources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1156,13 +1580,13 @@ func (m *awsRestjson1_serializeOpDescribeSchedulingPolicies) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeSchedulingPoliciesInput) + input, ok := in.Parameters.(*ListConsumableResourcesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/describeschedulingpolicies") + opPath, opQuery := httpbinding.SplitURI("/v1/listconsumableresources") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1181,7 +1605,7 @@ func (m *awsRestjson1_serializeOpDescribeSchedulingPolicies) HandleSerialize(ctx restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentDescribeSchedulingPoliciesInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentListConsumableResourcesInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1198,7 +1622,7 @@ func (m *awsRestjson1_serializeOpDescribeSchedulingPolicies) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeSchedulingPoliciesInput(v *DescribeSchedulingPoliciesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListConsumableResourcesInput(v *ListConsumableResourcesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1206,28 +1630,38 @@ func awsRestjson1_serializeOpHttpBindingsDescribeSchedulingPoliciesInput(v *Desc return nil } -func awsRestjson1_serializeOpDocumentDescribeSchedulingPoliciesInput(v *DescribeSchedulingPoliciesInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentListConsumableResourcesInput(v *ListConsumableResourcesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Arns != nil { - ok := object.Key("arns") - if err := awsRestjson1_serializeDocumentStringList(v.Arns, ok); err != nil { + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentListConsumableResourcesFilterList(v.Filters, ok); err != nil { return err } } + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + return nil } -type awsRestjson1_serializeOpGetJobQueueSnapshot struct { +type awsRestjson1_serializeOpListJobs struct { } -func (*awsRestjson1_serializeOpGetJobQueueSnapshot) ID() string { +func (*awsRestjson1_serializeOpListJobs) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGetJobQueueSnapshot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1239,13 +1673,13 @@ func (m *awsRestjson1_serializeOpGetJobQueueSnapshot) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GetJobQueueSnapshotInput) + input, ok := in.Parameters.(*ListJobsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/getjobqueuesnapshot") + opPath, opQuery := httpbinding.SplitURI("/v1/listjobs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1264,7 +1698,7 @@ func (m *awsRestjson1_serializeOpGetJobQueueSnapshot) HandleSerialize(ctx contex restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentGetJobQueueSnapshotInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentListJobsInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1281,7 +1715,7 @@ func (m *awsRestjson1_serializeOpGetJobQueueSnapshot) HandleSerialize(ctx contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGetJobQueueSnapshotInput(v *GetJobQueueSnapshotInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListJobsInput(v *ListJobsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1289,26 +1723,58 @@ func awsRestjson1_serializeOpHttpBindingsGetJobQueueSnapshotInput(v *GetJobQueue return nil } -func awsRestjson1_serializeOpDocumentGetJobQueueSnapshotInput(v *GetJobQueueSnapshotInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentListJobsInput(v *ListJobsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.ArrayJobId != nil { + ok := object.Key("arrayJobId") + ok.String(*v.ArrayJobId) + } + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentListJobsFilterList(v.Filters, ok); err != nil { + return err + } + } + if v.JobQueue != nil { ok := object.Key("jobQueue") ok.String(*v.JobQueue) } + if len(v.JobStatus) > 0 { + ok := object.Key("jobStatus") + ok.String(string(v.JobStatus)) + } + + if v.MaxResults != nil { + ok := object.Key("maxResults") + ok.Integer(*v.MaxResults) + } + + if v.MultiNodeJobId != nil { + ok := object.Key("multiNodeJobId") + ok.String(*v.MultiNodeJobId) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + return nil } -type awsRestjson1_serializeOpListJobs struct { +type awsRestjson1_serializeOpListJobsByConsumableResource struct { } -func (*awsRestjson1_serializeOpListJobs) ID() string { +func (*awsRestjson1_serializeOpListJobsByConsumableResource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListJobs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListJobsByConsumableResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1320,13 +1786,13 @@ func (m *awsRestjson1_serializeOpListJobs) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListJobsInput) + input, ok := in.Parameters.(*ListJobsByConsumableResourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/listjobs") + opPath, opQuery := httpbinding.SplitURI("/v1/listjobsbyconsumableresource") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1345,7 +1811,7 @@ func (m *awsRestjson1_serializeOpListJobs) HandleSerialize(ctx context.Context, restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentListJobsInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentListJobsByConsumableResourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1362,7 +1828,7 @@ func (m *awsRestjson1_serializeOpListJobs) HandleSerialize(ctx context.Context, span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListJobsInput(v *ListJobsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListJobsByConsumableResourceInput(v *ListJobsByConsumableResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1370,42 +1836,27 @@ func awsRestjson1_serializeOpHttpBindingsListJobsInput(v *ListJobsInput, encoder return nil } -func awsRestjson1_serializeOpDocumentListJobsInput(v *ListJobsInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentListJobsByConsumableResourceInput(v *ListJobsByConsumableResourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.ArrayJobId != nil { - ok := object.Key("arrayJobId") - ok.String(*v.ArrayJobId) + if v.ConsumableResource != nil { + ok := object.Key("consumableResource") + ok.String(*v.ConsumableResource) } if v.Filters != nil { ok := object.Key("filters") - if err := awsRestjson1_serializeDocumentListJobsFilterList(v.Filters, ok); err != nil { + if err := awsRestjson1_serializeDocumentListJobsByConsumableResourceFilterList(v.Filters, ok); err != nil { return err } } - if v.JobQueue != nil { - ok := object.Key("jobQueue") - ok.String(*v.JobQueue) - } - - if len(v.JobStatus) > 0 { - ok := object.Key("jobStatus") - ok.String(string(v.JobStatus)) - } - if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) } - if v.MultiNodeJobId != nil { - ok := object.Key("multiNodeJobId") - ok.String(*v.MultiNodeJobId) - } - if v.NextToken != nil { ok := object.Key("nextToken") ok.String(*v.NextToken) @@ -1644,6 +2095,13 @@ func awsRestjson1_serializeOpDocumentRegisterJobDefinitionInput(v *RegisterJobDe object := value.Object() defer object.Close() + if v.ConsumableResourceProperties != nil { + ok := object.Key("consumableResourceProperties") + if err := awsRestjson1_serializeDocumentConsumableResourceProperties(v.ConsumableResourceProperties, ok); err != nil { + return err + } + } + if v.ContainerProperties != nil { ok := object.Key("containerProperties") if err := awsRestjson1_serializeDocumentContainerProperties(v.ContainerProperties, ok); err != nil { @@ -1810,6 +2268,13 @@ func awsRestjson1_serializeOpDocumentSubmitJobInput(v *SubmitJobInput, value smi } } + if v.ConsumableResourcePropertiesOverride != nil { + ok := object.Key("consumableResourcePropertiesOverride") + if err := awsRestjson1_serializeDocumentConsumableResourceProperties(v.ConsumableResourcePropertiesOverride, ok); err != nil { + return err + } + } + if v.ContainerOverrides != nil { ok := object.Key("containerOverrides") if err := awsRestjson1_serializeDocumentContainerOverrides(v.ContainerOverrides, ok); err != nil { @@ -2280,6 +2745,102 @@ func awsRestjson1_serializeOpDocumentUpdateComputeEnvironmentInput(v *UpdateComp return nil } +type awsRestjson1_serializeOpUpdateConsumableResource struct { +} + +func (*awsRestjson1_serializeOpUpdateConsumableResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateConsumableResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + _, span := tracing.StartSpan(ctx, "OperationSerializer") + endTimer := startMetricTimer(ctx, "client.call.serialization_duration") + defer endTimer() + defer span.End() + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UpdateConsumableResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/updateconsumableresource") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateConsumableResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + endTimer() + span.End() + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateConsumableResourceInput(v *UpdateConsumableResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateConsumableResourceInput(v *UpdateConsumableResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.ConsumableResource != nil { + ok := object.Key("consumableResource") + ok.String(*v.ConsumableResource) + } + + if v.Operation != nil { + ok := object.Key("operation") + ok.String(*v.Operation) + } + + if v.Quantity != nil { + ok := object.Key("quantity") + ok.Long(*v.Quantity) + } + + return nil +} + type awsRestjson1_serializeOpUpdateJobQueue struct { } @@ -2728,6 +3289,50 @@ func awsRestjson1_serializeDocumentComputeResourceUpdate(v *types.ComputeResourc return nil } +func awsRestjson1_serializeDocumentConsumableResourceList(v []types.ConsumableResourceRequirement, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentConsumableResourceRequirement(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentConsumableResourceProperties(v *types.ConsumableResourceProperties, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumableResourceList != nil { + ok := object.Key("consumableResourceList") + if err := awsRestjson1_serializeDocumentConsumableResourceList(v.ConsumableResourceList, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentConsumableResourceRequirement(v *types.ConsumableResourceRequirement, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ConsumableResource != nil { + ok := object.Key("consumableResource") + ok.String(*v.ConsumableResource) + } + + if v.Quantity != nil { + ok := object.Key("quantity") + ok.Long(*v.Quantity) + } + + return nil +} + func awsRestjson1_serializeDocumentContainerOverrides(v *types.ContainerOverrides, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4102,6 +4707,19 @@ func awsRestjson1_serializeDocumentLinuxParameters(v *types.LinuxParameters, val return nil } +func awsRestjson1_serializeDocumentListConsumableResourcesFilterList(v []types.KeyValuesPair, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentKeyValuesPair(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentListEcsTaskProperties(v []types.EcsTaskProperties, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -4115,6 +4733,19 @@ func awsRestjson1_serializeDocumentListEcsTaskProperties(v []types.EcsTaskProper return nil } +func awsRestjson1_serializeDocumentListJobsByConsumableResourceFilterList(v []types.KeyValuesPair, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentKeyValuesPair(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentListJobsFilterList(v []types.KeyValuesPair, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -4298,6 +4929,13 @@ func awsRestjson1_serializeDocumentNodePropertyOverride(v *types.NodePropertyOve object := value.Object() defer object.Close() + if v.ConsumableResourcePropertiesOverride != nil { + ok := object.Key("consumableResourcePropertiesOverride") + if err := awsRestjson1_serializeDocumentConsumableResourceProperties(v.ConsumableResourcePropertiesOverride, ok); err != nil { + return err + } + } + if v.ContainerOverrides != nil { ok := object.Key("containerOverrides") if err := awsRestjson1_serializeDocumentContainerOverrides(v.ContainerOverrides, ok); err != nil { @@ -4364,6 +5002,13 @@ func awsRestjson1_serializeDocumentNodeRangeProperty(v *types.NodeRangeProperty, object := value.Object() defer object.Close() + if v.ConsumableResourceProperties != nil { + ok := object.Key("consumableResourceProperties") + if err := awsRestjson1_serializeDocumentConsumableResourceProperties(v.ConsumableResourceProperties, ok); err != nil { + return err + } + } + if v.Container != nil { ok := object.Key("container") if err := awsRestjson1_serializeDocumentContainerProperties(v.Container, ok); err != nil { diff --git a/service/batch/snapshot/api_op_CreateConsumableResource.go.snap b/service/batch/snapshot/api_op_CreateConsumableResource.go.snap new file mode 100644 index 00000000000..085248af4c8 --- /dev/null +++ b/service/batch/snapshot/api_op_CreateConsumableResource.go.snap @@ -0,0 +1,41 @@ +CreateConsumableResource + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/batch/snapshot/api_op_DeleteConsumableResource.go.snap b/service/batch/snapshot/api_op_DeleteConsumableResource.go.snap new file mode 100644 index 00000000000..79b2680983b --- /dev/null +++ b/service/batch/snapshot/api_op_DeleteConsumableResource.go.snap @@ -0,0 +1,41 @@ +DeleteConsumableResource + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/batch/snapshot/api_op_DescribeConsumableResource.go.snap b/service/batch/snapshot/api_op_DescribeConsumableResource.go.snap new file mode 100644 index 00000000000..1a00324eb79 --- /dev/null +++ b/service/batch/snapshot/api_op_DescribeConsumableResource.go.snap @@ -0,0 +1,41 @@ +DescribeConsumableResource + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/batch/snapshot/api_op_ListConsumableResources.go.snap b/service/batch/snapshot/api_op_ListConsumableResources.go.snap new file mode 100644 index 00000000000..1a4df67dc28 --- /dev/null +++ b/service/batch/snapshot/api_op_ListConsumableResources.go.snap @@ -0,0 +1,40 @@ +ListConsumableResources + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/batch/snapshot/api_op_ListJobsByConsumableResource.go.snap b/service/batch/snapshot/api_op_ListJobsByConsumableResource.go.snap new file mode 100644 index 00000000000..86a9232aed2 --- /dev/null +++ b/service/batch/snapshot/api_op_ListJobsByConsumableResource.go.snap @@ -0,0 +1,41 @@ +ListJobsByConsumableResource + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/batch/snapshot/api_op_UpdateConsumableResource.go.snap b/service/batch/snapshot/api_op_UpdateConsumableResource.go.snap new file mode 100644 index 00000000000..1992d3a3a7a --- /dev/null +++ b/service/batch/snapshot/api_op_UpdateConsumableResource.go.snap @@ -0,0 +1,42 @@ +UpdateConsumableResource + Initialize stack step + spanInitializeStart + RegisterServiceMetadata + OperationIdempotencyTokenAutoFill + legacyEndpointContextSetter + SetLogger + OperationInputValidation + spanInitializeEnd + Serialize stack step + spanBuildRequestStart + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + spanBuildRequestEnd + Finalize stack step + spanRetryLoop + Retry + RetryMetricsHeader + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/batch/snapshot_test.go b/service/batch/snapshot_test.go index b5e18d792e9..cc526ed885d 100644 --- a/service/batch/snapshot_test.go +++ b/service/batch/snapshot_test.go @@ -86,6 +86,18 @@ func TestCheckSnapshot_CreateComputeEnvironment(t *testing.T) { } } +func TestCheckSnapshot_CreateConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "CreateConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_CreateJobQueue(t *testing.T) { svc := New(Options{}) _, err := svc.CreateJobQueue(context.Background(), nil, func(o *Options) { @@ -122,6 +134,18 @@ func TestCheckSnapshot_DeleteComputeEnvironment(t *testing.T) { } } +func TestCheckSnapshot_DeleteConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DeleteConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DeleteJobQueue(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteJobQueue(context.Background(), nil, func(o *Options) { @@ -170,6 +194,18 @@ func TestCheckSnapshot_DescribeComputeEnvironments(t *testing.T) { } } +func TestCheckSnapshot_DescribeConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_DescribeJobDefinitions(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeJobDefinitions(context.Background(), nil, func(o *Options) { @@ -230,6 +266,18 @@ func TestCheckSnapshot_GetJobQueueSnapshot(t *testing.T) { } } +func TestCheckSnapshot_ListConsumableResources(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListConsumableResources(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListConsumableResources") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListJobs(context.Background(), nil, func(o *Options) { @@ -242,6 +290,18 @@ func TestCheckSnapshot_ListJobs(t *testing.T) { } } +func TestCheckSnapshot_ListJobsByConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListJobsByConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListJobsByConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListSchedulingPolicies(t *testing.T) { svc := New(Options{}) _, err := svc.ListSchedulingPolicies(context.Background(), nil, func(o *Options) { @@ -338,6 +398,18 @@ func TestCheckSnapshot_UpdateComputeEnvironment(t *testing.T) { } } +func TestCheckSnapshot_UpdateConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "UpdateConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_UpdateJobQueue(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateJobQueue(context.Background(), nil, func(o *Options) { @@ -385,6 +457,18 @@ func TestUpdateSnapshot_CreateComputeEnvironment(t *testing.T) { } } +func TestUpdateSnapshot_CreateConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.CreateConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "CreateConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_CreateJobQueue(t *testing.T) { svc := New(Options{}) _, err := svc.CreateJobQueue(context.Background(), nil, func(o *Options) { @@ -421,6 +505,18 @@ func TestUpdateSnapshot_DeleteComputeEnvironment(t *testing.T) { } } +func TestUpdateSnapshot_DeleteConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.DeleteConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DeleteConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DeleteJobQueue(t *testing.T) { svc := New(Options{}) _, err := svc.DeleteJobQueue(context.Background(), nil, func(o *Options) { @@ -469,6 +565,18 @@ func TestUpdateSnapshot_DescribeComputeEnvironments(t *testing.T) { } } +func TestUpdateSnapshot_DescribeConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_DescribeJobDefinitions(t *testing.T) { svc := New(Options{}) _, err := svc.DescribeJobDefinitions(context.Background(), nil, func(o *Options) { @@ -529,6 +637,18 @@ func TestUpdateSnapshot_GetJobQueueSnapshot(t *testing.T) { } } +func TestUpdateSnapshot_ListConsumableResources(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListConsumableResources(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListConsumableResources") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListJobs(t *testing.T) { svc := New(Options{}) _, err := svc.ListJobs(context.Background(), nil, func(o *Options) { @@ -541,6 +661,18 @@ func TestUpdateSnapshot_ListJobs(t *testing.T) { } } +func TestUpdateSnapshot_ListJobsByConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListJobsByConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListJobsByConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListSchedulingPolicies(t *testing.T) { svc := New(Options{}) _, err := svc.ListSchedulingPolicies(context.Background(), nil, func(o *Options) { @@ -637,6 +769,18 @@ func TestUpdateSnapshot_UpdateComputeEnvironment(t *testing.T) { } } +func TestUpdateSnapshot_UpdateConsumableResource(t *testing.T) { + svc := New(Options{}) + _, err := svc.UpdateConsumableResource(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "UpdateConsumableResource") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_UpdateJobQueue(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateJobQueue(context.Background(), nil, func(o *Options) { diff --git a/service/batch/types/types.go b/service/batch/types/types.go index 42040cfd3cc..a56df26fa8a 100644 --- a/service/batch/types/types.go +++ b/service/batch/types/types.go @@ -855,6 +855,57 @@ type ComputeResourceUpdate struct { noSmithyDocumentSerde } +// Contains a list of consumable resources required by a job. +type ConsumableResourceProperties struct { + + // The list of consumable resources required by a job. + ConsumableResourceList []ConsumableResourceRequirement + + noSmithyDocumentSerde +} + +// Information about a consumable resource required to run a job. +type ConsumableResourceRequirement struct { + + // The name or ARN of the consumable resource. + ConsumableResource *string + + // The quantity of the consumable resource that is needed. + Quantity *int64 + + noSmithyDocumentSerde +} + +// Current information about a consumable resource. +type ConsumableResourceSummary struct { + + // The Amazon Resource Name (ARN) of the consumable resource. + // + // This member is required. + ConsumableResourceArn *string + + // The name of the consumable resource. + // + // This member is required. + ConsumableResourceName *string + + // The amount of the consumable resource that is currently in use. + InUseQuantity *int64 + + // Indicates whether the resource is available to be re-used after a job + // completes. Can be one of: + // + // - REPLENISHABLE + // + // - NON_REPLENISHABLE + ResourceType *string + + // The total amount of the consumable resource that is available. + TotalQuantity *int64 + + noSmithyDocumentSerde +} + // An object that represents the details of a container that's part of a job. type ContainerDetail struct { @@ -2435,9 +2486,9 @@ type EksPodPropertiesOverride struct { Containers []EksContainerOverride // The overrides for the initContainers defined in the Amazon EKS pod. These - // containers run before application containers, always run to completion, and must - // complete successfully before the next container starts. These containers are - // registered with the Amazon EKS Connector agent and persists the registration + // containers run before application containers, always runs to completion, and + // must complete successfully before the next container starts. These containers + // are registered with the Amazon EKS Connector agent and persists the registration // information in the Kubernetes backend data store. For more information, see [Init Containers]in // the Kubernetes documentation. // @@ -2586,29 +2637,30 @@ type EvaluateOnExit struct { noSmithyDocumentSerde } -// The fair-share scheduling policy details. +// The fair share policy for a scheduling policy. type FairsharePolicy struct { - // A value used to reserve some of the available maximum vCPU for share + // A value used to reserve some of the available maximum vCPU for fair share // identifiers that aren't already used. // // The reserved ratio is (computeReservation/100)^ActiveFairShares where - // ActiveFairShares is the number of active share identifiers. + // ActiveFairShares is the number of active fair share identifiers. // // For example, a computeReservation value of 50 indicates that Batch reserves 50% - // of the maximum available vCPU if there's only one share identifier. It reserves - // 25% if there are two share identifiers. It reserves 12.5% if there are three - // share identifiers. A computeReservation value of 25 indicates that Batch should - // reserve 25% of the maximum available vCPU if there's only one share identifier, - // 6.25% if there are two fair share identifiers, and 1.56% if there are three - // share identifiers. + // of the maximum available vCPU if there's only one fair share identifier. It + // reserves 25% if there are two fair share identifiers. It reserves 12.5% if there + // are three fair share identifiers. A computeReservation value of 25 indicates + // that Batch should reserve 25% of the maximum available vCPU if there's only one + // fair share identifier, 6.25% if there are two fair share identifiers, and 1.56% + // if there are three fair share identifiers. // // The minimum value is 0 and the maximum value is 99. ComputeReservation *int32 - // The amount of time (in seconds) to use to calculate a fair-share percentage for - // each share identifier in use. A value of zero (0) indicates the default minimum - // time window (600 seconds). The maximum supported value is 604800 (1 week). + // The amount of time (in seconds) to use to calculate a fair share percentage for + // each fair share identifier in use. A value of zero (0) indicates the default + // minimum time window (600 seconds). The maximum supported value is 604800 (1 + // week). // // The decay allows for more recently run jobs to have more weight than jobs that // ran earlier. Consider adjusting this number if you have jobs that (on average) @@ -2617,9 +2669,9 @@ type FairsharePolicy struct { // needs. ShareDecaySeconds *int32 - // An array of SharedIdentifier objects that contain the weights for the share - // identifiers for the fair-share policy. Share identifiers that aren't included - // have a default weight of 1.0 . + // An array of SharedIdentifier objects that contain the weights for the fair + // share identifiers for the fair share policy. Fair share identifiers that aren't + // included have a default weight of 1.0 . ShareDistribution []ShareAttributes noSmithyDocumentSerde @@ -2646,7 +2698,7 @@ type FrontOfQueueDetail struct { // The Amazon Resource Names (ARNs) of the first 100 RUNNABLE jobs in a named job // queue. For first-in-first-out (FIFO) job queues, jobs are ordered based on their - // submission time. For fair-share scheduling (FSS) job queues, jobs are ordered + // submission time. For fair share scheduling (FSS) job queues, jobs are ordered // based on their job priority and share usage. Jobs []FrontOfQueueJobSummary @@ -2733,6 +2785,9 @@ type JobDefinition struct { // This member is required. Type *string + // Contains a list of consumable resources required by the job. + ConsumableResourceProperties *ConsumableResourceProperties + // The orchestration type of the compute environment. The valid values are ECS // (default) or EKS . ContainerOrchestrationType OrchestrationType @@ -2786,7 +2841,7 @@ type JobDefinition struct { RetryStrategy *RetryStrategy // The scheduling priority of the job definition. This only affects jobs in job - // queues with a fair-share policy. Jobs with a higher scheduling priority are + // queues with a fair share policy. Jobs with a higher scheduling priority are // scheduled before jobs with a lower scheduling priority. SchedulingPriority *int32 @@ -2862,6 +2917,9 @@ type JobDetail struct { // A list of job attempts that are associated with this job. Attempts []AttemptDetail + // Contains a list of consumable resources required by the job. + ConsumableResourceProperties *ConsumableResourceProperties + // An object that represents the details for the container that's associated with // the job. If the details are for a multiple-container job, this object will be // empty. @@ -2926,7 +2984,7 @@ type JobDetail struct { RetryStrategy *RetryStrategy // The scheduling policy of the job definition. This only affects jobs in job - // queues with a fair-share policy. Jobs with a higher scheduling priority are + // queues with a fair share policy. Jobs with a higher scheduling priority are // scheduled before jobs with a lower scheduling priority. SchedulingPriority *int32 @@ -3163,7 +3221,7 @@ type KeyValuePair struct { } // A filter name and value pair that's used to return a more specific list of -// results from a ListJobs API operation. +// results from a ListJobs or ListJobsByConsumableResource API operation. type KeyValuesPair struct { // The name of the filter. Filter names are case sensitive. @@ -3345,8 +3403,9 @@ type LinuxParameters struct { // // If a maxSwap value of 0 is specified, the container doesn't use swap. Accepted // values are 0 or any positive integer. If the maxSwap parameter is omitted, the - // container doesn't use the swap configuration for the container instance on which - // it runs. A maxSwap value must be set for the swappiness parameter to be used. + // container doesn't use the swap configuration for the container instance that + // it's running on. A maxSwap value must be set for the swappiness parameter to be + // used. // // This parameter isn't applicable to jobs that are running on Fargate resources. // Don't provide it for these jobs. @@ -3408,6 +3467,76 @@ type LinuxParameters struct { noSmithyDocumentSerde } +// Current information about a consumable resource required by a job. +type ListJobsByConsumableResourceSummary struct { + + // Contains a list of consumable resources required by the job. + // + // This member is required. + ConsumableResourceProperties *ConsumableResourceProperties + + // The Unix timestamp (in milliseconds) for when the consumable resource was + // created. + // + // This member is required. + CreatedAt *int64 + + // The Amazon Resource Name (ARN) of the job. + // + // This member is required. + JobArn *string + + // The name of the job. + // + // This member is required. + JobName *string + + // The Amazon Resource Name (ARN) of the job queue. + // + // This member is required. + JobQueueArn *string + + // The status of the job. Can be one of: + // + // - SUBMITTED + // + // - PENDING + // + // - RUNNABLE + // + // - STARTING + // + // - RUNNING + // + // - SUCCEEDED + // + // - FAILED + // + // This member is required. + JobStatus *string + + // The total amount of the consumable resource that is available. + // + // This member is required. + Quantity *int64 + + // The Amazon Resource Name (ARN) of the job definition. + JobDefinitionArn *string + + // The fair-share scheduling policy identifier for the job. + ShareIdentifier *string + + // The Unix timestamp for when the job was started. More specifically, it's when + // the job transitioned from the STARTING state to the RUNNING state. + StartedAt *int64 + + // A short, human-readable string to provide more details for the current status + // of the job. + StatusReason *string + + noSmithyDocumentSerde +} + // Log configuration options to send to a custom log driver for the container. type LogConfiguration struct { @@ -3638,6 +3767,9 @@ type NodePropertyOverride struct { // This member is required. TargetNodes *string + // An object that contains overrides for the consumable resources of a job. + ConsumableResourcePropertiesOverride *ConsumableResourceProperties + // The overrides that are sent to a node range. ContainerOverrides *ContainerOverrides @@ -3671,6 +3803,9 @@ type NodeRangeProperty struct { // This member is required. TargetNodes *string + // Contains a list of consumable resources required by a job. + ConsumableResourceProperties *ConsumableResourceProperties + // The container details for the node range. Container *ContainerProperties @@ -3885,17 +4020,17 @@ type SchedulingPolicyDetail struct { // This member is required. Arn *string - // The name of the fair-share scheduling policy. + // The name of the scheduling policy. // // This member is required. Name *string - // The fair-share scheduling policy details. + // The fair share policy for the scheduling policy. FairsharePolicy *FairsharePolicy - // The tags that you apply to the fair-share scheduling policy to categorize and - // organize your resources. Each tag consists of a key and an optional value. For - // more information, see [Tagging Amazon Web Services resources]in Amazon Web Services General Reference. + // The tags that you apply to the scheduling policy to categorize and organize + // your resources. Each tag consists of a key and an optional value. For more + // information, see [Tagging Amazon Web Services resources]in Amazon Web Services General Reference. // // [Tagging Amazon Web Services resources]: https://docs.aws.amazon.com/general/latest/gr/aws_tagging.html Tags map[string]string @@ -3949,18 +4084,18 @@ type Secret struct { noSmithyDocumentSerde } -// Specifies the weights for the share identifiers for the fair-share policy. -// Share identifiers that aren't included have a default weight of 1.0 . +// Specifies the weights for the fair share identifiers for the fair share policy. +// Fair share identifiers that aren't included have a default weight of 1.0 . type ShareAttributes struct { - // A share identifier or share identifier prefix. If the string ends with an - // asterisk (*), this entry specifies the weight factor to use for share - // identifiers that start with that prefix. The list of share identifiers in a - // fair-share policy can't overlap. For example, you can't have one that specifies - // a shareIdentifier of UserA* and another that specifies a shareIdentifier of - // UserA-1 . + // A fair share identifier or fair share identifier prefix. If the string ends + // with an asterisk (*), this entry specifies the weight factor to use for fair + // share identifiers that start with that prefix. The list of fair share + // identifiers in a fair share policy can't overlap. For example, you can't have + // one that specifies a shareIdentifier of UserA* and another that specifies a + // shareIdentifier of UserA-1 . // - // There can be no more than 500 share identifiers active in a job queue. + // There can be no more than 500 fair share identifiers active in a job queue. // // The string is limited to 255 alphanumeric characters, and can be followed by an // asterisk (*). @@ -3968,10 +4103,10 @@ type ShareAttributes struct { // This member is required. ShareIdentifier *string - // The weight factor for the share identifier. The default value is 1.0. A lower - // value has a higher priority for compute resources. For example, jobs that use a - // share identifier with a weight factor of 0.125 (1/8) get 8 times the compute - // resources of jobs that use a share identifier with a weight factor of 1. + // The weight factor for the fair share identifier. The default value is 1.0. A + // lower value has a higher priority for compute resources. For example, jobs that + // use a share identifier with a weight factor of 0.125 (1/8) get 8 times the + // compute resources of jobs that use a share identifier with a weight factor of 1. // // The smallest supported value is 0.0001, and the largest supported value is // 999.9999. diff --git a/service/batch/validators.go b/service/batch/validators.go index eda2b29755b..292db77662c 100644 --- a/service/batch/validators.go +++ b/service/batch/validators.go @@ -50,6 +50,26 @@ func (m *validateOpCreateComputeEnvironment) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpCreateConsumableResource struct { +} + +func (*validateOpCreateConsumableResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateConsumableResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateConsumableResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateConsumableResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateJobQueue struct { } @@ -110,6 +130,26 @@ func (m *validateOpDeleteComputeEnvironment) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpDeleteConsumableResource struct { +} + +func (*validateOpDeleteConsumableResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteConsumableResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteConsumableResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteConsumableResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteJobQueue struct { } @@ -170,6 +210,26 @@ func (m *validateOpDeregisterJobDefinition) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpDescribeConsumableResource struct { +} + +func (*validateOpDescribeConsumableResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeConsumableResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeConsumableResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeConsumableResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeJobs struct { } @@ -230,6 +290,26 @@ func (m *validateOpGetJobQueueSnapshot) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpListJobsByConsumableResource struct { +} + +func (*validateOpListJobsByConsumableResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListJobsByConsumableResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListJobsByConsumableResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListJobsByConsumableResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListTagsForResource struct { } @@ -370,6 +450,26 @@ func (m *validateOpUpdateComputeEnvironment) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpUpdateConsumableResource struct { +} + +func (*validateOpUpdateConsumableResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateConsumableResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateConsumableResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateConsumableResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateJobQueue struct { } @@ -418,6 +518,10 @@ func addOpCreateComputeEnvironmentValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpCreateComputeEnvironment{}, middleware.After) } +func addOpCreateConsumableResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateConsumableResource{}, middleware.After) +} + func addOpCreateJobQueueValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateJobQueue{}, middleware.After) } @@ -430,6 +534,10 @@ func addOpDeleteComputeEnvironmentValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpDeleteComputeEnvironment{}, middleware.After) } +func addOpDeleteConsumableResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteConsumableResource{}, middleware.After) +} + func addOpDeleteJobQueueValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteJobQueue{}, middleware.After) } @@ -442,6 +550,10 @@ func addOpDeregisterJobDefinitionValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpDeregisterJobDefinition{}, middleware.After) } +func addOpDescribeConsumableResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeConsumableResource{}, middleware.After) +} + func addOpDescribeJobsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeJobs{}, middleware.After) } @@ -454,6 +566,10 @@ func addOpGetJobQueueSnapshotValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpGetJobQueueSnapshot{}, middleware.After) } +func addOpListJobsByConsumableResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListJobsByConsumableResource{}, middleware.After) +} + func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) } @@ -482,6 +598,10 @@ func addOpUpdateComputeEnvironmentValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpUpdateComputeEnvironment{}, middleware.After) } +func addOpUpdateConsumableResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateConsumableResource{}, middleware.After) +} + func addOpUpdateJobQueueValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateJobQueue{}, middleware.After) } @@ -1811,6 +1931,21 @@ func validateOpCreateComputeEnvironmentInput(v *CreateComputeEnvironmentInput) e } } +func validateOpCreateConsumableResourceInput(v *CreateConsumableResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateConsumableResourceInput"} + if v.ConsumableResourceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConsumableResourceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateJobQueueInput(v *CreateJobQueueInput) error { if v == nil { return nil @@ -1876,6 +2011,21 @@ func validateOpDeleteComputeEnvironmentInput(v *DeleteComputeEnvironmentInput) e } } +func validateOpDeleteConsumableResourceInput(v *DeleteConsumableResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteConsumableResourceInput"} + if v.ConsumableResource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConsumableResource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteJobQueueInput(v *DeleteJobQueueInput) error { if v == nil { return nil @@ -1921,6 +2071,21 @@ func validateOpDeregisterJobDefinitionInput(v *DeregisterJobDefinitionInput) err } } +func validateOpDescribeConsumableResourceInput(v *DescribeConsumableResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeConsumableResourceInput"} + if v.ConsumableResource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConsumableResource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeJobsInput(v *DescribeJobsInput) error { if v == nil { return nil @@ -1966,6 +2131,21 @@ func validateOpGetJobQueueSnapshotInput(v *GetJobQueueSnapshotInput) error { } } +func validateOpListJobsByConsumableResourceInput(v *ListJobsByConsumableResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListJobsByConsumableResourceInput"} + if v.ConsumableResource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConsumableResource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { if v == nil { return nil @@ -2144,6 +2324,21 @@ func validateOpUpdateComputeEnvironmentInput(v *UpdateComputeEnvironmentInput) e } } +func validateOpUpdateConsumableResourceInput(v *UpdateConsumableResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateConsumableResourceInput"} + if v.ConsumableResource == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConsumableResource")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateJobQueueInput(v *UpdateJobQueueInput) error { if v == nil { return nil diff --git a/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnector.go b/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnector.go deleted file mode 100644 index 9ac08f8368e..00000000000 --- a/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnector.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates phone numbers with the specified Amazon Chime Voice Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [AssociatePhoneNumbersWithVoiceConnector], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by AssociatePhoneNumbersWithVoiceConnector in the Amazon -// Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [AssociatePhoneNumbersWithVoiceConnector]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_AssociatePhoneNumbersWithVoiceConnector.html -func (c *Client) AssociatePhoneNumbersWithVoiceConnector(ctx context.Context, params *AssociatePhoneNumbersWithVoiceConnectorInput, optFns ...func(*Options)) (*AssociatePhoneNumbersWithVoiceConnectorOutput, error) { - if params == nil { - params = &AssociatePhoneNumbersWithVoiceConnectorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociatePhoneNumbersWithVoiceConnector", params, optFns, c.addOperationAssociatePhoneNumbersWithVoiceConnectorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociatePhoneNumbersWithVoiceConnectorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociatePhoneNumbersWithVoiceConnectorInput struct { - - // List of phone numbers, in E.164 format. - // - // This member is required. - E164PhoneNumbers []string - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - // If true, associates the provided phone numbers with the provided Amazon Chime - // Voice Connector and removes any previously existing associations. If false, does - // not associate any phone numbers that have previously existing associations. - ForceAssociate *bool - - noSmithyDocumentSerde -} - -type AssociatePhoneNumbersWithVoiceConnectorOutput struct { - - // If the action fails for one or more of the phone numbers in the request, a list - // of the phone numbers is returned, along with error codes and error messages. - PhoneNumberErrors []types.PhoneNumberError - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociatePhoneNumbersWithVoiceConnectorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnector{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnector{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociatePhoneNumbersWithVoiceConnector"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpAssociatePhoneNumbersWithVoiceConnectorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociatePhoneNumbersWithVoiceConnector(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociatePhoneNumbersWithVoiceConnector(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociatePhoneNumbersWithVoiceConnector", - } -} diff --git a/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go b/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go deleted file mode 100644 index 0b611d11ba2..00000000000 --- a/service/chime/api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go +++ /dev/null @@ -1,181 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Associates phone numbers with the specified Amazon Chime Voice Connector group. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [AssociatePhoneNumbersWithVoiceConnectorGroup], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by AssociatePhoneNumbersWithVoiceConnectorGroup in the -// Amazon Chime SDK Voice Namespace -// -// [AssociatePhoneNumbersWithVoiceConnectorGroup]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_AssociatePhoneNumbersWithVoiceConnectorGroup.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) AssociatePhoneNumbersWithVoiceConnectorGroup(ctx context.Context, params *AssociatePhoneNumbersWithVoiceConnectorGroupInput, optFns ...func(*Options)) (*AssociatePhoneNumbersWithVoiceConnectorGroupOutput, error) { - if params == nil { - params = &AssociatePhoneNumbersWithVoiceConnectorGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociatePhoneNumbersWithVoiceConnectorGroup", params, optFns, c.addOperationAssociatePhoneNumbersWithVoiceConnectorGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociatePhoneNumbersWithVoiceConnectorGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociatePhoneNumbersWithVoiceConnectorGroupInput struct { - - // List of phone numbers, in E.164 format. - // - // This member is required. - E164PhoneNumbers []string - - // The Amazon Chime Voice Connector group ID. - // - // This member is required. - VoiceConnectorGroupId *string - - // If true, associates the provided phone numbers with the provided Amazon Chime - // Voice Connector Group and removes any previously existing associations. If - // false, does not associate any phone numbers that have previously existing - // associations. - ForceAssociate *bool - - noSmithyDocumentSerde -} - -type AssociatePhoneNumbersWithVoiceConnectorGroupOutput struct { - - // If the action fails for one or more of the phone numbers in the request, a list - // of the phone numbers is returned, along with error codes and error messages. - PhoneNumberErrors []types.PhoneNumberError - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociatePhoneNumbersWithVoiceConnectorGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociatePhoneNumbersWithVoiceConnectorGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpAssociatePhoneNumbersWithVoiceConnectorGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociatePhoneNumbersWithVoiceConnectorGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociatePhoneNumbersWithVoiceConnectorGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociatePhoneNumbersWithVoiceConnectorGroup", - } -} diff --git a/service/chime/api_op_BatchCreateAttendee.go b/service/chime/api_op_BatchCreateAttendee.go deleted file mode 100644 index 2e0434c0598..00000000000 --- a/service/chime/api_op_BatchCreateAttendee.go +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates up to 100 new attendees for an active Amazon Chime SDK meeting. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [BatchCreateAttendee], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// For more information about the Amazon Chime SDK, see [Using the Amazon Chime SDK] in the Amazon Chime SDK -// Developer Guide. -// -// Deprecated: Replaced by BatchCreateAttendee in the Amazon Chime SDK Meetings -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [BatchCreateAttendee]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_BatchCreateAttendee.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -func (c *Client) BatchCreateAttendee(ctx context.Context, params *BatchCreateAttendeeInput, optFns ...func(*Options)) (*BatchCreateAttendeeOutput, error) { - if params == nil { - params = &BatchCreateAttendeeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "BatchCreateAttendee", params, optFns, c.addOperationBatchCreateAttendeeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*BatchCreateAttendeeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type BatchCreateAttendeeInput struct { - - // The request containing the attendees to create. - // - // This member is required. - Attendees []types.CreateAttendeeRequestItem - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - noSmithyDocumentSerde -} - -type BatchCreateAttendeeOutput struct { - - // The attendee information, including attendees IDs and join tokens. - Attendees []types.Attendee - - // If the action fails for one or more of the attendees in the request, a list of - // the attendees is returned, along with error codes and error messages. - Errors []types.CreateAttendeeError - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationBatchCreateAttendeeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchCreateAttendee{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchCreateAttendee{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "BatchCreateAttendee"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpBatchCreateAttendeeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchCreateAttendee(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opBatchCreateAttendee(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "BatchCreateAttendee", - } -} diff --git a/service/chime/api_op_BatchCreateChannelMembership.go b/service/chime/api_op_BatchCreateChannelMembership.go deleted file mode 100644 index bd1f1fafbb4..00000000000 --- a/service/chime/api_op_BatchCreateChannelMembership.go +++ /dev/null @@ -1,217 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds a specified number of users to a channel. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [BatchCreateChannelMembership], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by BatchCreateChannelMembership in the Amazon Chime SDK -// Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [BatchCreateChannelMembership]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_BatchCreateChannelMembership.html -func (c *Client) BatchCreateChannelMembership(ctx context.Context, params *BatchCreateChannelMembershipInput, optFns ...func(*Options)) (*BatchCreateChannelMembershipOutput, error) { - if params == nil { - params = &BatchCreateChannelMembershipInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "BatchCreateChannelMembership", params, optFns, c.addOperationBatchCreateChannelMembershipMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*BatchCreateChannelMembershipOutput) - out.ResultMetadata = metadata - return out, nil -} - -type BatchCreateChannelMembershipInput struct { - - // The ARN of the channel to which you're adding users. - // - // This member is required. - ChannelArn *string - - // The ARNs of the members you want to add to the channel. - // - // This member is required. - MemberArns []string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The membership type of a user, DEFAULT or HIDDEN . Default members are always - // returned as part of ListChannelMemberships . Hidden members are only returned if - // the type filter in ListChannelMemberships equals HIDDEN . Otherwise hidden - // members are not returned. This is only supported by moderators. - Type types.ChannelMembershipType - - noSmithyDocumentSerde -} - -type BatchCreateChannelMembershipOutput struct { - - // The list of channel memberships in the response. - BatchChannelMemberships *types.BatchChannelMemberships - - // If the action fails for one or more of the memberships in the request, a list - // of the memberships is returned, along with error codes and error messages. - Errors []types.BatchCreateChannelMembershipError - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationBatchCreateChannelMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpBatchCreateChannelMembership{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpBatchCreateChannelMembership{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "BatchCreateChannelMembership"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opBatchCreateChannelMembershipMiddleware(stack); err != nil { - return err - } - if err = addOpBatchCreateChannelMembershipValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opBatchCreateChannelMembership(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opBatchCreateChannelMembershipMiddleware struct { -} - -func (*endpointPrefix_opBatchCreateChannelMembershipMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opBatchCreateChannelMembershipMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opBatchCreateChannelMembershipMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opBatchCreateChannelMembershipMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opBatchCreateChannelMembership(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "BatchCreateChannelMembership", - } -} diff --git a/service/chime/api_op_CreateAppInstance.go b/service/chime/api_op_CreateAppInstance.go deleted file mode 100644 index 5aa583b888e..00000000000 --- a/service/chime/api_op_CreateAppInstance.go +++ /dev/null @@ -1,248 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an Amazon Chime SDK messaging AppInstance under an AWS account. Only -// SDK messaging customers use this API. CreateAppInstance supports idempotency -// behavior as described in the AWS API Standard. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateAppInstance], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateAppInstance in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateAppInstance]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_CreateAppInstance.html -func (c *Client) CreateAppInstance(ctx context.Context, params *CreateAppInstanceInput, optFns ...func(*Options)) (*CreateAppInstanceOutput, error) { - if params == nil { - params = &CreateAppInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateAppInstance", params, optFns, c.addOperationCreateAppInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateAppInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateAppInstanceInput struct { - - // The ClientRequestToken of the AppInstance . - // - // This member is required. - ClientRequestToken *string - - // The name of the AppInstance . - // - // This member is required. - Name *string - - // The metadata of the AppInstance . Limited to a 1KB string in UTF-8. - Metadata *string - - // Tags assigned to the AppInstance . - Tags []types.Tag - - noSmithyDocumentSerde -} - -type CreateAppInstanceOutput struct { - - // The Amazon Resource Number (ARN) of the AppInstance . - AppInstanceArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateAppInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAppInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAppInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAppInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opCreateAppInstanceMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateAppInstanceMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateAppInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAppInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opCreateAppInstanceMiddleware struct { -} - -func (*endpointPrefix_opCreateAppInstanceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateAppInstanceMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opCreateAppInstanceMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opCreateAppInstanceMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -type idempotencyToken_initializeOpCreateAppInstance struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateAppInstance) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateAppInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAppInstanceInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateAppInstanceMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAppInstance{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateAppInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateAppInstance", - } -} diff --git a/service/chime/api_op_CreateAppInstanceAdmin.go b/service/chime/api_op_CreateAppInstanceAdmin.go deleted file mode 100644 index 8193738b590..00000000000 --- a/service/chime/api_op_CreateAppInstanceAdmin.go +++ /dev/null @@ -1,214 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Promotes an AppInstanceUser to an AppInstanceAdmin . The promoted user can -// perform the following actions. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateAppInstanceAdmin], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// - ChannelModerator actions across all channels in the AppInstance . -// -// - DeleteChannelMessage actions. -// -// Only an AppInstanceUser can be promoted to an AppInstanceAdmin role. -// -// Deprecated: Replaced by CreateAppInstanceAdmin in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateAppInstanceAdmin]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_CreateAppInstanceAdmin.html -func (c *Client) CreateAppInstanceAdmin(ctx context.Context, params *CreateAppInstanceAdminInput, optFns ...func(*Options)) (*CreateAppInstanceAdminOutput, error) { - if params == nil { - params = &CreateAppInstanceAdminInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateAppInstanceAdmin", params, optFns, c.addOperationCreateAppInstanceAdminMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateAppInstanceAdminOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateAppInstanceAdminInput struct { - - // The ARN of the administrator of the current AppInstance . - // - // This member is required. - AppInstanceAdminArn *string - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - noSmithyDocumentSerde -} - -type CreateAppInstanceAdminOutput struct { - - // The name and ARN of the admin for the AppInstance . - AppInstanceAdmin *types.Identity - - // The ARN of the of the admin for the AppInstance . - AppInstanceArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateAppInstanceAdminMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAppInstanceAdmin{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAppInstanceAdmin{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAppInstanceAdmin"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opCreateAppInstanceAdminMiddleware(stack); err != nil { - return err - } - if err = addOpCreateAppInstanceAdminValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAppInstanceAdmin(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opCreateAppInstanceAdminMiddleware struct { -} - -func (*endpointPrefix_opCreateAppInstanceAdminMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateAppInstanceAdminMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opCreateAppInstanceAdminMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opCreateAppInstanceAdminMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opCreateAppInstanceAdmin(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateAppInstanceAdmin", - } -} diff --git a/service/chime/api_op_CreateAppInstanceUser.go b/service/chime/api_op_CreateAppInstanceUser.go deleted file mode 100644 index 7db4af34ba8..00000000000 --- a/service/chime/api_op_CreateAppInstanceUser.go +++ /dev/null @@ -1,257 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a user under an Amazon Chime AppInstance . The request consists of a -// unique appInstanceUserId and Name for that user. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateAppInstanceUser], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateAppInstanceUser in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateAppInstanceUser]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_CreateAppInstanceUser.html -func (c *Client) CreateAppInstanceUser(ctx context.Context, params *CreateAppInstanceUserInput, optFns ...func(*Options)) (*CreateAppInstanceUserOutput, error) { - if params == nil { - params = &CreateAppInstanceUserInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateAppInstanceUser", params, optFns, c.addOperationCreateAppInstanceUserMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateAppInstanceUserOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateAppInstanceUserInput struct { - - // The ARN of the AppInstance request. - // - // This member is required. - AppInstanceArn *string - - // The user ID of the AppInstance . - // - // This member is required. - AppInstanceUserId *string - - // The token assigned to the user requesting an AppInstance . - // - // This member is required. - ClientRequestToken *string - - // The user's name. - // - // This member is required. - Name *string - - // The request's metadata. Limited to a 1KB string in UTF-8. - Metadata *string - - // Tags assigned to the AppInstanceUser . - Tags []types.Tag - - noSmithyDocumentSerde -} - -type CreateAppInstanceUserOutput struct { - - // The user's ARN. - AppInstanceUserArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAppInstanceUser"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opCreateAppInstanceUserMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateAppInstanceUserMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateAppInstanceUserValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAppInstanceUser(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opCreateAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opCreateAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opCreateAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opCreateAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -type idempotencyToken_initializeOpCreateAppInstanceUser struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateAppInstanceUser) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateAppInstanceUserInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateAppInstanceUserInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateAppInstanceUserMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateAppInstanceUser{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateAppInstanceUser", - } -} diff --git a/service/chime/api_op_CreateAttendee.go b/service/chime/api_op_CreateAttendee.go deleted file mode 100644 index b9628ad0c22..00000000000 --- a/service/chime/api_op_CreateAttendee.go +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new attendee for an active Amazon Chime SDK meeting. For more -// -// information about the Amazon Chime SDK, see [Using the Amazon Chime SDK]in the Amazon Chime SDK Developer -// Guide. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateAttendee], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateAttendee in the Amazon Chime SDK Meetings -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -// [CreateAttendee]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateAttendee.html -func (c *Client) CreateAttendee(ctx context.Context, params *CreateAttendeeInput, optFns ...func(*Options)) (*CreateAttendeeOutput, error) { - if params == nil { - params = &CreateAttendeeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateAttendee", params, optFns, c.addOperationCreateAttendeeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateAttendeeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateAttendeeInput struct { - - // The Amazon Chime SDK external user ID. An idempotency token. Links the attendee - // to an identity managed by a builder application. - // - // This member is required. - ExternalUserId *string - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - // The tag key-value pairs. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type CreateAttendeeOutput struct { - - // The attendee information, including attendee ID and join token. - Attendee *types.Attendee - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateAttendeeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateAttendee{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateAttendee{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateAttendee"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateAttendeeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateAttendee(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateAttendee(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateAttendee", - } -} diff --git a/service/chime/api_op_CreateChannel.go b/service/chime/api_op_CreateChannel.go deleted file mode 100644 index 681441ea005..00000000000 --- a/service/chime/api_op_CreateChannel.go +++ /dev/null @@ -1,269 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a channel to which you can add users and send messages. -// -// Restriction: You can't change a channel's privacy. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateChannel], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateChannel in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateChannel]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_CreateChannel.html -func (c *Client) CreateChannel(ctx context.Context, params *CreateChannelInput, optFns ...func(*Options)) (*CreateChannelOutput, error) { - if params == nil { - params = &CreateChannelInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateChannel", params, optFns, c.addOperationCreateChannelMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateChannelOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateChannelInput struct { - - // The ARN of the channel request. - // - // This member is required. - AppInstanceArn *string - - // The client token for the request. An Idempotency token. - // - // This member is required. - ClientRequestToken *string - - // The name of the channel. - // - // This member is required. - Name *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The metadata of the creation request. Limited to 1KB and UTF-8. - Metadata *string - - // The channel mode: UNRESTRICTED or RESTRICTED . Administrators, moderators, and - // channel members can add themselves and other members to unrestricted channels. - // Only administrators and moderators can add members to restricted channels. - Mode types.ChannelMode - - // The channel's privacy level: PUBLIC or PRIVATE . Private channels aren't - // discoverable by users outside the channel. Public channels are discoverable by - // anyone in the AppInstance . - Privacy types.ChannelPrivacy - - // The tags for the creation request. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type CreateChannelOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannel{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannel{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateChannel"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opCreateChannelMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opCreateChannelMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateChannelValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannel(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opCreateChannelMiddleware struct { -} - -func (*endpointPrefix_opCreateChannelMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateChannelMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opCreateChannelMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opCreateChannelMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -type idempotencyToken_initializeOpCreateChannel struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateChannel) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateChannelInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateChannelInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateChannelMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateChannel{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateChannel(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateChannel", - } -} diff --git a/service/chime/api_op_CreateChannelBan.go b/service/chime/api_op_CreateChannelBan.go deleted file mode 100644 index 727385081fb..00000000000 --- a/service/chime/api_op_CreateChannelBan.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Permanently bans a member from a channel. Moderators can't add banned members -// to a channel. To undo a ban, you first have to DeleteChannelBan , and then -// CreateChannelMembership . Bans are cleaned up when you delete users or channels. -// -// If you ban a user who is already part of a channel, that user is automatically -// kicked from the channel. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateChannelBan], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateChannelBan in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateChannelBan]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_CreateChannelBan.html -func (c *Client) CreateChannelBan(ctx context.Context, params *CreateChannelBanInput, optFns ...func(*Options)) (*CreateChannelBanOutput, error) { - if params == nil { - params = &CreateChannelBanInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateChannelBan", params, optFns, c.addOperationCreateChannelBanMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateChannelBanOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateChannelBanInput struct { - - // The ARN of the ban request. - // - // This member is required. - ChannelArn *string - - // The ARN of the member being banned. - // - // This member is required. - MemberArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type CreateChannelBanOutput struct { - - // The ARN of the response to the ban request. - ChannelArn *string - - // The ChannelArn and BannedIdentity of the member in the ban response. - Member *types.Identity - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateChannelBanMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannelBan{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannelBan{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateChannelBan"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opCreateChannelBanMiddleware(stack); err != nil { - return err - } - if err = addOpCreateChannelBanValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannelBan(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opCreateChannelBanMiddleware struct { -} - -func (*endpointPrefix_opCreateChannelBanMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateChannelBanMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opCreateChannelBanMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opCreateChannelBanMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opCreateChannelBan(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateChannelBan", - } -} diff --git a/service/chime/api_op_CreateChannelMembership.go b/service/chime/api_op_CreateChannelMembership.go deleted file mode 100644 index 5fd7c2c5be4..00000000000 --- a/service/chime/api_op_CreateChannelMembership.go +++ /dev/null @@ -1,239 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds a user to a channel. The InvitedBy response field is derived from the -// request header. A channel member can: -// -// - List messages -// -// - Send messages -// -// - Receive messages -// -// - Edit their own messages -// -// - Leave the channel -// -// Privacy settings impact this action as follows: -// -// - Public Channels: You do not need to be a member to list messages, but you -// must be a member to send messages. -// -// - Private Channels: You must be a member to list or send messages. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateChannelMembership], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateChannelMembership in the Amazon Chime SDK -// Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateChannelMembership]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_CreateChannelMembership.html -func (c *Client) CreateChannelMembership(ctx context.Context, params *CreateChannelMembershipInput, optFns ...func(*Options)) (*CreateChannelMembershipOutput, error) { - if params == nil { - params = &CreateChannelMembershipInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateChannelMembership", params, optFns, c.addOperationCreateChannelMembershipMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateChannelMembershipOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateChannelMembershipInput struct { - - // The ARN of the channel to which you're adding users. - // - // This member is required. - ChannelArn *string - - // The ARN of the member you want to add to the channel. - // - // This member is required. - MemberArn *string - - // The membership type of a user, DEFAULT or HIDDEN . Default members are always - // returned as part of ListChannelMemberships . Hidden members are only returned if - // the type filter in ListChannelMemberships equals HIDDEN . Otherwise hidden - // members are not returned. This is only supported by moderators. - // - // This member is required. - Type types.ChannelMembershipType - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type CreateChannelMembershipOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // The ARN and metadata of the member being added. - Member *types.Identity - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateChannelMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannelMembership{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannelMembership{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateChannelMembership"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opCreateChannelMembershipMiddleware(stack); err != nil { - return err - } - if err = addOpCreateChannelMembershipValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannelMembership(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opCreateChannelMembershipMiddleware struct { -} - -func (*endpointPrefix_opCreateChannelMembershipMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateChannelMembershipMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opCreateChannelMembershipMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opCreateChannelMembershipMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opCreateChannelMembership(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateChannelMembership", - } -} diff --git a/service/chime/api_op_CreateChannelModerator.go b/service/chime/api_op_CreateChannelModerator.go deleted file mode 100644 index 4b3db826efc..00000000000 --- a/service/chime/api_op_CreateChannelModerator.go +++ /dev/null @@ -1,223 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new ChannelModerator . A channel moderator can: -// -// - Add and remove other members of the channel. -// -// - Add and remove other moderators of the channel. -// -// - Add and remove user bans for the channel. -// -// - Redact messages in the channel. -// -// - List messages in the channel. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateChannelModerator], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateChannelModerator in the Amazon Chime SDK -// Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateChannelModerator]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_CreateChannelModerator.html -func (c *Client) CreateChannelModerator(ctx context.Context, params *CreateChannelModeratorInput, optFns ...func(*Options)) (*CreateChannelModeratorOutput, error) { - if params == nil { - params = &CreateChannelModeratorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateChannelModerator", params, optFns, c.addOperationCreateChannelModeratorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateChannelModeratorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateChannelModeratorInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The ARN of the moderator. - // - // This member is required. - ChannelModeratorArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type CreateChannelModeratorOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // The ARNs of the channel and the moderator. - ChannelModerator *types.Identity - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateChannelModeratorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateChannelModerator{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateChannelModerator{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateChannelModerator"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opCreateChannelModeratorMiddleware(stack); err != nil { - return err - } - if err = addOpCreateChannelModeratorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateChannelModerator(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opCreateChannelModeratorMiddleware struct { -} - -func (*endpointPrefix_opCreateChannelModeratorMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opCreateChannelModeratorMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opCreateChannelModeratorMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opCreateChannelModeratorMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opCreateChannelModerator(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateChannelModerator", - } -} diff --git a/service/chime/api_op_CreateMediaCapturePipeline.go b/service/chime/api_op_CreateMediaCapturePipeline.go deleted file mode 100644 index de827566235..00000000000 --- a/service/chime/api_op_CreateMediaCapturePipeline.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a media capture pipeline. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateMediaCapturePipeline], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateMediaCapturePipeline in the Amazon Chime SDK -// Media Pipelines Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateMediaCapturePipeline]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_media-pipelines-chime_CreateMediaCapturePipeline -func (c *Client) CreateMediaCapturePipeline(ctx context.Context, params *CreateMediaCapturePipelineInput, optFns ...func(*Options)) (*CreateMediaCapturePipelineOutput, error) { - if params == nil { - params = &CreateMediaCapturePipelineInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateMediaCapturePipeline", params, optFns, c.addOperationCreateMediaCapturePipelineMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateMediaCapturePipelineOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateMediaCapturePipelineInput struct { - - // The ARN of the sink type. - // - // This member is required. - SinkArn *string - - // Destination type to which the media artifacts are saved. You must use an S3 - // bucket. - // - // This member is required. - SinkType types.MediaPipelineSinkType - - // ARN of the source from which the media artifacts are captured. - // - // This member is required. - SourceArn *string - - // Source type from which the media artifacts will be captured. A Chime SDK - // Meeting is the only supported source. - // - // This member is required. - SourceType types.MediaPipelineSourceType - - // The configuration for a specified media capture pipeline. SourceType must be - // ChimeSdkMeeting . - ChimeSdkMeetingConfiguration *types.ChimeSdkMeetingConfiguration - - // The unique identifier for the client request. The token makes the API request - // idempotent. Use a different token for different media pipeline requests. - ClientRequestToken *string - - noSmithyDocumentSerde -} - -type CreateMediaCapturePipelineOutput struct { - - // A media capture pipeline object, the ID, source type, source ARN, sink type, - // and sink ARN of a media capture pipeline object. - MediaCapturePipeline *types.MediaCapturePipeline - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateMediaCapturePipelineMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateMediaCapturePipeline{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateMediaCapturePipeline{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateMediaCapturePipeline"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateMediaCapturePipelineMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateMediaCapturePipelineValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMediaCapturePipeline(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateMediaCapturePipeline struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateMediaCapturePipeline) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateMediaCapturePipeline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateMediaCapturePipelineInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateMediaCapturePipelineInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateMediaCapturePipelineMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateMediaCapturePipeline{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateMediaCapturePipeline(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateMediaCapturePipeline", - } -} diff --git a/service/chime/api_op_CreateMeeting.go b/service/chime/api_op_CreateMeeting.go deleted file mode 100644 index 374f7ddc4fe..00000000000 --- a/service/chime/api_op_CreateMeeting.go +++ /dev/null @@ -1,231 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new Amazon Chime SDK meeting in the specified media Region with no -// initial attendees. For more information about specifying media Regions, see [Amazon Chime SDK Media Regions]in -// the Amazon Chime SDK Developer Guide . For more information about the Amazon -// Chime SDK, see [Using the Amazon Chime SDK]in the Amazon Chime SDK Developer Guide. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateMeeting], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateMeeting in the Amazon Chime SDK Meetings Namespace -// -// [CreateMeeting]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateMeeting.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [Amazon Chime SDK Media Regions]: https://docs.aws.amazon.com/chime-sdk/latest/dg/chime-sdk-meetings-regions.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -func (c *Client) CreateMeeting(ctx context.Context, params *CreateMeetingInput, optFns ...func(*Options)) (*CreateMeetingOutput, error) { - if params == nil { - params = &CreateMeetingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateMeeting", params, optFns, c.addOperationCreateMeetingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateMeetingOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateMeetingInput struct { - - // The unique identifier for the client request. Use a different token for - // different meetings. - // - // This member is required. - ClientRequestToken *string - - // The external meeting ID. - ExternalMeetingId *string - - // The Region in which to create the meeting. Default: us-east-1 . - // - // Available values: af-south-1 , ap-northeast-1 , ap-northeast-2 , ap-south-1 , - // ap-southeast-1 , ap-southeast-2 , ca-central-1 , eu-central-1 , eu-north-1 , - // eu-south-1 , eu-west-1 , eu-west-2 , eu-west-3 , sa-east-1 , us-east-1 , - // us-east-2 , us-west-1 , us-west-2 . - MediaRegion *string - - // Reserved. - MeetingHostId *string - - // The configuration for resource targets to receive notifications when meeting - // and attendee events occur. - NotificationsConfiguration *types.MeetingNotificationConfiguration - - // The tag key-value pairs. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type CreateMeetingOutput struct { - - // The meeting information, including the meeting ID and MediaPlacement . - Meeting *types.Meeting - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateMeetingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateMeeting{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateMeeting{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateMeeting"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateMeetingMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateMeetingValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMeeting(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateMeeting struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateMeeting) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateMeeting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateMeetingInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateMeetingInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateMeetingMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateMeeting{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateMeeting(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateMeeting", - } -} diff --git a/service/chime/api_op_CreateMeetingDialOut.go b/service/chime/api_op_CreateMeetingDialOut.go index 2bbb9596c3b..cbae02f4146 100644 --- a/service/chime/api_op_CreateMeetingDialOut.go +++ b/service/chime/api_op_CreateMeetingDialOut.go @@ -19,7 +19,7 @@ import ( // CreateSipMediaApplicationCall action with the corresponding SIP media // application ID. // -// This API is is not available in a dedicated namespace. +// This API is not available in a dedicated namespace. func (c *Client) CreateMeetingDialOut(ctx context.Context, params *CreateMeetingDialOutInput, optFns ...func(*Options)) (*CreateMeetingDialOutOutput, error) { if params == nil { params = &CreateMeetingDialOutInput{} diff --git a/service/chime/api_op_CreateMeetingWithAttendees.go b/service/chime/api_op_CreateMeetingWithAttendees.go deleted file mode 100644 index c42e2b24bc7..00000000000 --- a/service/chime/api_op_CreateMeetingWithAttendees.go +++ /dev/null @@ -1,244 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a new Amazon Chime SDK meeting in the specified media Region, with -// -// attendees. For more information about specifying media Regions, see [Amazon Chime SDK Media Regions]in the -// Amazon Chime SDK Developer Guide . For more information about the Amazon Chime -// SDK, see [Using the Amazon Chime SDK]in the Amazon Chime SDK Developer Guide . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateMeetingWithAttendees], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateMeetingWithAttendees in the Amazon Chime SDK -// Meetings Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [Amazon Chime SDK Media Regions]: https://docs.aws.amazon.com/chime-sdk/latest/dg/chime-sdk-meetings-regions.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -// [CreateMeetingWithAttendees]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateMeetingWithAttendees.html -func (c *Client) CreateMeetingWithAttendees(ctx context.Context, params *CreateMeetingWithAttendeesInput, optFns ...func(*Options)) (*CreateMeetingWithAttendeesOutput, error) { - if params == nil { - params = &CreateMeetingWithAttendeesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateMeetingWithAttendees", params, optFns, c.addOperationCreateMeetingWithAttendeesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateMeetingWithAttendeesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateMeetingWithAttendeesInput struct { - - // The unique identifier for the client request. Use a different token for - // different meetings. - // - // This member is required. - ClientRequestToken *string - - // The request containing the attendees to create. - Attendees []types.CreateAttendeeRequestItem - - // The external meeting ID. - ExternalMeetingId *string - - // The Region in which to create the meeting. Default: us-east-1 . - // - // Available values: af-south-1 , ap-northeast-1 , ap-northeast-2 , ap-south-1 , - // ap-southeast-1 , ap-southeast-2 , ca-central-1 , eu-central-1 , eu-north-1 , - // eu-south-1 , eu-west-1 , eu-west-2 , eu-west-3 , sa-east-1 , us-east-1 , - // us-east-2 , us-west-1 , us-west-2 . - MediaRegion *string - - // Reserved. - MeetingHostId *string - - // The resource target configurations for receiving Amazon Chime SDK meeting and - // attendee event notifications. The Amazon Chime SDK supports resource targets - // located in the US East (N. Virginia) AWS Region (us-east-1). - NotificationsConfiguration *types.MeetingNotificationConfiguration - - // The tag key-value pairs. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type CreateMeetingWithAttendeesOutput struct { - - // The attendee information, including attendees IDs and join tokens. - Attendees []types.Attendee - - // If the action fails for one or more of the attendees in the request, a list of - // the attendees is returned, along with error codes and error messages. - Errors []types.CreateAttendeeError - - // A meeting created using the Amazon Chime SDK. - Meeting *types.Meeting - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateMeetingWithAttendeesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateMeetingWithAttendees{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateMeetingWithAttendees{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateMeetingWithAttendees"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addIdempotencyToken_opCreateMeetingWithAttendeesMiddleware(stack, options); err != nil { - return err - } - if err = addOpCreateMeetingWithAttendeesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateMeetingWithAttendees(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type idempotencyToken_initializeOpCreateMeetingWithAttendees struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpCreateMeetingWithAttendees) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpCreateMeetingWithAttendees) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*CreateMeetingWithAttendeesInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *CreateMeetingWithAttendeesInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opCreateMeetingWithAttendeesMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpCreateMeetingWithAttendees{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opCreateMeetingWithAttendees(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateMeetingWithAttendees", - } -} diff --git a/service/chime/api_op_CreateProxySession.go b/service/chime/api_op_CreateProxySession.go deleted file mode 100644 index cf659899d60..00000000000 --- a/service/chime/api_op_CreateProxySession.go +++ /dev/null @@ -1,197 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a proxy session on the specified Amazon Chime Voice Connector for the -// specified participant phone numbers. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateProxySession], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateProxySession in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateProxySession]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_CreateProxySession.html -func (c *Client) CreateProxySession(ctx context.Context, params *CreateProxySessionInput, optFns ...func(*Options)) (*CreateProxySessionOutput, error) { - if params == nil { - params = &CreateProxySessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateProxySession", params, optFns, c.addOperationCreateProxySessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateProxySessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateProxySessionInput struct { - - // The proxy session capabilities. - // - // This member is required. - Capabilities []types.Capability - - // The participant phone numbers. - // - // This member is required. - ParticipantPhoneNumbers []string - - // The Amazon Chime voice connector ID. - // - // This member is required. - VoiceConnectorId *string - - // The number of minutes allowed for the proxy session. - ExpiryMinutes *int32 - - // The preference for matching the country or area code of the proxy phone number - // with that of the first participant. - GeoMatchLevel types.GeoMatchLevel - - // The country and area code for the proxy phone number. - GeoMatchParams *types.GeoMatchParams - - // The name of the proxy session. - Name *string - - // The preference for proxy phone number reuse, or stickiness, between the same - // participants across sessions. - NumberSelectionBehavior types.NumberSelectionBehavior - - noSmithyDocumentSerde -} - -type CreateProxySessionOutput struct { - - // The proxy session details. - ProxySession *types.ProxySession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateProxySessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateProxySession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateProxySession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateProxySession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateProxySessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateProxySession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateProxySession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateProxySession", - } -} diff --git a/service/chime/api_op_CreateSipMediaApplication.go b/service/chime/api_op_CreateSipMediaApplication.go deleted file mode 100644 index 0bba3bd81d7..00000000000 --- a/service/chime/api_op_CreateSipMediaApplication.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a SIP media application. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateSipMediaApplication], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateSipMediaApplication in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateSipMediaApplication]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_CreateSipMediaApplication.html -func (c *Client) CreateSipMediaApplication(ctx context.Context, params *CreateSipMediaApplicationInput, optFns ...func(*Options)) (*CreateSipMediaApplicationOutput, error) { - if params == nil { - params = &CreateSipMediaApplicationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSipMediaApplication", params, optFns, c.addOperationCreateSipMediaApplicationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSipMediaApplicationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSipMediaApplicationInput struct { - - // The AWS Region assigned to the SIP media application. - // - // This member is required. - AwsRegion *string - - // List of endpoints (Lambda Amazon Resource Names) specified for the SIP media - // application. Currently, only one endpoint is supported. - // - // This member is required. - Endpoints []types.SipMediaApplicationEndpoint - - // The SIP media application name. - // - // This member is required. - Name *string - - noSmithyDocumentSerde -} - -type CreateSipMediaApplicationOutput struct { - - // The SIP media application details. - SipMediaApplication *types.SipMediaApplication - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSipMediaApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSipMediaApplication{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSipMediaApplication{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSipMediaApplication"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateSipMediaApplicationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSipMediaApplication(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSipMediaApplication(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSipMediaApplication", - } -} diff --git a/service/chime/api_op_CreateSipMediaApplicationCall.go b/service/chime/api_op_CreateSipMediaApplicationCall.go deleted file mode 100644 index b589add9bb0..00000000000 --- a/service/chime/api_op_CreateSipMediaApplicationCall.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an outbound call to a phone number from the phone number specified in -// the request, and it invokes the endpoint of the specified sipMediaApplicationId . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateSipMediaApplicationCall], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateSipMediaApplicationCall in the Amazon Chime SDK -// Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateSipMediaApplicationCall]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_CreateSipMediaApplicationCall.html -func (c *Client) CreateSipMediaApplicationCall(ctx context.Context, params *CreateSipMediaApplicationCallInput, optFns ...func(*Options)) (*CreateSipMediaApplicationCallOutput, error) { - if params == nil { - params = &CreateSipMediaApplicationCallInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSipMediaApplicationCall", params, optFns, c.addOperationCreateSipMediaApplicationCallMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSipMediaApplicationCallOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSipMediaApplicationCallInput struct { - - // The phone number that a user calls from. This is a phone number in your Amazon - // Chime phone number inventory. - // - // This member is required. - FromPhoneNumber *string - - // The ID of the SIP media application. - // - // This member is required. - SipMediaApplicationId *string - - // The phone number that the service should call. - // - // This member is required. - ToPhoneNumber *string - - // The SIP headers added to an outbound call leg. - SipHeaders map[string]string - - noSmithyDocumentSerde -} - -type CreateSipMediaApplicationCallOutput struct { - - // The actual call. - SipMediaApplicationCall *types.SipMediaApplicationCall - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSipMediaApplicationCallMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSipMediaApplicationCall{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSipMediaApplicationCall{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSipMediaApplicationCall"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateSipMediaApplicationCallValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSipMediaApplicationCall(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSipMediaApplicationCall(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSipMediaApplicationCall", - } -} diff --git a/service/chime/api_op_CreateSipRule.go b/service/chime/api_op_CreateSipRule.go deleted file mode 100644 index 09b7229ff58..00000000000 --- a/service/chime/api_op_CreateSipRule.go +++ /dev/null @@ -1,195 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a SIP rule which can be used to run a SIP media application as a target -// for a specific trigger type. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateSipRule], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateSipRule in the Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateSipRule]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_CreateSipRule.html -func (c *Client) CreateSipRule(ctx context.Context, params *CreateSipRuleInput, optFns ...func(*Options)) (*CreateSipRuleOutput, error) { - if params == nil { - params = &CreateSipRuleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateSipRule", params, optFns, c.addOperationCreateSipRuleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateSipRuleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateSipRuleInput struct { - - // The name of the SIP rule. - // - // This member is required. - Name *string - - // List of SIP media applications with priority and AWS Region. Only one SIP - // application per AWS Region can be used. - // - // This member is required. - TargetApplications []types.SipRuleTargetApplication - - // The type of trigger assigned to the SIP rule in TriggerValue , currently - // RequestUriHostname or ToPhoneNumber . - // - // This member is required. - TriggerType types.SipRuleTriggerType - - // If TriggerType is RequestUriHostname , the value can be the outbound host name - // of an Amazon Chime Voice Connector. If TriggerType is ToPhoneNumber , the value - // can be a customer-owned phone number in the E164 format. The SipMediaApplication - // specified in the SipRule is triggered if the request URI in an incoming SIP - // request matches the RequestUriHostname , or if the To header in the incoming - // SIP request matches the ToPhoneNumber value. - // - // This member is required. - TriggerValue *string - - // Enables or disables a rule. You must disable rules before you can delete them. - Disabled *bool - - noSmithyDocumentSerde -} - -type CreateSipRuleOutput struct { - - // Returns the SIP rule information, including the rule ID, triggers, and target - // applications. - SipRule *types.SipRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateSipRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSipRule{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSipRule{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateSipRule"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateSipRuleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSipRule(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateSipRule(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateSipRule", - } -} diff --git a/service/chime/api_op_CreateVoiceConnector.go b/service/chime/api_op_CreateVoiceConnector.go deleted file mode 100644 index 0575987217a..00000000000 --- a/service/chime/api_op_CreateVoiceConnector.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an Amazon Chime Voice Connector under the administrator's AWS account. -// You can choose to create an Amazon Chime Voice Connector in a specific AWS -// Region. -// -// Enabling CreateVoiceConnectorRequest$RequireEncryption configures your Amazon Chime Voice Connector to use TLS transport for -// SIP signaling and Secure RTP (SRTP) for media. Inbound calls use TLS transport, -// and unencrypted outbound calls are blocked. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateVoiceConnector], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateVoiceConnector in the Amazon Chime SDK Voice -// Namespace -// -// [CreateVoiceConnector]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_CreateVoiceConnector.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) CreateVoiceConnector(ctx context.Context, params *CreateVoiceConnectorInput, optFns ...func(*Options)) (*CreateVoiceConnectorOutput, error) { - if params == nil { - params = &CreateVoiceConnectorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVoiceConnector", params, optFns, c.addOperationCreateVoiceConnectorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVoiceConnectorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVoiceConnectorInput struct { - - // The name of the Amazon Chime Voice Connector. - // - // This member is required. - Name *string - - // When enabled, requires encryption for the Amazon Chime Voice Connector. - // - // This member is required. - RequireEncryption *bool - - // The AWS Region in which the Amazon Chime Voice Connector is created. Default - // value: us-east-1 . - AwsRegion types.VoiceConnectorAwsRegion - - noSmithyDocumentSerde -} - -type CreateVoiceConnectorOutput struct { - - // The Amazon Chime Voice Connector details. - VoiceConnector *types.VoiceConnector - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVoiceConnectorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateVoiceConnector{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateVoiceConnector{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVoiceConnector"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateVoiceConnectorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVoiceConnector(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVoiceConnector(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVoiceConnector", - } -} diff --git a/service/chime/api_op_CreateVoiceConnectorGroup.go b/service/chime/api_op_CreateVoiceConnectorGroup.go deleted file mode 100644 index f93ad817981..00000000000 --- a/service/chime/api_op_CreateVoiceConnectorGroup.go +++ /dev/null @@ -1,178 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates an Amazon Chime Voice Connector group under the administrator's AWS -// account. You can associate Amazon Chime Voice Connectors with the Amazon Chime -// Voice Connector group by including VoiceConnectorItems in the request. -// -// You can include Amazon Chime Voice Connectors from different AWS Regions in -// your group. This creates a fault tolerant mechanism for fallback in case of -// availability events. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [CreateVoiceConnectorGroup], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by CreateVoiceConnectorGroup in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [CreateVoiceConnectorGroup]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_CreateVoiceConnectorGroup.html -func (c *Client) CreateVoiceConnectorGroup(ctx context.Context, params *CreateVoiceConnectorGroupInput, optFns ...func(*Options)) (*CreateVoiceConnectorGroupOutput, error) { - if params == nil { - params = &CreateVoiceConnectorGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateVoiceConnectorGroup", params, optFns, c.addOperationCreateVoiceConnectorGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateVoiceConnectorGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateVoiceConnectorGroupInput struct { - - // The name of the Amazon Chime Voice Connector group. - // - // This member is required. - Name *string - - // The Amazon Chime Voice Connectors to route inbound calls to. - VoiceConnectorItems []types.VoiceConnectorItem - - noSmithyDocumentSerde -} - -type CreateVoiceConnectorGroupOutput struct { - - // The Amazon Chime Voice Connector group details. - VoiceConnectorGroup *types.VoiceConnectorGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateVoiceConnectorGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateVoiceConnectorGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateVoiceConnectorGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateVoiceConnectorGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateVoiceConnectorGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateVoiceConnectorGroup", - } -} diff --git a/service/chime/api_op_DeleteAppInstance.go b/service/chime/api_op_DeleteAppInstance.go deleted file mode 100644 index 0106c96ac1b..00000000000 --- a/service/chime/api_op_DeleteAppInstance.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes an AppInstance and all associated data asynchronously. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteAppInstance], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteAppInstance in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteAppInstance]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_DeleteAppInstance.html -func (c *Client) DeleteAppInstance(ctx context.Context, params *DeleteAppInstanceInput, optFns ...func(*Options)) (*DeleteAppInstanceOutput, error) { - if params == nil { - params = &DeleteAppInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteAppInstance", params, optFns, c.addOperationDeleteAppInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteAppInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteAppInstanceInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - noSmithyDocumentSerde -} - -type DeleteAppInstanceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteAppInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAppInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAppInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAppInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDeleteAppInstanceMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteAppInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDeleteAppInstanceMiddleware struct { -} - -func (*endpointPrefix_opDeleteAppInstanceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteAppInstanceMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDeleteAppInstanceMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDeleteAppInstanceMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDeleteAppInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteAppInstance", - } -} diff --git a/service/chime/api_op_DeleteAppInstanceAdmin.go b/service/chime/api_op_DeleteAppInstanceAdmin.go deleted file mode 100644 index 84849be3b4d..00000000000 --- a/service/chime/api_op_DeleteAppInstanceAdmin.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Demotes an AppInstanceAdmin to an AppInstanceUser . This action does not delete -// the user. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteAppInstanceAdmin], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteAppInstanceAdmin in the Amazon Chime SDK Identity -// Namespace -// -// [DeleteAppInstanceAdmin]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_DeleteAppInstanceAdmin.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) DeleteAppInstanceAdmin(ctx context.Context, params *DeleteAppInstanceAdminInput, optFns ...func(*Options)) (*DeleteAppInstanceAdminOutput, error) { - if params == nil { - params = &DeleteAppInstanceAdminInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteAppInstanceAdmin", params, optFns, c.addOperationDeleteAppInstanceAdminMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteAppInstanceAdminOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteAppInstanceAdminInput struct { - - // The ARN of the AppInstance 's administrator. - // - // This member is required. - AppInstanceAdminArn *string - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - noSmithyDocumentSerde -} - -type DeleteAppInstanceAdminOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteAppInstanceAdminMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAppInstanceAdmin{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAppInstanceAdmin{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAppInstanceAdmin"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDeleteAppInstanceAdminMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteAppInstanceAdminValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppInstanceAdmin(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDeleteAppInstanceAdminMiddleware struct { -} - -func (*endpointPrefix_opDeleteAppInstanceAdminMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteAppInstanceAdminMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDeleteAppInstanceAdminMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDeleteAppInstanceAdminMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDeleteAppInstanceAdmin(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteAppInstanceAdmin", - } -} diff --git a/service/chime/api_op_DeleteAppInstanceStreamingConfigurations.go b/service/chime/api_op_DeleteAppInstanceStreamingConfigurations.go deleted file mode 100644 index d46df9b2c27..00000000000 --- a/service/chime/api_op_DeleteAppInstanceStreamingConfigurations.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the streaming configurations of an AppInstance . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteAppInstanceStreamingConfigurations], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteAppInstanceStreamingConfigurations in the Amazon -// Chime SDK Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteAppInstanceStreamingConfigurations]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_DeleteAppInstanceStreamingConfigurations.html -func (c *Client) DeleteAppInstanceStreamingConfigurations(ctx context.Context, params *DeleteAppInstanceStreamingConfigurationsInput, optFns ...func(*Options)) (*DeleteAppInstanceStreamingConfigurationsOutput, error) { - if params == nil { - params = &DeleteAppInstanceStreamingConfigurationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteAppInstanceStreamingConfigurations", params, optFns, c.addOperationDeleteAppInstanceStreamingConfigurationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteAppInstanceStreamingConfigurationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteAppInstanceStreamingConfigurationsInput struct { - - // The ARN of the streaming configurations being deleted. - // - // This member is required. - AppInstanceArn *string - - noSmithyDocumentSerde -} - -type DeleteAppInstanceStreamingConfigurationsOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteAppInstanceStreamingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAppInstanceStreamingConfigurations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAppInstanceStreamingConfigurations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAppInstanceStreamingConfigurations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteAppInstanceStreamingConfigurationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppInstanceStreamingConfigurations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteAppInstanceStreamingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteAppInstanceStreamingConfigurations", - } -} diff --git a/service/chime/api_op_DeleteAppInstanceUser.go b/service/chime/api_op_DeleteAppInstanceUser.go deleted file mode 100644 index 9b8c882e548..00000000000 --- a/service/chime/api_op_DeleteAppInstanceUser.go +++ /dev/null @@ -1,194 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes an AppInstanceUser . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteAppInstanceUser], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteAppInstanceUser in the Amazon Chime SDK Identity -// Namespace -// -// [DeleteAppInstanceUser]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_DeleteAppInstanceUser.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) DeleteAppInstanceUser(ctx context.Context, params *DeleteAppInstanceUserInput, optFns ...func(*Options)) (*DeleteAppInstanceUserOutput, error) { - if params == nil { - params = &DeleteAppInstanceUserInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteAppInstanceUser", params, optFns, c.addOperationDeleteAppInstanceUserMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteAppInstanceUserOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteAppInstanceUserInput struct { - - // The ARN of the user request being deleted. - // - // This member is required. - AppInstanceUserArn *string - - noSmithyDocumentSerde -} - -type DeleteAppInstanceUserOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAppInstanceUser"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDeleteAppInstanceUserMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteAppInstanceUserValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAppInstanceUser(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDeleteAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opDeleteAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDeleteAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDeleteAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDeleteAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteAppInstanceUser", - } -} diff --git a/service/chime/api_op_DeleteAttendee.go b/service/chime/api_op_DeleteAttendee.go deleted file mode 100644 index 318f78ae1a4..00000000000 --- a/service/chime/api_op_DeleteAttendee.go +++ /dev/null @@ -1,173 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes an attendee from the specified Amazon Chime SDK meeting and deletes -// their JoinToken . Attendees are automatically deleted when a Amazon Chime SDK -// meeting is deleted. For more information about the Amazon Chime SDK, see [Using the Amazon Chime SDK]in the -// Amazon Chime SDK Developer Guide. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteAttendee], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteAttendee in the Amazon Chime SDK Meetings -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteAttendee]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_DeleteAttendee.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -func (c *Client) DeleteAttendee(ctx context.Context, params *DeleteAttendeeInput, optFns ...func(*Options)) (*DeleteAttendeeOutput, error) { - if params == nil { - params = &DeleteAttendeeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteAttendee", params, optFns, c.addOperationDeleteAttendeeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteAttendeeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteAttendeeInput struct { - - // The Amazon Chime SDK attendee ID. - // - // This member is required. - AttendeeId *string - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - noSmithyDocumentSerde -} - -type DeleteAttendeeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteAttendeeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteAttendee{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteAttendee{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteAttendee"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteAttendeeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteAttendee(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteAttendee(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteAttendee", - } -} diff --git a/service/chime/api_op_DeleteChannel.go b/service/chime/api_op_DeleteChannel.go deleted file mode 100644 index 98326d873b0..00000000000 --- a/service/chime/api_op_DeleteChannel.go +++ /dev/null @@ -1,201 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Immediately makes a channel and its memberships inaccessible and marks them for -// deletion. This is an irreversible process. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteChannel], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteChannel in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteChannel]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DeleteChannel.html -func (c *Client) DeleteChannel(ctx context.Context, params *DeleteChannelInput, optFns ...func(*Options)) (*DeleteChannelOutput, error) { - if params == nil { - params = &DeleteChannelInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteChannel", params, optFns, c.addOperationDeleteChannelMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteChannelOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteChannelInput struct { - - // The ARN of the channel being deleted. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DeleteChannelOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannel{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannel{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteChannel"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDeleteChannelMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteChannelValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannel(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDeleteChannelMiddleware struct { -} - -func (*endpointPrefix_opDeleteChannelMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteChannelMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDeleteChannelMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDeleteChannelMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDeleteChannel(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteChannel", - } -} diff --git a/service/chime/api_op_DeleteChannelBan.go b/service/chime/api_op_DeleteChannelBan.go deleted file mode 100644 index de14a8fe4ca..00000000000 --- a/service/chime/api_op_DeleteChannelBan.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes a user from a channel's ban list. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteChannelBan], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteChannelBan in the Amazon Chime SDK Messaging -// Namespace -// -// [DeleteChannelBan]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DeleteChannelBan.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) DeleteChannelBan(ctx context.Context, params *DeleteChannelBanInput, optFns ...func(*Options)) (*DeleteChannelBanOutput, error) { - if params == nil { - params = &DeleteChannelBanInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteChannelBan", params, optFns, c.addOperationDeleteChannelBanMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteChannelBanOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteChannelBanInput struct { - - // The ARN of the channel from which the AppInstanceUser was banned. - // - // This member is required. - ChannelArn *string - - // The ARN of the AppInstanceUser that you want to reinstate. - // - // This member is required. - MemberArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DeleteChannelBanOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteChannelBanMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelBan{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelBan{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteChannelBan"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDeleteChannelBanMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteChannelBanValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelBan(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDeleteChannelBanMiddleware struct { -} - -func (*endpointPrefix_opDeleteChannelBanMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteChannelBanMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDeleteChannelBanMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDeleteChannelBanMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDeleteChannelBan(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteChannelBan", - } -} diff --git a/service/chime/api_op_DeleteChannelMembership.go b/service/chime/api_op_DeleteChannelMembership.go deleted file mode 100644 index 645cc5aa47a..00000000000 --- a/service/chime/api_op_DeleteChannelMembership.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes a member from a channel. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteChannelMembership], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteChannelMembership in the Amazon Chime SDK -// Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteChannelMembership]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DeleteChannelMembership.html -func (c *Client) DeleteChannelMembership(ctx context.Context, params *DeleteChannelMembershipInput, optFns ...func(*Options)) (*DeleteChannelMembershipOutput, error) { - if params == nil { - params = &DeleteChannelMembershipInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteChannelMembership", params, optFns, c.addOperationDeleteChannelMembershipMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteChannelMembershipOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteChannelMembershipInput struct { - - // The ARN of the channel from which you want to remove the user. - // - // This member is required. - ChannelArn *string - - // The ARN of the member that you're removing from the channel. - // - // This member is required. - MemberArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DeleteChannelMembershipOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteChannelMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelMembership{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelMembership{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteChannelMembership"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDeleteChannelMembershipMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteChannelMembershipValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelMembership(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDeleteChannelMembershipMiddleware struct { -} - -func (*endpointPrefix_opDeleteChannelMembershipMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteChannelMembershipMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDeleteChannelMembershipMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDeleteChannelMembershipMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDeleteChannelMembership(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteChannelMembership", - } -} diff --git a/service/chime/api_op_DeleteChannelMessage.go b/service/chime/api_op_DeleteChannelMessage.go deleted file mode 100644 index a54a633386c..00000000000 --- a/service/chime/api_op_DeleteChannelMessage.go +++ /dev/null @@ -1,207 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a channel message. Only admins can perform this action. Deletion makes -// messages inaccessible immediately. A background process deletes any revisions -// created by UpdateChannelMessage . -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteChannelMessage], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteChannelMessage in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteChannelMessage]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DeleteChannelMessage.html -func (c *Client) DeleteChannelMessage(ctx context.Context, params *DeleteChannelMessageInput, optFns ...func(*Options)) (*DeleteChannelMessageOutput, error) { - if params == nil { - params = &DeleteChannelMessageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteChannelMessage", params, optFns, c.addOperationDeleteChannelMessageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteChannelMessageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteChannelMessageInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The ID of the message being deleted. - // - // This member is required. - MessageId *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DeleteChannelMessageOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelMessage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelMessage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteChannelMessage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDeleteChannelMessageMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteChannelMessageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelMessage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDeleteChannelMessageMiddleware struct { -} - -func (*endpointPrefix_opDeleteChannelMessageMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteChannelMessageMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDeleteChannelMessageMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDeleteChannelMessageMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDeleteChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteChannelMessage", - } -} diff --git a/service/chime/api_op_DeleteChannelModerator.go b/service/chime/api_op_DeleteChannelModerator.go deleted file mode 100644 index 1a636d677d4..00000000000 --- a/service/chime/api_op_DeleteChannelModerator.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a channel moderator. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteChannelModerator], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteChannelModerator in the Amazon Chime SDK -// Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteChannelModerator]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DeleteChannelModerator.html -func (c *Client) DeleteChannelModerator(ctx context.Context, params *DeleteChannelModeratorInput, optFns ...func(*Options)) (*DeleteChannelModeratorOutput, error) { - if params == nil { - params = &DeleteChannelModeratorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteChannelModerator", params, optFns, c.addOperationDeleteChannelModeratorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteChannelModeratorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteChannelModeratorInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The ARN of the moderator being deleted. - // - // This member is required. - ChannelModeratorArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DeleteChannelModeratorOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteChannelModeratorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteChannelModerator{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteChannelModerator{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteChannelModerator"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDeleteChannelModeratorMiddleware(stack); err != nil { - return err - } - if err = addOpDeleteChannelModeratorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteChannelModerator(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDeleteChannelModeratorMiddleware struct { -} - -func (*endpointPrefix_opDeleteChannelModeratorMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDeleteChannelModeratorMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDeleteChannelModeratorMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDeleteChannelModeratorMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDeleteChannelModerator(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteChannelModerator", - } -} diff --git a/service/chime/api_op_DeleteMeeting.go b/service/chime/api_op_DeleteMeeting.go deleted file mode 100644 index 81fe89a1657..00000000000 --- a/service/chime/api_op_DeleteMeeting.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Amazon Chime SDK meeting. The operation deletes all -// attendees, disconnects all clients, and prevents new clients from joining the -// meeting. For more information about the Amazon Chime SDK, see [Using the Amazon Chime SDK]in the Amazon -// Chime SDK Developer Guide. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteMeeting], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteMeeting in the Amazon Chime SDK Meetings Namespace -// -// [DeleteMeeting]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_DeleteMeeting.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -func (c *Client) DeleteMeeting(ctx context.Context, params *DeleteMeetingInput, optFns ...func(*Options)) (*DeleteMeetingOutput, error) { - if params == nil { - params = &DeleteMeetingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteMeeting", params, optFns, c.addOperationDeleteMeetingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteMeetingOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteMeetingInput struct { - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - noSmithyDocumentSerde -} - -type DeleteMeetingOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteMeetingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteMeeting{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteMeeting{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteMeeting"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteMeetingValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMeeting(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteMeeting(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteMeeting", - } -} diff --git a/service/chime/api_op_DeleteProxySession.go b/service/chime/api_op_DeleteProxySession.go deleted file mode 100644 index 688635c443f..00000000000 --- a/service/chime/api_op_DeleteProxySession.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified proxy session from the specified Amazon Chime Voice -// Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteProxySession], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteProxySession in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteProxySession]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteProxySession.html -func (c *Client) DeleteProxySession(ctx context.Context, params *DeleteProxySessionInput, optFns ...func(*Options)) (*DeleteProxySessionOutput, error) { - if params == nil { - params = &DeleteProxySessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteProxySession", params, optFns, c.addOperationDeleteProxySessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteProxySessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteProxySessionInput struct { - - // The proxy session ID. - // - // This member is required. - ProxySessionId *string - - // The Amazon Chime voice connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DeleteProxySessionOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteProxySessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteProxySession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteProxySession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteProxySession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteProxySessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteProxySession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteProxySession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteProxySession", - } -} diff --git a/service/chime/api_op_DeleteSipMediaApplication.go b/service/chime/api_op_DeleteSipMediaApplication.go deleted file mode 100644 index 70bcfa223be..00000000000 --- a/service/chime/api_op_DeleteSipMediaApplication.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a SIP media application. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteSipMediaApplication], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteSipMediaApplication in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteSipMediaApplication]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteSipMediaApplication.html -func (c *Client) DeleteSipMediaApplication(ctx context.Context, params *DeleteSipMediaApplicationInput, optFns ...func(*Options)) (*DeleteSipMediaApplicationOutput, error) { - if params == nil { - params = &DeleteSipMediaApplicationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteSipMediaApplication", params, optFns, c.addOperationDeleteSipMediaApplicationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteSipMediaApplicationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteSipMediaApplicationInput struct { - - // The SIP media application ID. - // - // This member is required. - SipMediaApplicationId *string - - noSmithyDocumentSerde -} - -type DeleteSipMediaApplicationOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteSipMediaApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteSipMediaApplication{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteSipMediaApplication{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSipMediaApplication"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteSipMediaApplicationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSipMediaApplication(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteSipMediaApplication(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteSipMediaApplication", - } -} diff --git a/service/chime/api_op_DeleteSipRule.go b/service/chime/api_op_DeleteSipRule.go deleted file mode 100644 index 29ab6ea5610..00000000000 --- a/service/chime/api_op_DeleteSipRule.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a SIP rule. You must disable a SIP rule before you can delete it. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteSipRule], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteSipRule in the Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteSipRule]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteSipRule.html -func (c *Client) DeleteSipRule(ctx context.Context, params *DeleteSipRuleInput, optFns ...func(*Options)) (*DeleteSipRuleOutput, error) { - if params == nil { - params = &DeleteSipRuleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteSipRule", params, optFns, c.addOperationDeleteSipRuleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteSipRuleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteSipRuleInput struct { - - // The SIP rule ID. - // - // This member is required. - SipRuleId *string - - noSmithyDocumentSerde -} - -type DeleteSipRuleOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteSipRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteSipRule{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteSipRule{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteSipRule"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteSipRuleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSipRule(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteSipRule(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteSipRule", - } -} diff --git a/service/chime/api_op_DeleteVoiceConnector.go b/service/chime/api_op_DeleteVoiceConnector.go deleted file mode 100644 index b14b6182d4c..00000000000 --- a/service/chime/api_op_DeleteVoiceConnector.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Amazon Chime Voice Connector. Any phone numbers -// associated with the Amazon Chime Voice Connector must be disassociated from it -// before it can be deleted. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteVoiceConnector], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteVoiceConnector in the Amazon Chime SDK Voice -// Namespace -// -// [DeleteVoiceConnector]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteVoiceConnector.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) DeleteVoiceConnector(ctx context.Context, params *DeleteVoiceConnectorInput, optFns ...func(*Options)) (*DeleteVoiceConnectorOutput, error) { - if params == nil { - params = &DeleteVoiceConnectorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVoiceConnector", params, optFns, c.addOperationDeleteVoiceConnectorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVoiceConnectorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVoiceConnectorInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DeleteVoiceConnectorOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVoiceConnectorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVoiceConnector{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVoiceConnector{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVoiceConnector"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteVoiceConnectorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceConnector(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVoiceConnector(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVoiceConnector", - } -} diff --git a/service/chime/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go b/service/chime/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go deleted file mode 100644 index ba0f030c461..00000000000 --- a/service/chime/api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the emergency calling configuration details from the specified Amazon -// Chime Voice Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteVoiceConnectorEmergencyCallingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteVoiceConnectorEmergencyCallingConfiguration in -// the Amazon Chime SDK Voice Namespace -// -// [DeleteVoiceConnectorEmergencyCallingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteVoiceConnectorEmergencyCallingConfiguration.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) DeleteVoiceConnectorEmergencyCallingConfiguration(ctx context.Context, params *DeleteVoiceConnectorEmergencyCallingConfigurationInput, optFns ...func(*Options)) (*DeleteVoiceConnectorEmergencyCallingConfigurationOutput, error) { - if params == nil { - params = &DeleteVoiceConnectorEmergencyCallingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVoiceConnectorEmergencyCallingConfiguration", params, optFns, c.addOperationDeleteVoiceConnectorEmergencyCallingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVoiceConnectorEmergencyCallingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVoiceConnectorEmergencyCallingConfigurationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DeleteVoiceConnectorEmergencyCallingConfigurationOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVoiceConnectorEmergencyCallingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVoiceConnectorEmergencyCallingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceConnectorEmergencyCallingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVoiceConnectorEmergencyCallingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVoiceConnectorEmergencyCallingConfiguration", - } -} diff --git a/service/chime/api_op_DeleteVoiceConnectorGroup.go b/service/chime/api_op_DeleteVoiceConnectorGroup.go deleted file mode 100644 index 846d8195463..00000000000 --- a/service/chime/api_op_DeleteVoiceConnectorGroup.go +++ /dev/null @@ -1,166 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified Amazon Chime Voice Connector group. Any -// VoiceConnectorItems and phone numbers associated with the group must be removed -// before it can be deleted. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteVoiceConnectorGroup], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteVoiceConnectorGroup in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteVoiceConnectorGroup]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteVoiceConnectorGroup.html -func (c *Client) DeleteVoiceConnectorGroup(ctx context.Context, params *DeleteVoiceConnectorGroupInput, optFns ...func(*Options)) (*DeleteVoiceConnectorGroupOutput, error) { - if params == nil { - params = &DeleteVoiceConnectorGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVoiceConnectorGroup", params, optFns, c.addOperationDeleteVoiceConnectorGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVoiceConnectorGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVoiceConnectorGroupInput struct { - - // The Amazon Chime Voice Connector group ID. - // - // This member is required. - VoiceConnectorGroupId *string - - noSmithyDocumentSerde -} - -type DeleteVoiceConnectorGroupOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVoiceConnectorGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVoiceConnectorGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteVoiceConnectorGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceConnectorGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVoiceConnectorGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVoiceConnectorGroup", - } -} diff --git a/service/chime/api_op_DeleteVoiceConnectorOrigination.go b/service/chime/api_op_DeleteVoiceConnectorOrigination.go deleted file mode 100644 index 199ee4c05b1..00000000000 --- a/service/chime/api_op_DeleteVoiceConnectorOrigination.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the origination settings for the specified Amazon Chime Voice Connector. -// -// If emergency calling is configured for the Amazon Chime Voice Connector, it -// must be deleted prior to deleting the origination settings. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteVoiceConnectorOrigination], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteVoiceConnectorOrigination in the Amazon Chime SDK -// Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteVoiceConnectorOrigination]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteVoiceConnectorOrigination.html -func (c *Client) DeleteVoiceConnectorOrigination(ctx context.Context, params *DeleteVoiceConnectorOriginationInput, optFns ...func(*Options)) (*DeleteVoiceConnectorOriginationOutput, error) { - if params == nil { - params = &DeleteVoiceConnectorOriginationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVoiceConnectorOrigination", params, optFns, c.addOperationDeleteVoiceConnectorOriginationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVoiceConnectorOriginationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVoiceConnectorOriginationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DeleteVoiceConnectorOriginationOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVoiceConnectorOriginationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVoiceConnectorOrigination{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVoiceConnectorOrigination{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVoiceConnectorOrigination"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteVoiceConnectorOriginationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceConnectorOrigination(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVoiceConnectorOrigination(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVoiceConnectorOrigination", - } -} diff --git a/service/chime/api_op_DeleteVoiceConnectorProxy.go b/service/chime/api_op_DeleteVoiceConnectorProxy.go deleted file mode 100644 index 5799834e445..00000000000 --- a/service/chime/api_op_DeleteVoiceConnectorProxy.go +++ /dev/null @@ -1,164 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the proxy configuration from the specified Amazon Chime Voice Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteVoiceProxy], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteVoiceConnectorProxy in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteVoiceProxy]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteVoiceConnectorProxy.html -func (c *Client) DeleteVoiceConnectorProxy(ctx context.Context, params *DeleteVoiceConnectorProxyInput, optFns ...func(*Options)) (*DeleteVoiceConnectorProxyOutput, error) { - if params == nil { - params = &DeleteVoiceConnectorProxyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVoiceConnectorProxy", params, optFns, c.addOperationDeleteVoiceConnectorProxyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVoiceConnectorProxyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVoiceConnectorProxyInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DeleteVoiceConnectorProxyOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVoiceConnectorProxyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVoiceConnectorProxy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVoiceConnectorProxy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVoiceConnectorProxy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteVoiceConnectorProxyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceConnectorProxy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVoiceConnectorProxy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVoiceConnectorProxy", - } -} diff --git a/service/chime/api_op_DeleteVoiceConnectorStreamingConfiguration.go b/service/chime/api_op_DeleteVoiceConnectorStreamingConfiguration.go deleted file mode 100644 index ec4f991ab2e..00000000000 --- a/service/chime/api_op_DeleteVoiceConnectorStreamingConfiguration.go +++ /dev/null @@ -1,165 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the streaming configuration for the specified Amazon Chime Voice -// Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteVoiceConnectorStreamingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteVoiceConnectorStreamingConfiguration in the -// Amazon Chime SDK Voice Namespace -// -// [DeleteVoiceConnectorStreamingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteVoiceConnectorStreamingConfiguration.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) DeleteVoiceConnectorStreamingConfiguration(ctx context.Context, params *DeleteVoiceConnectorStreamingConfigurationInput, optFns ...func(*Options)) (*DeleteVoiceConnectorStreamingConfigurationOutput, error) { - if params == nil { - params = &DeleteVoiceConnectorStreamingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVoiceConnectorStreamingConfiguration", params, optFns, c.addOperationDeleteVoiceConnectorStreamingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVoiceConnectorStreamingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVoiceConnectorStreamingConfigurationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DeleteVoiceConnectorStreamingConfigurationOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVoiceConnectorStreamingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVoiceConnectorStreamingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVoiceConnectorStreamingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVoiceConnectorStreamingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceConnectorStreamingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVoiceConnectorStreamingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVoiceConnectorStreamingConfiguration", - } -} diff --git a/service/chime/api_op_DeleteVoiceConnectorTermination.go b/service/chime/api_op_DeleteVoiceConnectorTermination.go deleted file mode 100644 index cd68296bd09..00000000000 --- a/service/chime/api_op_DeleteVoiceConnectorTermination.go +++ /dev/null @@ -1,167 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the termination settings for the specified Amazon Chime Voice Connector. -// -// If emergency calling is configured for the Amazon Chime Voice Connector, it -// must be deleted prior to deleting the termination settings. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteVoiceConnectorTermination], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteVoiceConnectorTermination in the Amazon Chime SDK -// Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteVoiceConnectorTermination]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteVoiceConnectorTermination.html -func (c *Client) DeleteVoiceConnectorTermination(ctx context.Context, params *DeleteVoiceConnectorTerminationInput, optFns ...func(*Options)) (*DeleteVoiceConnectorTerminationOutput, error) { - if params == nil { - params = &DeleteVoiceConnectorTerminationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVoiceConnectorTermination", params, optFns, c.addOperationDeleteVoiceConnectorTerminationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVoiceConnectorTerminationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVoiceConnectorTerminationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DeleteVoiceConnectorTerminationOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVoiceConnectorTerminationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVoiceConnectorTermination{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVoiceConnectorTermination{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVoiceConnectorTermination"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteVoiceConnectorTerminationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceConnectorTermination(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVoiceConnectorTermination(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVoiceConnectorTermination", - } -} diff --git a/service/chime/api_op_DeleteVoiceConnectorTerminationCredentials.go b/service/chime/api_op_DeleteVoiceConnectorTerminationCredentials.go deleted file mode 100644 index 345705e4b0b..00000000000 --- a/service/chime/api_op_DeleteVoiceConnectorTerminationCredentials.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes the specified SIP credentials used by your equipment to authenticate -// during call termination. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DeleteVoiceConnectorTerminationCredentials], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DeleteVoiceConnectorTerminationCredentials in the -// Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DeleteVoiceConnectorTerminationCredentials]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DeleteVoiceConnectorTerminationCredentials.html -func (c *Client) DeleteVoiceConnectorTerminationCredentials(ctx context.Context, params *DeleteVoiceConnectorTerminationCredentialsInput, optFns ...func(*Options)) (*DeleteVoiceConnectorTerminationCredentialsOutput, error) { - if params == nil { - params = &DeleteVoiceConnectorTerminationCredentialsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteVoiceConnectorTerminationCredentials", params, optFns, c.addOperationDeleteVoiceConnectorTerminationCredentialsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteVoiceConnectorTerminationCredentialsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteVoiceConnectorTerminationCredentialsInput struct { - - // The RFC2617 compliant username associated with the SIP credentials, in US-ASCII - // format. - // - // This member is required. - Usernames []string - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DeleteVoiceConnectorTerminationCredentialsOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteVoiceConnectorTerminationCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteVoiceConnectorTerminationCredentials{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteVoiceConnectorTerminationCredentials{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteVoiceConnectorTerminationCredentials"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteVoiceConnectorTerminationCredentials(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteVoiceConnectorTerminationCredentials(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteVoiceConnectorTerminationCredentials", - } -} diff --git a/service/chime/api_op_DescribeAppInstance.go b/service/chime/api_op_DescribeAppInstance.go deleted file mode 100644 index f6e198ca298..00000000000 --- a/service/chime/api_op_DescribeAppInstance.go +++ /dev/null @@ -1,200 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the full details of an AppInstance . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeAppInstance], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeAppInstance in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DescribeAppInstance]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_DescribeAppInstance.html -func (c *Client) DescribeAppInstance(ctx context.Context, params *DescribeAppInstanceInput, optFns ...func(*Options)) (*DescribeAppInstanceOutput, error) { - if params == nil { - params = &DescribeAppInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAppInstance", params, optFns, c.addOperationDescribeAppInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAppInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAppInstanceInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - noSmithyDocumentSerde -} - -type DescribeAppInstanceOutput struct { - - // The ARN, metadata, created and last-updated timestamps, and the name of the - // AppInstance . All timestamps use epoch milliseconds. - AppInstance *types.AppInstance - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAppInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAppInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAppInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAppInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeAppInstanceMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeAppInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeAppInstanceMiddleware struct { -} - -func (*endpointPrefix_opDescribeAppInstanceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeAppInstanceMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeAppInstanceMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeAppInstanceMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeAppInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAppInstance", - } -} diff --git a/service/chime/api_op_DescribeAppInstanceAdmin.go b/service/chime/api_op_DescribeAppInstanceAdmin.go deleted file mode 100644 index 478107e525f..00000000000 --- a/service/chime/api_op_DescribeAppInstanceAdmin.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the full details of an AppInstanceAdmin . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeAppInstanceAdmin], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeAppInstanceAdmin in the Amazon Chime SDK -// Identity Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DescribeAppInstanceAdmin]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_DescribeAppInstanceAdmin.html -func (c *Client) DescribeAppInstanceAdmin(ctx context.Context, params *DescribeAppInstanceAdminInput, optFns ...func(*Options)) (*DescribeAppInstanceAdminOutput, error) { - if params == nil { - params = &DescribeAppInstanceAdminInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAppInstanceAdmin", params, optFns, c.addOperationDescribeAppInstanceAdminMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAppInstanceAdminOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAppInstanceAdminInput struct { - - // The ARN of the AppInstanceAdmin . - // - // This member is required. - AppInstanceAdminArn *string - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - noSmithyDocumentSerde -} - -type DescribeAppInstanceAdminOutput struct { - - // The ARN and name of the AppInstanceUser , the ARN of the AppInstance , and the - // created and last-updated timestamps. All timestamps use epoch milliseconds. - AppInstanceAdmin *types.AppInstanceAdmin - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAppInstanceAdminMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAppInstanceAdmin{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAppInstanceAdmin{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAppInstanceAdmin"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeAppInstanceAdminMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeAppInstanceAdminValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppInstanceAdmin(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeAppInstanceAdminMiddleware struct { -} - -func (*endpointPrefix_opDescribeAppInstanceAdminMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeAppInstanceAdminMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeAppInstanceAdminMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeAppInstanceAdminMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeAppInstanceAdmin(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAppInstanceAdmin", - } -} diff --git a/service/chime/api_op_DescribeAppInstanceUser.go b/service/chime/api_op_DescribeAppInstanceUser.go deleted file mode 100644 index d882f900fa7..00000000000 --- a/service/chime/api_op_DescribeAppInstanceUser.go +++ /dev/null @@ -1,199 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the full details of an AppInstanceUser . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeAppInstanceUser], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeAppInstanceUser in the Amazon Chime SDK -// Identity Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DescribeAppInstanceUser]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_DescribeAppInstanceUser.html -func (c *Client) DescribeAppInstanceUser(ctx context.Context, params *DescribeAppInstanceUserInput, optFns ...func(*Options)) (*DescribeAppInstanceUserOutput, error) { - if params == nil { - params = &DescribeAppInstanceUserInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeAppInstanceUser", params, optFns, c.addOperationDescribeAppInstanceUserMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeAppInstanceUserOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeAppInstanceUserInput struct { - - // The ARN of the AppInstanceUser . - // - // This member is required. - AppInstanceUserArn *string - - noSmithyDocumentSerde -} - -type DescribeAppInstanceUserOutput struct { - - // The name of the AppInstanceUser . - AppInstanceUser *types.AppInstanceUser - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeAppInstanceUser"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeAppInstanceUserMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeAppInstanceUserValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeAppInstanceUser(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opDescribeAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeAppInstanceUser", - } -} diff --git a/service/chime/api_op_DescribeChannel.go b/service/chime/api_op_DescribeChannel.go deleted file mode 100644 index 8eb19e5ee93..00000000000 --- a/service/chime/api_op_DescribeChannel.go +++ /dev/null @@ -1,205 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the full details of a channel in an Amazon Chime AppInstance . -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeChannel], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeChannel in the Amazon Chime SDK Messaging -// Namespace -// -// [DescribeChannel]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DescribeChannel.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) DescribeChannel(ctx context.Context, params *DescribeChannelInput, optFns ...func(*Options)) (*DescribeChannelOutput, error) { - if params == nil { - params = &DescribeChannelInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeChannel", params, optFns, c.addOperationDescribeChannelMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeChannelOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeChannelInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DescribeChannelOutput struct { - - // The channel details. - Channel *types.Channel - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannel{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannel{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeChannel"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeChannelMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeChannelValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannel(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeChannelMiddleware struct { -} - -func (*endpointPrefix_opDescribeChannelMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeChannelMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeChannelMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeChannelMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeChannel(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeChannel", - } -} diff --git a/service/chime/api_op_DescribeChannelBan.go b/service/chime/api_op_DescribeChannelBan.go deleted file mode 100644 index 56615f63718..00000000000 --- a/service/chime/api_op_DescribeChannelBan.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the full details of a channel ban. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeChannelBan], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeChannelBan in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DescribeChannelBan]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DescribeChannelBan.html -func (c *Client) DescribeChannelBan(ctx context.Context, params *DescribeChannelBanInput, optFns ...func(*Options)) (*DescribeChannelBanOutput, error) { - if params == nil { - params = &DescribeChannelBanInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeChannelBan", params, optFns, c.addOperationDescribeChannelBanMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeChannelBanOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeChannelBanInput struct { - - // The ARN of the channel from which the user is banned. - // - // This member is required. - ChannelArn *string - - // The ARN of the member being banned. - // - // This member is required. - MemberArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DescribeChannelBanOutput struct { - - // The details of the ban. - ChannelBan *types.ChannelBan - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeChannelBanMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelBan{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelBan{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeChannelBan"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeChannelBanMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeChannelBanValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelBan(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeChannelBanMiddleware struct { -} - -func (*endpointPrefix_opDescribeChannelBanMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeChannelBanMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeChannelBanMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeChannelBanMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeChannelBan(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeChannelBan", - } -} diff --git a/service/chime/api_op_DescribeChannelMembership.go b/service/chime/api_op_DescribeChannelMembership.go deleted file mode 100644 index b8ce1458c59..00000000000 --- a/service/chime/api_op_DescribeChannelMembership.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the full details of a user's channel membership. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeChannelMembership], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeChannelMembership in the Amazon Chime SDK -// Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DescribeChannelMembership]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DescribeChannelMembership.html -func (c *Client) DescribeChannelMembership(ctx context.Context, params *DescribeChannelMembershipInput, optFns ...func(*Options)) (*DescribeChannelMembershipOutput, error) { - if params == nil { - params = &DescribeChannelMembershipInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeChannelMembership", params, optFns, c.addOperationDescribeChannelMembershipMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeChannelMembershipOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeChannelMembershipInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The ARN of the member. - // - // This member is required. - MemberArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DescribeChannelMembershipOutput struct { - - // The details of the membership. - ChannelMembership *types.ChannelMembership - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeChannelMembershipMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelMembership{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelMembership{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeChannelMembership"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeChannelMembershipMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeChannelMembershipValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelMembership(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeChannelMembershipMiddleware struct { -} - -func (*endpointPrefix_opDescribeChannelMembershipMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeChannelMembershipMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeChannelMembershipMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeChannelMembershipMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeChannelMembership(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeChannelMembership", - } -} diff --git a/service/chime/api_op_DescribeChannelMembershipForAppInstanceUser.go b/service/chime/api_op_DescribeChannelMembershipForAppInstanceUser.go deleted file mode 100644 index 910e5602eb4..00000000000 --- a/service/chime/api_op_DescribeChannelMembershipForAppInstanceUser.go +++ /dev/null @@ -1,212 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the details of a channel based on the membership of the specified -// -// AppInstanceUser . -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeChannelMembershipForAppInstanceUser], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeChannelMembershipForAppInstanceUser in the -// Amazon Chime SDK Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DescribeChannelMembershipForAppInstanceUser]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DescribeChannelMembershipForAppInstanceUser.html -func (c *Client) DescribeChannelMembershipForAppInstanceUser(ctx context.Context, params *DescribeChannelMembershipForAppInstanceUserInput, optFns ...func(*Options)) (*DescribeChannelMembershipForAppInstanceUserOutput, error) { - if params == nil { - params = &DescribeChannelMembershipForAppInstanceUserInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeChannelMembershipForAppInstanceUser", params, optFns, c.addOperationDescribeChannelMembershipForAppInstanceUserMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeChannelMembershipForAppInstanceUserOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeChannelMembershipForAppInstanceUserInput struct { - - // The ARN of the user in a channel. - // - // This member is required. - AppInstanceUserArn *string - - // The ARN of the channel to which the user belongs. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DescribeChannelMembershipForAppInstanceUserOutput struct { - - // The channel to which a user belongs. - ChannelMembership *types.ChannelMembershipForAppInstanceUserSummary - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeChannelMembershipForAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelMembershipForAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelMembershipForAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeChannelMembershipForAppInstanceUser"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeChannelMembershipForAppInstanceUserMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeChannelMembershipForAppInstanceUserValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelMembershipForAppInstanceUser(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeChannelMembershipForAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opDescribeChannelMembershipForAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeChannelMembershipForAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeChannelMembershipForAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeChannelMembershipForAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeChannelMembershipForAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeChannelMembershipForAppInstanceUser", - } -} diff --git a/service/chime/api_op_DescribeChannelModeratedByAppInstanceUser.go b/service/chime/api_op_DescribeChannelModeratedByAppInstanceUser.go deleted file mode 100644 index 00ae0f46217..00000000000 --- a/service/chime/api_op_DescribeChannelModeratedByAppInstanceUser.go +++ /dev/null @@ -1,211 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the full details of a channel moderated by the specified AppInstanceUser -// . -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeChannelModeratedByAppInstanceUser], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeChannelModeratedByAppInstanceUser in the Amazon -// Chime SDK Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DescribeChannelModeratedByAppInstanceUser]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DescribeChannelModeratedByAppInstanceUser.html -func (c *Client) DescribeChannelModeratedByAppInstanceUser(ctx context.Context, params *DescribeChannelModeratedByAppInstanceUserInput, optFns ...func(*Options)) (*DescribeChannelModeratedByAppInstanceUserOutput, error) { - if params == nil { - params = &DescribeChannelModeratedByAppInstanceUserInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeChannelModeratedByAppInstanceUser", params, optFns, c.addOperationDescribeChannelModeratedByAppInstanceUserMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeChannelModeratedByAppInstanceUserOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeChannelModeratedByAppInstanceUserInput struct { - - // The ARN of the AppInstanceUser in the moderated channel. - // - // This member is required. - AppInstanceUserArn *string - - // The ARN of the moderated channel. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DescribeChannelModeratedByAppInstanceUserOutput struct { - - // The moderated channel. - Channel *types.ChannelModeratedByAppInstanceUserSummary - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeChannelModeratedByAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelModeratedByAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelModeratedByAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeChannelModeratedByAppInstanceUser"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeChannelModeratedByAppInstanceUserMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeChannelModeratedByAppInstanceUserValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelModeratedByAppInstanceUser(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeChannelModeratedByAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opDescribeChannelModeratedByAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeChannelModeratedByAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeChannelModeratedByAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeChannelModeratedByAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeChannelModeratedByAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeChannelModeratedByAppInstanceUser", - } -} diff --git a/service/chime/api_op_DescribeChannelModerator.go b/service/chime/api_op_DescribeChannelModerator.go deleted file mode 100644 index f7ded64be85..00000000000 --- a/service/chime/api_op_DescribeChannelModerator.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the full details of a single ChannelModerator. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DescribeChannelModerator], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DescribeChannelModerator in the Amazon Chime SDK -// Messaging Namespace -// -// [DescribeChannelModerator]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_DescribeChannelModerator.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) DescribeChannelModerator(ctx context.Context, params *DescribeChannelModeratorInput, optFns ...func(*Options)) (*DescribeChannelModeratorOutput, error) { - if params == nil { - params = &DescribeChannelModeratorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeChannelModerator", params, optFns, c.addOperationDescribeChannelModeratorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeChannelModeratorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeChannelModeratorInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The ARN of the channel moderator. - // - // This member is required. - ChannelModeratorArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type DescribeChannelModeratorOutput struct { - - // The details of the channel moderator. - ChannelModerator *types.ChannelModerator - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeChannelModeratorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeChannelModerator{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeChannelModerator{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeChannelModerator"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opDescribeChannelModeratorMiddleware(stack); err != nil { - return err - } - if err = addOpDescribeChannelModeratorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeChannelModerator(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opDescribeChannelModeratorMiddleware struct { -} - -func (*endpointPrefix_opDescribeChannelModeratorMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opDescribeChannelModeratorMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opDescribeChannelModeratorMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opDescribeChannelModeratorMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opDescribeChannelModerator(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeChannelModerator", - } -} diff --git a/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnector.go b/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnector.go deleted file mode 100644 index 8f933d8e776..00000000000 --- a/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnector.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates the specified phone numbers from the specified Amazon Chime Voice -// Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DisassociatePhoneNumbersFromVoiceConnector], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DisassociatePhoneNumbersFromVoiceConnector in the -// Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DisassociatePhoneNumbersFromVoiceConnector]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DisassociatePhoneNumbersFromVoiceConnector.html -func (c *Client) DisassociatePhoneNumbersFromVoiceConnector(ctx context.Context, params *DisassociatePhoneNumbersFromVoiceConnectorInput, optFns ...func(*Options)) (*DisassociatePhoneNumbersFromVoiceConnectorOutput, error) { - if params == nil { - params = &DisassociatePhoneNumbersFromVoiceConnectorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociatePhoneNumbersFromVoiceConnector", params, optFns, c.addOperationDisassociatePhoneNumbersFromVoiceConnectorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociatePhoneNumbersFromVoiceConnectorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociatePhoneNumbersFromVoiceConnectorInput struct { - - // List of phone numbers, in E.164 format. - // - // This member is required. - E164PhoneNumbers []string - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type DisassociatePhoneNumbersFromVoiceConnectorOutput struct { - - // If the action fails for one or more of the phone numbers in the request, a list - // of the phone numbers is returned, along with error codes and error messages. - PhoneNumberErrors []types.PhoneNumberError - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociatePhoneNumbersFromVoiceConnectorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociatePhoneNumbersFromVoiceConnector{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociatePhoneNumbersFromVoiceConnector{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociatePhoneNumbersFromVoiceConnector"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDisassociatePhoneNumbersFromVoiceConnectorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociatePhoneNumbersFromVoiceConnector(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociatePhoneNumbersFromVoiceConnector(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociatePhoneNumbersFromVoiceConnector", - } -} diff --git a/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go b/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go deleted file mode 100644 index 2cb0bf443da..00000000000 --- a/service/chime/api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Disassociates the specified phone numbers from the specified Amazon Chime Voice -// Connector group. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [DisassociatePhoneNumbersFromVoiceConnectorGroup], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by DisassociatePhoneNumbersFromVoiceConnectorGroup in the -// Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [DisassociatePhoneNumbersFromVoiceConnectorGroup]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_DisassociatePhoneNumbersFromVoiceConnectorGroup.html -func (c *Client) DisassociatePhoneNumbersFromVoiceConnectorGroup(ctx context.Context, params *DisassociatePhoneNumbersFromVoiceConnectorGroupInput, optFns ...func(*Options)) (*DisassociatePhoneNumbersFromVoiceConnectorGroupOutput, error) { - if params == nil { - params = &DisassociatePhoneNumbersFromVoiceConnectorGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociatePhoneNumbersFromVoiceConnectorGroup", params, optFns, c.addOperationDisassociatePhoneNumbersFromVoiceConnectorGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociatePhoneNumbersFromVoiceConnectorGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociatePhoneNumbersFromVoiceConnectorGroupInput struct { - - // List of phone numbers, in E.164 format. - // - // This member is required. - E164PhoneNumbers []string - - // The Amazon Chime Voice Connector group ID. - // - // This member is required. - VoiceConnectorGroupId *string - - noSmithyDocumentSerde -} - -type DisassociatePhoneNumbersFromVoiceConnectorGroupOutput struct { - - // If the action fails for one or more of the phone numbers in the request, a list - // of the phone numbers is returned, along with error codes and error messages. - PhoneNumberErrors []types.PhoneNumberError - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociatePhoneNumbersFromVoiceConnectorGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpDisassociatePhoneNumbersFromVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDisassociatePhoneNumbersFromVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociatePhoneNumbersFromVoiceConnectorGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDisassociatePhoneNumbersFromVoiceConnectorGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociatePhoneNumbersFromVoiceConnectorGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociatePhoneNumbersFromVoiceConnectorGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociatePhoneNumbersFromVoiceConnectorGroup", - } -} diff --git a/service/chime/api_op_GetAppInstanceRetentionSettings.go b/service/chime/api_op_GetAppInstanceRetentionSettings.go deleted file mode 100644 index 69b13643f60..00000000000 --- a/service/chime/api_op_GetAppInstanceRetentionSettings.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Gets the retention settings for an AppInstance . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetMessagingRetentionSettings], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetAppInstanceRetentionSettings in the Amazon Chime SDK -// Identity Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetMessagingRetentionSettings]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_GetAppInstanceRetentionSettings.html -func (c *Client) GetAppInstanceRetentionSettings(ctx context.Context, params *GetAppInstanceRetentionSettingsInput, optFns ...func(*Options)) (*GetAppInstanceRetentionSettingsOutput, error) { - if params == nil { - params = &GetAppInstanceRetentionSettingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetAppInstanceRetentionSettings", params, optFns, c.addOperationGetAppInstanceRetentionSettingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetAppInstanceRetentionSettingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetAppInstanceRetentionSettingsInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - noSmithyDocumentSerde -} - -type GetAppInstanceRetentionSettingsOutput struct { - - // The retention settings for the AppInstance . - AppInstanceRetentionSettings *types.AppInstanceRetentionSettings - - // The timestamp representing the time at which the specified items are retained, - // in Epoch Seconds. - InitiateDeletionTimestamp *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetAppInstanceRetentionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAppInstanceRetentionSettings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAppInstanceRetentionSettings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAppInstanceRetentionSettings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opGetAppInstanceRetentionSettingsMiddleware(stack); err != nil { - return err - } - if err = addOpGetAppInstanceRetentionSettingsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAppInstanceRetentionSettings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opGetAppInstanceRetentionSettingsMiddleware struct { -} - -func (*endpointPrefix_opGetAppInstanceRetentionSettingsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetAppInstanceRetentionSettingsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetAppInstanceRetentionSettingsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetAppInstanceRetentionSettingsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opGetAppInstanceRetentionSettings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAppInstanceRetentionSettings", - } -} diff --git a/service/chime/api_op_GetAppInstanceStreamingConfigurations.go b/service/chime/api_op_GetAppInstanceStreamingConfigurations.go deleted file mode 100644 index b7e031d9f2e..00000000000 --- a/service/chime/api_op_GetAppInstanceStreamingConfigurations.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the streaming settings for an AppInstance . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetMessagingStreamingConfigurations], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetAppInstanceStreamingConfigurations in the Amazon -// Chime SDK Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetMessagingStreamingConfigurations]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_GetMessagingStreamingConfigurations.html -func (c *Client) GetAppInstanceStreamingConfigurations(ctx context.Context, params *GetAppInstanceStreamingConfigurationsInput, optFns ...func(*Options)) (*GetAppInstanceStreamingConfigurationsOutput, error) { - if params == nil { - params = &GetAppInstanceStreamingConfigurationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetAppInstanceStreamingConfigurations", params, optFns, c.addOperationGetAppInstanceStreamingConfigurationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetAppInstanceStreamingConfigurationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetAppInstanceStreamingConfigurationsInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - noSmithyDocumentSerde -} - -type GetAppInstanceStreamingConfigurationsOutput struct { - - // The streaming settings. - AppInstanceStreamingConfigurations []types.AppInstanceStreamingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetAppInstanceStreamingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAppInstanceStreamingConfigurations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAppInstanceStreamingConfigurations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAppInstanceStreamingConfigurations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetAppInstanceStreamingConfigurationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAppInstanceStreamingConfigurations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetAppInstanceStreamingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAppInstanceStreamingConfigurations", - } -} diff --git a/service/chime/api_op_GetAttendee.go b/service/chime/api_op_GetAttendee.go deleted file mode 100644 index b71af246dca..00000000000 --- a/service/chime/api_op_GetAttendee.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the Amazon Chime SDK attendee details for a specified meeting ID and -// -// attendee ID. For more information about the Amazon Chime SDK, see [Using the Amazon Chime SDK]in the Amazon -// Chime SDK Developer Guide. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetAttendee], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetAttendee in the Amazon Chime SDK Meetings Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -// [GetAttendee]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_GetAttendee.html -func (c *Client) GetAttendee(ctx context.Context, params *GetAttendeeInput, optFns ...func(*Options)) (*GetAttendeeOutput, error) { - if params == nil { - params = &GetAttendeeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetAttendee", params, optFns, c.addOperationGetAttendeeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetAttendeeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetAttendeeInput struct { - - // The Amazon Chime SDK attendee ID. - // - // This member is required. - AttendeeId *string - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - noSmithyDocumentSerde -} - -type GetAttendeeOutput struct { - - // The Amazon Chime SDK attendee information. - Attendee *types.Attendee - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetAttendeeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetAttendee{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetAttendee{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetAttendee"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetAttendeeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetAttendee(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetAttendee(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetAttendee", - } -} diff --git a/service/chime/api_op_GetChannelMessage.go b/service/chime/api_op_GetChannelMessage.go deleted file mode 100644 index 575e723d34e..00000000000 --- a/service/chime/api_op_GetChannelMessage.go +++ /dev/null @@ -1,210 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the full details of a channel message. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetChannelMessage], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetChannelMessage in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetChannelMessage]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_GetChannelMessage.html -func (c *Client) GetChannelMessage(ctx context.Context, params *GetChannelMessageInput, optFns ...func(*Options)) (*GetChannelMessageOutput, error) { - if params == nil { - params = &GetChannelMessageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetChannelMessage", params, optFns, c.addOperationGetChannelMessageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetChannelMessageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetChannelMessageInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The ID of the message. - // - // This member is required. - MessageId *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type GetChannelMessageOutput struct { - - // The details of and content in the message. - ChannelMessage *types.ChannelMessage - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetChannelMessage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetChannelMessage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetChannelMessage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opGetChannelMessageMiddleware(stack); err != nil { - return err - } - if err = addOpGetChannelMessageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetChannelMessage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opGetChannelMessageMiddleware struct { -} - -func (*endpointPrefix_opGetChannelMessageMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetChannelMessageMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetChannelMessageMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetChannelMessageMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opGetChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetChannelMessage", - } -} diff --git a/service/chime/api_op_GetMediaCapturePipeline.go b/service/chime/api_op_GetMediaCapturePipeline.go deleted file mode 100644 index f20408022a9..00000000000 --- a/service/chime/api_op_GetMediaCapturePipeline.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets an existing media capture pipeline. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetMediaCapturePipeline], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetMediaCapturePipeline in the Amazon Chime SDK Media -// Pipelines Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetMediaCapturePipeline]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_media-pipelines-chime_GetMediaCapturePipeline.html -func (c *Client) GetMediaCapturePipeline(ctx context.Context, params *GetMediaCapturePipelineInput, optFns ...func(*Options)) (*GetMediaCapturePipelineOutput, error) { - if params == nil { - params = &GetMediaCapturePipelineInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetMediaCapturePipeline", params, optFns, c.addOperationGetMediaCapturePipelineMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetMediaCapturePipelineOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetMediaCapturePipelineInput struct { - - // The ID of the pipeline that you want to get. - // - // This member is required. - MediaPipelineId *string - - noSmithyDocumentSerde -} - -type GetMediaCapturePipelineOutput struct { - - // The media capture pipeline object. - MediaCapturePipeline *types.MediaCapturePipeline - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetMediaCapturePipelineMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMediaCapturePipeline{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMediaCapturePipeline{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetMediaCapturePipeline"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetMediaCapturePipelineValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMediaCapturePipeline(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetMediaCapturePipeline(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetMediaCapturePipeline", - } -} diff --git a/service/chime/api_op_GetMeeting.go b/service/chime/api_op_GetMeeting.go deleted file mode 100644 index 0827581971a..00000000000 --- a/service/chime/api_op_GetMeeting.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This API is is no longer supported and will not be updated. We recommend using -// -// the latest version, [GetMeeting], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Gets the Amazon Chime SDK meeting details for the specified meeting ID. For -// more information about the Amazon Chime SDK, see [Using the Amazon Chime SDK]in the Amazon Chime SDK -// Developer Guide . -// -// Deprecated: Replaced by GetMeeting in the Amazon Chime SDK Meetings Namespace -// -// [GetMeeting]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_GetMeeting.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -func (c *Client) GetMeeting(ctx context.Context, params *GetMeetingInput, optFns ...func(*Options)) (*GetMeetingOutput, error) { - if params == nil { - params = &GetMeetingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetMeeting", params, optFns, c.addOperationGetMeetingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetMeetingOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetMeetingInput struct { - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - noSmithyDocumentSerde -} - -type GetMeetingOutput struct { - - // The Amazon Chime SDK meeting information. - Meeting *types.Meeting - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetMeetingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMeeting{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMeeting{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetMeeting"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetMeetingValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMeeting(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetMeeting(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetMeeting", - } -} diff --git a/service/chime/api_op_GetMessagingSessionEndpoint.go b/service/chime/api_op_GetMessagingSessionEndpoint.go deleted file mode 100644 index 3b4cf8394e6..00000000000 --- a/service/chime/api_op_GetMessagingSessionEndpoint.go +++ /dev/null @@ -1,190 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The details of the endpoint for the messaging session. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetMessagingSessionEndpoint], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetMessagingSessionEndpoint in the Amazon Chime SDK -// Messaging Namespace -// -// [GetMessagingSessionEndpoint]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_GetMessagingSessionEndpoint.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) GetMessagingSessionEndpoint(ctx context.Context, params *GetMessagingSessionEndpointInput, optFns ...func(*Options)) (*GetMessagingSessionEndpointOutput, error) { - if params == nil { - params = &GetMessagingSessionEndpointInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetMessagingSessionEndpoint", params, optFns, c.addOperationGetMessagingSessionEndpointMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetMessagingSessionEndpointOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetMessagingSessionEndpointInput struct { - noSmithyDocumentSerde -} - -type GetMessagingSessionEndpointOutput struct { - - // The endpoint returned in the response. - Endpoint *types.MessagingSessionEndpoint - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetMessagingSessionEndpointMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMessagingSessionEndpoint{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMessagingSessionEndpoint{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetMessagingSessionEndpoint"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opGetMessagingSessionEndpointMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMessagingSessionEndpoint(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opGetMessagingSessionEndpointMiddleware struct { -} - -func (*endpointPrefix_opGetMessagingSessionEndpointMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opGetMessagingSessionEndpointMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opGetMessagingSessionEndpointMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opGetMessagingSessionEndpointMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opGetMessagingSessionEndpoint(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetMessagingSessionEndpoint", - } -} diff --git a/service/chime/api_op_GetProxySession.go b/service/chime/api_op_GetProxySession.go deleted file mode 100644 index 77ba96cd202..00000000000 --- a/service/chime/api_op_GetProxySession.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the specified proxy session details for the specified Amazon Chime Voice -// Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetProxySession], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetProxySession in the Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetProxySession]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetProxySession.html -func (c *Client) GetProxySession(ctx context.Context, params *GetProxySessionInput, optFns ...func(*Options)) (*GetProxySessionOutput, error) { - if params == nil { - params = &GetProxySessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetProxySession", params, optFns, c.addOperationGetProxySessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetProxySessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetProxySessionInput struct { - - // The proxy session ID. - // - // This member is required. - ProxySessionId *string - - // The Amazon Chime voice connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetProxySessionOutput struct { - - // The proxy session details. - ProxySession *types.ProxySession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetProxySessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetProxySession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetProxySession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetProxySession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetProxySessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetProxySession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetProxySession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetProxySession", - } -} diff --git a/service/chime/api_op_GetSipMediaApplication.go b/service/chime/api_op_GetSipMediaApplication.go deleted file mode 100644 index 0f8c4945c02..00000000000 --- a/service/chime/api_op_GetSipMediaApplication.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the information for a SIP media application, including name, AWS -// Region, and endpoints. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetSipMediaApplication], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetSipMediaApplication in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetSipMediaApplication]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetSipMediaApplication.html -func (c *Client) GetSipMediaApplication(ctx context.Context, params *GetSipMediaApplicationInput, optFns ...func(*Options)) (*GetSipMediaApplicationOutput, error) { - if params == nil { - params = &GetSipMediaApplicationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSipMediaApplication", params, optFns, c.addOperationGetSipMediaApplicationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSipMediaApplicationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSipMediaApplicationInput struct { - - // The SIP media application ID. - // - // This member is required. - SipMediaApplicationId *string - - noSmithyDocumentSerde -} - -type GetSipMediaApplicationOutput struct { - - // The SIP media application details. - SipMediaApplication *types.SipMediaApplication - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSipMediaApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSipMediaApplication{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSipMediaApplication{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSipMediaApplication"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetSipMediaApplicationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSipMediaApplication(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetSipMediaApplication(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSipMediaApplication", - } -} diff --git a/service/chime/api_op_GetSipMediaApplicationLoggingConfiguration.go b/service/chime/api_op_GetSipMediaApplicationLoggingConfiguration.go deleted file mode 100644 index 51f3c1c8012..00000000000 --- a/service/chime/api_op_GetSipMediaApplicationLoggingConfiguration.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns the logging configuration for the specified SIP media application. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetSipMediaApplicationLoggingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetSipMediaApplicationLoggingConfiguration in the -// Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetSipMediaApplicationLoggingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetSipMediaApplicationLoggingConfiguration.html -func (c *Client) GetSipMediaApplicationLoggingConfiguration(ctx context.Context, params *GetSipMediaApplicationLoggingConfigurationInput, optFns ...func(*Options)) (*GetSipMediaApplicationLoggingConfigurationOutput, error) { - if params == nil { - params = &GetSipMediaApplicationLoggingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSipMediaApplicationLoggingConfiguration", params, optFns, c.addOperationGetSipMediaApplicationLoggingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSipMediaApplicationLoggingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSipMediaApplicationLoggingConfigurationInput struct { - - // The SIP media application ID. - // - // This member is required. - SipMediaApplicationId *string - - noSmithyDocumentSerde -} - -type GetSipMediaApplicationLoggingConfigurationOutput struct { - - // The actual logging configuration. - SipMediaApplicationLoggingConfiguration *types.SipMediaApplicationLoggingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSipMediaApplicationLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSipMediaApplicationLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSipMediaApplicationLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSipMediaApplicationLoggingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetSipMediaApplicationLoggingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSipMediaApplicationLoggingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetSipMediaApplicationLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSipMediaApplicationLoggingConfiguration", - } -} diff --git a/service/chime/api_op_GetSipRule.go b/service/chime/api_op_GetSipRule.go deleted file mode 100644 index 75db68f431a..00000000000 --- a/service/chime/api_op_GetSipRule.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the details of a SIP rule, such as the rule ID, name, triggers, and -// target endpoints. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetSipRule], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetSipRule in the Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetSipRule]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetSipRule.html -func (c *Client) GetSipRule(ctx context.Context, params *GetSipRuleInput, optFns ...func(*Options)) (*GetSipRuleOutput, error) { - if params == nil { - params = &GetSipRuleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetSipRule", params, optFns, c.addOperationGetSipRuleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetSipRuleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetSipRuleInput struct { - - // The SIP rule ID. - // - // This member is required. - SipRuleId *string - - noSmithyDocumentSerde -} - -type GetSipRuleOutput struct { - - // The SIP rule details. - SipRule *types.SipRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetSipRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSipRule{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSipRule{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetSipRule"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetSipRuleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSipRule(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetSipRule(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetSipRule", - } -} diff --git a/service/chime/api_op_GetVoiceConnector.go b/service/chime/api_op_GetVoiceConnector.go deleted file mode 100644 index 10173913325..00000000000 --- a/service/chime/api_op_GetVoiceConnector.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves details for the specified Amazon Chime Voice Connector, such as -// timestamps,name, outbound host, and encryption requirements. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetVoiceConnector], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetVoiceConnector in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetVoiceConnector]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnector.html -func (c *Client) GetVoiceConnector(ctx context.Context, params *GetVoiceConnectorInput, optFns ...func(*Options)) (*GetVoiceConnectorOutput, error) { - if params == nil { - params = &GetVoiceConnectorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnector", params, optFns, c.addOperationGetVoiceConnectorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorOutput struct { - - // The Amazon Chime Voice Connector details. - VoiceConnector *types.VoiceConnector - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnector{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnector{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnector"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnector(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnector(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnector", - } -} diff --git a/service/chime/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go b/service/chime/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go deleted file mode 100644 index 9b5855b808e..00000000000 --- a/service/chime/api_op_GetVoiceConnectorEmergencyCallingConfiguration.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the emergency calling configuration details for the specified Amazon Chime -// Voice Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetVoiceConnectorEmergencyCallingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetVoiceConnectorEmergencyCallingConfiguration in the -// Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetVoiceConnectorEmergencyCallingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnectorEmergencyCallingConfiguration.html -func (c *Client) GetVoiceConnectorEmergencyCallingConfiguration(ctx context.Context, params *GetVoiceConnectorEmergencyCallingConfigurationInput, optFns ...func(*Options)) (*GetVoiceConnectorEmergencyCallingConfigurationOutput, error) { - if params == nil { - params = &GetVoiceConnectorEmergencyCallingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnectorEmergencyCallingConfiguration", params, optFns, c.addOperationGetVoiceConnectorEmergencyCallingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorEmergencyCallingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorEmergencyCallingConfigurationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorEmergencyCallingConfigurationOutput struct { - - // The emergency calling configuration details. - EmergencyCallingConfiguration *types.EmergencyCallingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorEmergencyCallingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnectorEmergencyCallingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnectorEmergencyCallingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnectorEmergencyCallingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnectorEmergencyCallingConfiguration", - } -} diff --git a/service/chime/api_op_GetVoiceConnectorGroup.go b/service/chime/api_op_GetVoiceConnectorGroup.go deleted file mode 100644 index 404b489901c..00000000000 --- a/service/chime/api_op_GetVoiceConnectorGroup.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves details for the specified Amazon Chime Voice Connector group, such -// -// as timestamps,name, and associated VoiceConnectorItems . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetVoiceConnectorGroup], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetVoiceConnectorGroup in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetVoiceConnectorGroup]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnectorGroup.html -func (c *Client) GetVoiceConnectorGroup(ctx context.Context, params *GetVoiceConnectorGroupInput, optFns ...func(*Options)) (*GetVoiceConnectorGroupOutput, error) { - if params == nil { - params = &GetVoiceConnectorGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnectorGroup", params, optFns, c.addOperationGetVoiceConnectorGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorGroupInput struct { - - // The Amazon Chime Voice Connector group ID. - // - // This member is required. - VoiceConnectorGroupId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorGroupOutput struct { - - // The Amazon Chime Voice Connector group details. - VoiceConnectorGroup *types.VoiceConnectorGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnectorGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnectorGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnectorGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnectorGroup", - } -} diff --git a/service/chime/api_op_GetVoiceConnectorLoggingConfiguration.go b/service/chime/api_op_GetVoiceConnectorLoggingConfiguration.go deleted file mode 100644 index 25ace2e38e2..00000000000 --- a/service/chime/api_op_GetVoiceConnectorLoggingConfiguration.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the logging configuration details for the specified Amazon Chime -// Voice Connector. Shows whether SIP message logs are enabled for sending to -// Amazon CloudWatch Logs. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetVoiceConnectorLoggingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetVoiceConnectorLoggingConfiguration in the Amazon -// Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetVoiceConnectorLoggingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnectorLoggingConfiguration.html -func (c *Client) GetVoiceConnectorLoggingConfiguration(ctx context.Context, params *GetVoiceConnectorLoggingConfigurationInput, optFns ...func(*Options)) (*GetVoiceConnectorLoggingConfigurationOutput, error) { - if params == nil { - params = &GetVoiceConnectorLoggingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnectorLoggingConfiguration", params, optFns, c.addOperationGetVoiceConnectorLoggingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorLoggingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorLoggingConfigurationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorLoggingConfigurationOutput struct { - - // The logging configuration details. - LoggingConfiguration *types.LoggingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnectorLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnectorLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnectorLoggingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorLoggingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnectorLoggingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnectorLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnectorLoggingConfiguration", - } -} diff --git a/service/chime/api_op_GetVoiceConnectorOrigination.go b/service/chime/api_op_GetVoiceConnectorOrigination.go deleted file mode 100644 index 2c97f7270c6..00000000000 --- a/service/chime/api_op_GetVoiceConnectorOrigination.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves origination setting details for the specified Amazon Chime Voice -// Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetVoiceConnectorOrigination], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetVoiceConnectorOrigination in the Amazon Chime SDK -// Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetVoiceConnectorOrigination]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnectorOrigination.html -func (c *Client) GetVoiceConnectorOrigination(ctx context.Context, params *GetVoiceConnectorOriginationInput, optFns ...func(*Options)) (*GetVoiceConnectorOriginationOutput, error) { - if params == nil { - params = &GetVoiceConnectorOriginationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnectorOrigination", params, optFns, c.addOperationGetVoiceConnectorOriginationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorOriginationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorOriginationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorOriginationOutput struct { - - // The origination setting details. - Origination *types.Origination - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorOriginationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnectorOrigination{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnectorOrigination{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnectorOrigination"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorOriginationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnectorOrigination(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnectorOrigination(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnectorOrigination", - } -} diff --git a/service/chime/api_op_GetVoiceConnectorProxy.go b/service/chime/api_op_GetVoiceConnectorProxy.go deleted file mode 100644 index ed459d4b0c2..00000000000 --- a/service/chime/api_op_GetVoiceConnectorProxy.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the proxy configuration details for the specified Amazon Chime Voice -// Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetVoiceConnectorProxy], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetVoiceConnectorProxy in the Amazon Chime SDK Voice -// Namespace -// -// [GetVoiceConnectorProxy]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnectorProxy.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) GetVoiceConnectorProxy(ctx context.Context, params *GetVoiceConnectorProxyInput, optFns ...func(*Options)) (*GetVoiceConnectorProxyOutput, error) { - if params == nil { - params = &GetVoiceConnectorProxyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnectorProxy", params, optFns, c.addOperationGetVoiceConnectorProxyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorProxyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorProxyInput struct { - - // The Amazon Chime voice connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorProxyOutput struct { - - // The proxy configuration details. - Proxy *types.Proxy - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorProxyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnectorProxy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnectorProxy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnectorProxy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorProxyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnectorProxy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnectorProxy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnectorProxy", - } -} diff --git a/service/chime/api_op_GetVoiceConnectorStreamingConfiguration.go b/service/chime/api_op_GetVoiceConnectorStreamingConfiguration.go deleted file mode 100644 index 9f709747379..00000000000 --- a/service/chime/api_op_GetVoiceConnectorStreamingConfiguration.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves the streaming configuration details for the specified Amazon Chime -// Voice Connector. Shows whether media streaming is enabled for sending to Amazon -// Kinesis. It also shows the retention period, in hours, for the Amazon Kinesis -// data. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetVoiceConnectorStreamingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetVoiceConnectorStreamingConfiguration in the Amazon -// Chime SDK Voice Namespace -// -// [GetVoiceConnectorStreamingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnectorStreamingConfiguration.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) GetVoiceConnectorStreamingConfiguration(ctx context.Context, params *GetVoiceConnectorStreamingConfigurationInput, optFns ...func(*Options)) (*GetVoiceConnectorStreamingConfigurationOutput, error) { - if params == nil { - params = &GetVoiceConnectorStreamingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnectorStreamingConfiguration", params, optFns, c.addOperationGetVoiceConnectorStreamingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorStreamingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorStreamingConfigurationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorStreamingConfigurationOutput struct { - - // The streaming configuration details. - StreamingConfiguration *types.StreamingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorStreamingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnectorStreamingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnectorStreamingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnectorStreamingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnectorStreamingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnectorStreamingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnectorStreamingConfiguration", - } -} diff --git a/service/chime/api_op_GetVoiceConnectorTermination.go b/service/chime/api_op_GetVoiceConnectorTermination.go deleted file mode 100644 index bc62b808274..00000000000 --- a/service/chime/api_op_GetVoiceConnectorTermination.go +++ /dev/null @@ -1,170 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Retrieves termination setting details for the specified Amazon Chime Voice -// Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [GetVoiceConnectorTermination], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by GetVoiceConnectorTermination in the Amazon Chime SDK -// Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [GetVoiceConnectorTermination]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnectorTermination.html -func (c *Client) GetVoiceConnectorTermination(ctx context.Context, params *GetVoiceConnectorTerminationInput, optFns ...func(*Options)) (*GetVoiceConnectorTerminationOutput, error) { - if params == nil { - params = &GetVoiceConnectorTerminationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnectorTermination", params, optFns, c.addOperationGetVoiceConnectorTerminationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorTerminationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorTerminationInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorTerminationOutput struct { - - // The termination setting details. - Termination *types.Termination - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorTerminationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnectorTermination{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnectorTermination{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnectorTermination"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorTerminationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnectorTermination(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnectorTermination(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnectorTermination", - } -} diff --git a/service/chime/api_op_GetVoiceConnectorTerminationHealth.go b/service/chime/api_op_GetVoiceConnectorTerminationHealth.go deleted file mode 100644 index f5639654f21..00000000000 --- a/service/chime/api_op_GetVoiceConnectorTerminationHealth.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// This API is is no longer supported and will not be updated. We recommend using -// -// the latest version, [GetVoiceConnectorTerminationHealth], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Retrieves information about the last time a SIP OPTIONS ping was received from -// your SIP infrastructure for the specified Amazon Chime Voice Connector. -// -// Deprecated: Replaced by GetVoiceConnectorTerminationHealth in the Amazon Chime -// SDK Voice Namespace -// -// [GetVoiceConnectorTerminationHealth]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_GetVoiceConnectorTerminationHealth.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) GetVoiceConnectorTerminationHealth(ctx context.Context, params *GetVoiceConnectorTerminationHealthInput, optFns ...func(*Options)) (*GetVoiceConnectorTerminationHealthOutput, error) { - if params == nil { - params = &GetVoiceConnectorTerminationHealthInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "GetVoiceConnectorTerminationHealth", params, optFns, c.addOperationGetVoiceConnectorTerminationHealthMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*GetVoiceConnectorTerminationHealthOutput) - out.ResultMetadata = metadata - return out, nil -} - -type GetVoiceConnectorTerminationHealthInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type GetVoiceConnectorTerminationHealthOutput struct { - - // The termination health details. - TerminationHealth *types.TerminationHealth - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationGetVoiceConnectorTerminationHealthMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpGetVoiceConnectorTerminationHealth{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetVoiceConnectorTerminationHealth{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "GetVoiceConnectorTerminationHealth"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpGetVoiceConnectorTerminationHealthValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetVoiceConnectorTerminationHealth(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opGetVoiceConnectorTerminationHealth(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "GetVoiceConnectorTerminationHealth", - } -} diff --git a/service/chime/api_op_ListAppInstanceAdmins.go b/service/chime/api_op_ListAppInstanceAdmins.go deleted file mode 100644 index e88a5625f8e..00000000000 --- a/service/chime/api_op_ListAppInstanceAdmins.go +++ /dev/null @@ -1,307 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a list of the administrators in the AppInstance . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListAppInstanceAdmins], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListAppInstanceAdmins in the Amazon Chime SDK Identity -// Namespace -// -// [ListAppInstanceAdmins]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_ListAppInstanceAdmins.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) ListAppInstanceAdmins(ctx context.Context, params *ListAppInstanceAdminsInput, optFns ...func(*Options)) (*ListAppInstanceAdminsOutput, error) { - if params == nil { - params = &ListAppInstanceAdminsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListAppInstanceAdmins", params, optFns, c.addOperationListAppInstanceAdminsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListAppInstanceAdminsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListAppInstanceAdminsInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - // The maximum number of administrators that you want to return. - MaxResults *int32 - - // The token returned from previous API requests until the number of - // administrators is reached. - NextToken *string - - noSmithyDocumentSerde -} - -type ListAppInstanceAdminsOutput struct { - - // The information for each administrator. - AppInstanceAdmins []types.AppInstanceAdminSummary - - // The ARN of the AppInstance . - AppInstanceArn *string - - // The token returned from previous API requests until the number of - // administrators is reached. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListAppInstanceAdminsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListAppInstanceAdmins{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAppInstanceAdmins{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAppInstanceAdmins"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListAppInstanceAdminsMiddleware(stack); err != nil { - return err - } - if err = addOpListAppInstanceAdminsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppInstanceAdmins(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListAppInstanceAdminsPaginatorOptions is the paginator options for -// ListAppInstanceAdmins -type ListAppInstanceAdminsPaginatorOptions struct { - // The maximum number of administrators that you want to return. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListAppInstanceAdminsPaginator is a paginator for ListAppInstanceAdmins -type ListAppInstanceAdminsPaginator struct { - options ListAppInstanceAdminsPaginatorOptions - client ListAppInstanceAdminsAPIClient - params *ListAppInstanceAdminsInput - nextToken *string - firstPage bool -} - -// NewListAppInstanceAdminsPaginator returns a new ListAppInstanceAdminsPaginator -func NewListAppInstanceAdminsPaginator(client ListAppInstanceAdminsAPIClient, params *ListAppInstanceAdminsInput, optFns ...func(*ListAppInstanceAdminsPaginatorOptions)) *ListAppInstanceAdminsPaginator { - if params == nil { - params = &ListAppInstanceAdminsInput{} - } - - options := ListAppInstanceAdminsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListAppInstanceAdminsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListAppInstanceAdminsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListAppInstanceAdmins page. -func (p *ListAppInstanceAdminsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAppInstanceAdminsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListAppInstanceAdmins(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListAppInstanceAdminsMiddleware struct { -} - -func (*endpointPrefix_opListAppInstanceAdminsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAppInstanceAdminsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAppInstanceAdminsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAppInstanceAdminsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAppInstanceAdminsAPIClient is a client that implements the -// ListAppInstanceAdmins operation. -type ListAppInstanceAdminsAPIClient interface { - ListAppInstanceAdmins(context.Context, *ListAppInstanceAdminsInput, ...func(*Options)) (*ListAppInstanceAdminsOutput, error) -} - -var _ ListAppInstanceAdminsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListAppInstanceAdmins(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAppInstanceAdmins", - } -} diff --git a/service/chime/api_op_ListAppInstanceUsers.go b/service/chime/api_op_ListAppInstanceUsers.go deleted file mode 100644 index 6b5581f1278..00000000000 --- a/service/chime/api_op_ListAppInstanceUsers.go +++ /dev/null @@ -1,305 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// List all AppInstanceUsers created under a single AppInstance . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListAppInstanceUsers], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListAppInstanceUsers in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListAppInstanceUsers]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_ListAppInstanceUsers.html -func (c *Client) ListAppInstanceUsers(ctx context.Context, params *ListAppInstanceUsersInput, optFns ...func(*Options)) (*ListAppInstanceUsersOutput, error) { - if params == nil { - params = &ListAppInstanceUsersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListAppInstanceUsers", params, optFns, c.addOperationListAppInstanceUsersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListAppInstanceUsersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListAppInstanceUsersInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - // The maximum number of requests that you want returned. - MaxResults *int32 - - // The token passed by previous API calls until all requested users are returned. - NextToken *string - - noSmithyDocumentSerde -} - -type ListAppInstanceUsersOutput struct { - - // The ARN of the AppInstance . - AppInstanceArn *string - - // The information for each requested AppInstanceUser . - AppInstanceUsers []types.AppInstanceUserSummary - - // The token passed by previous API calls until all requested users are returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListAppInstanceUsersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListAppInstanceUsers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAppInstanceUsers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAppInstanceUsers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListAppInstanceUsersMiddleware(stack); err != nil { - return err - } - if err = addOpListAppInstanceUsersValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppInstanceUsers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListAppInstanceUsersPaginatorOptions is the paginator options for -// ListAppInstanceUsers -type ListAppInstanceUsersPaginatorOptions struct { - // The maximum number of requests that you want returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListAppInstanceUsersPaginator is a paginator for ListAppInstanceUsers -type ListAppInstanceUsersPaginator struct { - options ListAppInstanceUsersPaginatorOptions - client ListAppInstanceUsersAPIClient - params *ListAppInstanceUsersInput - nextToken *string - firstPage bool -} - -// NewListAppInstanceUsersPaginator returns a new ListAppInstanceUsersPaginator -func NewListAppInstanceUsersPaginator(client ListAppInstanceUsersAPIClient, params *ListAppInstanceUsersInput, optFns ...func(*ListAppInstanceUsersPaginatorOptions)) *ListAppInstanceUsersPaginator { - if params == nil { - params = &ListAppInstanceUsersInput{} - } - - options := ListAppInstanceUsersPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListAppInstanceUsersPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListAppInstanceUsersPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListAppInstanceUsers page. -func (p *ListAppInstanceUsersPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAppInstanceUsersOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListAppInstanceUsers(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListAppInstanceUsersMiddleware struct { -} - -func (*endpointPrefix_opListAppInstanceUsersMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAppInstanceUsersMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAppInstanceUsersMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAppInstanceUsersMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAppInstanceUsersAPIClient is a client that implements the -// ListAppInstanceUsers operation. -type ListAppInstanceUsersAPIClient interface { - ListAppInstanceUsers(context.Context, *ListAppInstanceUsersInput, ...func(*Options)) (*ListAppInstanceUsersOutput, error) -} - -var _ ListAppInstanceUsersAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListAppInstanceUsers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAppInstanceUsers", - } -} diff --git a/service/chime/api_op_ListAppInstances.go b/service/chime/api_op_ListAppInstances.go deleted file mode 100644 index 97348e4977d..00000000000 --- a/service/chime/api_op_ListAppInstances.go +++ /dev/null @@ -1,295 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all Amazon Chime AppInstance s created under a single AWS account. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListAppInstances], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListAppInstances in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListAppInstances]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_ListAppInstances.html -func (c *Client) ListAppInstances(ctx context.Context, params *ListAppInstancesInput, optFns ...func(*Options)) (*ListAppInstancesOutput, error) { - if params == nil { - params = &ListAppInstancesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListAppInstances", params, optFns, c.addOperationListAppInstancesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListAppInstancesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListAppInstancesInput struct { - - // The maximum number of AppInstance s that you want to return. - MaxResults *int32 - - // The token passed by previous API requests until you reach the maximum number of - // AppInstance s. - NextToken *string - - noSmithyDocumentSerde -} - -type ListAppInstancesOutput struct { - - // The information for each AppInstance . - AppInstances []types.AppInstanceSummary - - // The token passed by previous API requests until the maximum number of - // AppInstance s is reached. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListAppInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListAppInstances{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAppInstances{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAppInstances"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListAppInstancesMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAppInstances(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListAppInstancesPaginatorOptions is the paginator options for ListAppInstances -type ListAppInstancesPaginatorOptions struct { - // The maximum number of AppInstance s that you want to return. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListAppInstancesPaginator is a paginator for ListAppInstances -type ListAppInstancesPaginator struct { - options ListAppInstancesPaginatorOptions - client ListAppInstancesAPIClient - params *ListAppInstancesInput - nextToken *string - firstPage bool -} - -// NewListAppInstancesPaginator returns a new ListAppInstancesPaginator -func NewListAppInstancesPaginator(client ListAppInstancesAPIClient, params *ListAppInstancesInput, optFns ...func(*ListAppInstancesPaginatorOptions)) *ListAppInstancesPaginator { - if params == nil { - params = &ListAppInstancesInput{} - } - - options := ListAppInstancesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListAppInstancesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListAppInstancesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListAppInstances page. -func (p *ListAppInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAppInstancesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListAppInstances(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListAppInstancesMiddleware struct { -} - -func (*endpointPrefix_opListAppInstancesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListAppInstancesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListAppInstancesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListAppInstancesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListAppInstancesAPIClient is a client that implements the ListAppInstances -// operation. -type ListAppInstancesAPIClient interface { - ListAppInstances(context.Context, *ListAppInstancesInput, ...func(*Options)) (*ListAppInstancesOutput, error) -} - -var _ ListAppInstancesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListAppInstances(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAppInstances", - } -} diff --git a/service/chime/api_op_ListAttendeeTags.go b/service/chime/api_op_ListAttendeeTags.go deleted file mode 100644 index 26f2ee71cfd..00000000000 --- a/service/chime/api_op_ListAttendeeTags.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the tags applied to an Amazon Chime SDK attendee resource. -// -// ListAttendeeTags is not supported in the Amazon Chime SDK Meetings Namespace. -// Update your application to remove calls to this API. -// -// Deprecated: Attendee Tags are not supported in the Amazon Chime SDK Meetings -// Namespace. Update your application to remove calls to this API. -func (c *Client) ListAttendeeTags(ctx context.Context, params *ListAttendeeTagsInput, optFns ...func(*Options)) (*ListAttendeeTagsOutput, error) { - if params == nil { - params = &ListAttendeeTagsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListAttendeeTags", params, optFns, c.addOperationListAttendeeTagsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListAttendeeTagsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListAttendeeTagsInput struct { - - // The Amazon Chime SDK attendee ID. - // - // This member is required. - AttendeeId *string - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - noSmithyDocumentSerde -} - -type ListAttendeeTagsOutput struct { - - // A list of tag key-value pairs. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListAttendeeTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListAttendeeTags{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAttendeeTags{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAttendeeTags"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListAttendeeTagsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttendeeTags(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListAttendeeTags(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAttendeeTags", - } -} diff --git a/service/chime/api_op_ListAttendees.go b/service/chime/api_op_ListAttendees.go deleted file mode 100644 index a24829be813..00000000000 --- a/service/chime/api_op_ListAttendees.go +++ /dev/null @@ -1,273 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the attendees for the specified Amazon Chime SDK meeting. For more -// -// information about the Amazon Chime SDK, see [Using the Amazon Chime SDK]in the Amazon Chime SDK Developer -// Guide. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListAttendees], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListAttendees in the Amazon Chime SDK Meetings Namespace -// -// [ListAttendees]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_ListAttendees.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -func (c *Client) ListAttendees(ctx context.Context, params *ListAttendeesInput, optFns ...func(*Options)) (*ListAttendeesOutput, error) { - if params == nil { - params = &ListAttendeesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListAttendees", params, optFns, c.addOperationListAttendeesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListAttendeesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListAttendeesInput struct { - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - // The maximum number of results to return in a single call. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type ListAttendeesOutput struct { - - // The Amazon Chime SDK attendee information. - Attendees []types.Attendee - - // The token to use to retrieve the next page of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListAttendeesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListAttendees{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListAttendees{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListAttendees"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListAttendeesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListAttendees(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListAttendeesPaginatorOptions is the paginator options for ListAttendees -type ListAttendeesPaginatorOptions struct { - // The maximum number of results to return in a single call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListAttendeesPaginator is a paginator for ListAttendees -type ListAttendeesPaginator struct { - options ListAttendeesPaginatorOptions - client ListAttendeesAPIClient - params *ListAttendeesInput - nextToken *string - firstPage bool -} - -// NewListAttendeesPaginator returns a new ListAttendeesPaginator -func NewListAttendeesPaginator(client ListAttendeesAPIClient, params *ListAttendeesInput, optFns ...func(*ListAttendeesPaginatorOptions)) *ListAttendeesPaginator { - if params == nil { - params = &ListAttendeesInput{} - } - - options := ListAttendeesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListAttendeesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListAttendeesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListAttendees page. -func (p *ListAttendeesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListAttendeesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListAttendees(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListAttendeesAPIClient is a client that implements the ListAttendees operation. -type ListAttendeesAPIClient interface { - ListAttendees(context.Context, *ListAttendeesInput, ...func(*Options)) (*ListAttendeesOutput, error) -} - -var _ ListAttendeesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListAttendees(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListAttendees", - } -} diff --git a/service/chime/api_op_ListChannelBans.go b/service/chime/api_op_ListChannelBans.go deleted file mode 100644 index 44558d89e4c..00000000000 --- a/service/chime/api_op_ListChannelBans.go +++ /dev/null @@ -1,310 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all the users banned from a particular channel. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListChannelBans], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListChannelBans in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListChannelBans]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_ListChannelBans.html -func (c *Client) ListChannelBans(ctx context.Context, params *ListChannelBansInput, optFns ...func(*Options)) (*ListChannelBansOutput, error) { - if params == nil { - params = &ListChannelBansInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListChannelBans", params, optFns, c.addOperationListChannelBansMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListChannelBansOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListChannelBansInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The maximum number of bans that you want returned. - MaxResults *int32 - - // The token passed by previous API calls until all requested bans are returned. - NextToken *string - - noSmithyDocumentSerde -} - -type ListChannelBansOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // The information for each requested ban. - ChannelBans []types.ChannelBanSummary - - // The token passed by previous API calls until all requested bans are returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListChannelBansMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelBans{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelBans{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListChannelBans"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListChannelBansMiddleware(stack); err != nil { - return err - } - if err = addOpListChannelBansValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelBans(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListChannelBansPaginatorOptions is the paginator options for ListChannelBans -type ListChannelBansPaginatorOptions struct { - // The maximum number of bans that you want returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListChannelBansPaginator is a paginator for ListChannelBans -type ListChannelBansPaginator struct { - options ListChannelBansPaginatorOptions - client ListChannelBansAPIClient - params *ListChannelBansInput - nextToken *string - firstPage bool -} - -// NewListChannelBansPaginator returns a new ListChannelBansPaginator -func NewListChannelBansPaginator(client ListChannelBansAPIClient, params *ListChannelBansInput, optFns ...func(*ListChannelBansPaginatorOptions)) *ListChannelBansPaginator { - if params == nil { - params = &ListChannelBansInput{} - } - - options := ListChannelBansPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListChannelBansPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListChannelBansPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListChannelBans page. -func (p *ListChannelBansPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelBansOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListChannelBans(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListChannelBansMiddleware struct { -} - -func (*endpointPrefix_opListChannelBansMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelBansMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelBansMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelBansMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelBansAPIClient is a client that implements the ListChannelBans -// operation. -type ListChannelBansAPIClient interface { - ListChannelBans(context.Context, *ListChannelBansInput, ...func(*Options)) (*ListChannelBansOutput, error) -} - -var _ ListChannelBansAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListChannelBans(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListChannelBans", - } -} diff --git a/service/chime/api_op_ListChannelMemberships.go b/service/chime/api_op_ListChannelMemberships.go deleted file mode 100644 index 4416b2b7d6b..00000000000 --- a/service/chime/api_op_ListChannelMemberships.go +++ /dev/null @@ -1,319 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all channel memberships in a channel. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListChannelMemberships], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListChannelMemberships in the Amazon Chime SDK -// Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListChannelMemberships]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_ListChannelMemberships.html -func (c *Client) ListChannelMemberships(ctx context.Context, params *ListChannelMembershipsInput, optFns ...func(*Options)) (*ListChannelMembershipsOutput, error) { - if params == nil { - params = &ListChannelMembershipsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListChannelMemberships", params, optFns, c.addOperationListChannelMembershipsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListChannelMembershipsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListChannelMembershipsInput struct { - - // The maximum number of channel memberships that you want returned. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The maximum number of channel memberships that you want returned. - MaxResults *int32 - - // The token passed by previous API calls until all requested channel memberships - // are returned. - NextToken *string - - // The membership type of a user, DEFAULT or HIDDEN . Default members are always - // returned as part of ListChannelMemberships . Hidden members are only returned if - // the type filter in ListChannelMemberships equals HIDDEN . Otherwise hidden - // members are not returned. - Type types.ChannelMembershipType - - noSmithyDocumentSerde -} - -type ListChannelMembershipsOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // The information for the requested channel memberships. - ChannelMemberships []types.ChannelMembershipSummary - - // The token passed by previous API calls until all requested channel memberships - // are returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListChannelMembershipsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelMemberships{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelMemberships{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListChannelMemberships"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListChannelMembershipsMiddleware(stack); err != nil { - return err - } - if err = addOpListChannelMembershipsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelMemberships(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListChannelMembershipsPaginatorOptions is the paginator options for -// ListChannelMemberships -type ListChannelMembershipsPaginatorOptions struct { - // The maximum number of channel memberships that you want returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListChannelMembershipsPaginator is a paginator for ListChannelMemberships -type ListChannelMembershipsPaginator struct { - options ListChannelMembershipsPaginatorOptions - client ListChannelMembershipsAPIClient - params *ListChannelMembershipsInput - nextToken *string - firstPage bool -} - -// NewListChannelMembershipsPaginator returns a new ListChannelMembershipsPaginator -func NewListChannelMembershipsPaginator(client ListChannelMembershipsAPIClient, params *ListChannelMembershipsInput, optFns ...func(*ListChannelMembershipsPaginatorOptions)) *ListChannelMembershipsPaginator { - if params == nil { - params = &ListChannelMembershipsInput{} - } - - options := ListChannelMembershipsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListChannelMembershipsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListChannelMembershipsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListChannelMemberships page. -func (p *ListChannelMembershipsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelMembershipsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListChannelMemberships(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListChannelMembershipsMiddleware struct { -} - -func (*endpointPrefix_opListChannelMembershipsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelMembershipsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelMembershipsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelMembershipsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelMembershipsAPIClient is a client that implements the -// ListChannelMemberships operation. -type ListChannelMembershipsAPIClient interface { - ListChannelMemberships(context.Context, *ListChannelMembershipsInput, ...func(*Options)) (*ListChannelMembershipsOutput, error) -} - -var _ ListChannelMembershipsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListChannelMemberships(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListChannelMemberships", - } -} diff --git a/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go b/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go deleted file mode 100644 index f6811428481..00000000000 --- a/service/chime/api_op_ListChannelMembershipsForAppInstanceUser.go +++ /dev/null @@ -1,308 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all channels that a particular AppInstanceUser is a part of. Only an -// -// AppInstanceAdmin can call the API with a user ARN that is not their own. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListChannelMembershipsForAppInstanceUser], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListChannelMembershipsForAppInstanceUser in the Amazon -// Chime SDK Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListChannelMembershipsForAppInstanceUser]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_ListChannelMembershipsForAppInstanceUser.html -func (c *Client) ListChannelMembershipsForAppInstanceUser(ctx context.Context, params *ListChannelMembershipsForAppInstanceUserInput, optFns ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) { - if params == nil { - params = &ListChannelMembershipsForAppInstanceUserInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListChannelMembershipsForAppInstanceUser", params, optFns, c.addOperationListChannelMembershipsForAppInstanceUserMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListChannelMembershipsForAppInstanceUserOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListChannelMembershipsForAppInstanceUserInput struct { - - // The ARN of the AppInstanceUser s - AppInstanceUserArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The maximum number of users that you want returned. - MaxResults *int32 - - // The token returned from previous API requests until the number of channel - // memberships is reached. - NextToken *string - - noSmithyDocumentSerde -} - -type ListChannelMembershipsForAppInstanceUserOutput struct { - - // The information for the requested channel memberships. - ChannelMemberships []types.ChannelMembershipForAppInstanceUserSummary - - // The token passed by previous API calls until all requested users are returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListChannelMembershipsForAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelMembershipsForAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelMembershipsForAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListChannelMembershipsForAppInstanceUser"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelMembershipsForAppInstanceUser(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListChannelMembershipsForAppInstanceUserPaginatorOptions is the paginator -// options for ListChannelMembershipsForAppInstanceUser -type ListChannelMembershipsForAppInstanceUserPaginatorOptions struct { - // The maximum number of users that you want returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListChannelMembershipsForAppInstanceUserPaginator is a paginator for -// ListChannelMembershipsForAppInstanceUser -type ListChannelMembershipsForAppInstanceUserPaginator struct { - options ListChannelMembershipsForAppInstanceUserPaginatorOptions - client ListChannelMembershipsForAppInstanceUserAPIClient - params *ListChannelMembershipsForAppInstanceUserInput - nextToken *string - firstPage bool -} - -// NewListChannelMembershipsForAppInstanceUserPaginator returns a new -// ListChannelMembershipsForAppInstanceUserPaginator -func NewListChannelMembershipsForAppInstanceUserPaginator(client ListChannelMembershipsForAppInstanceUserAPIClient, params *ListChannelMembershipsForAppInstanceUserInput, optFns ...func(*ListChannelMembershipsForAppInstanceUserPaginatorOptions)) *ListChannelMembershipsForAppInstanceUserPaginator { - if params == nil { - params = &ListChannelMembershipsForAppInstanceUserInput{} - } - - options := ListChannelMembershipsForAppInstanceUserPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListChannelMembershipsForAppInstanceUserPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListChannelMembershipsForAppInstanceUserPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListChannelMembershipsForAppInstanceUser page. -func (p *ListChannelMembershipsForAppInstanceUserPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListChannelMembershipsForAppInstanceUser(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelMembershipsForAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelMembershipsForAppInstanceUserAPIClient is a client that implements -// the ListChannelMembershipsForAppInstanceUser operation. -type ListChannelMembershipsForAppInstanceUserAPIClient interface { - ListChannelMembershipsForAppInstanceUser(context.Context, *ListChannelMembershipsForAppInstanceUserInput, ...func(*Options)) (*ListChannelMembershipsForAppInstanceUserOutput, error) -} - -var _ ListChannelMembershipsForAppInstanceUserAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListChannelMembershipsForAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListChannelMembershipsForAppInstanceUser", - } -} diff --git a/service/chime/api_op_ListChannelMessages.go b/service/chime/api_op_ListChannelMessages.go deleted file mode 100644 index 0d6ed22bd0a..00000000000 --- a/service/chime/api_op_ListChannelMessages.go +++ /dev/null @@ -1,330 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// List all the messages in a channel. Returns a paginated list of ChannelMessages -// . By default, sorted by creation timestamp in descending order. -// -// Redacted messages appear in the results as empty, since they are only redacted, -// not deleted. Deleted messages do not appear in the results. This action always -// returns the latest version of an edited message. -// -// Also, the x-amz-chime-bearer request header is mandatory. Use the -// AppInstanceUserArn of the user that makes the API call as the value in the -// header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListChannelMessages], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListChannelMessages in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListChannelMessages]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_ListChannelMessages.html -func (c *Client) ListChannelMessages(ctx context.Context, params *ListChannelMessagesInput, optFns ...func(*Options)) (*ListChannelMessagesOutput, error) { - if params == nil { - params = &ListChannelMessagesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListChannelMessages", params, optFns, c.addOperationListChannelMessagesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListChannelMessagesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListChannelMessagesInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The maximum number of messages that you want returned. - MaxResults *int32 - - // The token passed by previous API calls until all requested messages are - // returned. - NextToken *string - - // The final or ending time stamp for your requested messages. - NotAfter *time.Time - - // The initial or starting time stamp for your requested messages. - NotBefore *time.Time - - // The order in which you want messages sorted. Default is Descending, based on - // time created. - SortOrder types.SortOrder - - noSmithyDocumentSerde -} - -type ListChannelMessagesOutput struct { - - // The ARN of the channel containing the requested messages. - ChannelArn *string - - // The information about, and content of, each requested message. - ChannelMessages []types.ChannelMessageSummary - - // The token passed by previous API calls until all requested messages are - // returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListChannelMessagesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelMessages{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelMessages{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListChannelMessages"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListChannelMessagesMiddleware(stack); err != nil { - return err - } - if err = addOpListChannelMessagesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelMessages(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListChannelMessagesPaginatorOptions is the paginator options for -// ListChannelMessages -type ListChannelMessagesPaginatorOptions struct { - // The maximum number of messages that you want returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListChannelMessagesPaginator is a paginator for ListChannelMessages -type ListChannelMessagesPaginator struct { - options ListChannelMessagesPaginatorOptions - client ListChannelMessagesAPIClient - params *ListChannelMessagesInput - nextToken *string - firstPage bool -} - -// NewListChannelMessagesPaginator returns a new ListChannelMessagesPaginator -func NewListChannelMessagesPaginator(client ListChannelMessagesAPIClient, params *ListChannelMessagesInput, optFns ...func(*ListChannelMessagesPaginatorOptions)) *ListChannelMessagesPaginator { - if params == nil { - params = &ListChannelMessagesInput{} - } - - options := ListChannelMessagesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListChannelMessagesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListChannelMessagesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListChannelMessages page. -func (p *ListChannelMessagesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelMessagesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListChannelMessages(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListChannelMessagesMiddleware struct { -} - -func (*endpointPrefix_opListChannelMessagesMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelMessagesMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelMessagesMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelMessagesMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelMessagesAPIClient is a client that implements the -// ListChannelMessages operation. -type ListChannelMessagesAPIClient interface { - ListChannelMessages(context.Context, *ListChannelMessagesInput, ...func(*Options)) (*ListChannelMessagesOutput, error) -} - -var _ ListChannelMessagesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListChannelMessages(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListChannelMessages", - } -} diff --git a/service/chime/api_op_ListChannelModerators.go b/service/chime/api_op_ListChannelModerators.go deleted file mode 100644 index c67bc5b666d..00000000000 --- a/service/chime/api_op_ListChannelModerators.go +++ /dev/null @@ -1,313 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all the moderators for a channel. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListChannelModerators], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListChannelModerators in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListChannelModerators]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_ListChannelModerators.html -func (c *Client) ListChannelModerators(ctx context.Context, params *ListChannelModeratorsInput, optFns ...func(*Options)) (*ListChannelModeratorsOutput, error) { - if params == nil { - params = &ListChannelModeratorsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListChannelModerators", params, optFns, c.addOperationListChannelModeratorsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListChannelModeratorsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListChannelModeratorsInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The maximum number of moderators that you want returned. - MaxResults *int32 - - // The token passed by previous API calls until all requested moderators are - // returned. - NextToken *string - - noSmithyDocumentSerde -} - -type ListChannelModeratorsOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // The information about and names of each moderator. - ChannelModerators []types.ChannelModeratorSummary - - // The token passed by previous API calls until all requested moderators are - // returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListChannelModeratorsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelModerators{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelModerators{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListChannelModerators"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListChannelModeratorsMiddleware(stack); err != nil { - return err - } - if err = addOpListChannelModeratorsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelModerators(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListChannelModeratorsPaginatorOptions is the paginator options for -// ListChannelModerators -type ListChannelModeratorsPaginatorOptions struct { - // The maximum number of moderators that you want returned. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListChannelModeratorsPaginator is a paginator for ListChannelModerators -type ListChannelModeratorsPaginator struct { - options ListChannelModeratorsPaginatorOptions - client ListChannelModeratorsAPIClient - params *ListChannelModeratorsInput - nextToken *string - firstPage bool -} - -// NewListChannelModeratorsPaginator returns a new ListChannelModeratorsPaginator -func NewListChannelModeratorsPaginator(client ListChannelModeratorsAPIClient, params *ListChannelModeratorsInput, optFns ...func(*ListChannelModeratorsPaginatorOptions)) *ListChannelModeratorsPaginator { - if params == nil { - params = &ListChannelModeratorsInput{} - } - - options := ListChannelModeratorsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListChannelModeratorsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListChannelModeratorsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListChannelModerators page. -func (p *ListChannelModeratorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelModeratorsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListChannelModerators(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListChannelModeratorsMiddleware struct { -} - -func (*endpointPrefix_opListChannelModeratorsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelModeratorsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelModeratorsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelModeratorsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelModeratorsAPIClient is a client that implements the -// ListChannelModerators operation. -type ListChannelModeratorsAPIClient interface { - ListChannelModerators(context.Context, *ListChannelModeratorsInput, ...func(*Options)) (*ListChannelModeratorsOutput, error) -} - -var _ ListChannelModeratorsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListChannelModerators(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListChannelModerators", - } -} diff --git a/service/chime/api_op_ListChannels.go b/service/chime/api_op_ListChannels.go deleted file mode 100644 index e3e32e1f9be..00000000000 --- a/service/chime/api_op_ListChannels.go +++ /dev/null @@ -1,320 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all Channels created under a single Chime App as a paginated list. You -// can specify filters to narrow results. -// -// Functionality & restrictions -// -// - Use privacy = PUBLIC to retrieve all public channels in the account. -// -// - Only an AppInstanceAdmin can set privacy = PRIVATE to list the private -// channels in an account. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListChannels], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListChannels in the Amazon Chime SDK Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListChannels]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_ListChannels.html -func (c *Client) ListChannels(ctx context.Context, params *ListChannelsInput, optFns ...func(*Options)) (*ListChannelsOutput, error) { - if params == nil { - params = &ListChannelsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListChannels", params, optFns, c.addOperationListChannelsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListChannelsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListChannelsInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The maximum number of channels that you want to return. - MaxResults *int32 - - // The token passed by previous API calls until all requested channels are - // returned. - NextToken *string - - // The privacy setting. PUBLIC retrieves all the public channels. PRIVATE - // retrieves private channels. Only an AppInstanceAdmin can retrieve private - // channels. - Privacy types.ChannelPrivacy - - noSmithyDocumentSerde -} - -type ListChannelsOutput struct { - - // The information about each channel. - Channels []types.ChannelSummary - - // The token returned from previous API requests until the number of channels is - // reached. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListChannelsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannels{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannels{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListChannels"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListChannelsMiddleware(stack); err != nil { - return err - } - if err = addOpListChannelsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannels(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListChannelsPaginatorOptions is the paginator options for ListChannels -type ListChannelsPaginatorOptions struct { - // The maximum number of channels that you want to return. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListChannelsPaginator is a paginator for ListChannels -type ListChannelsPaginator struct { - options ListChannelsPaginatorOptions - client ListChannelsAPIClient - params *ListChannelsInput - nextToken *string - firstPage bool -} - -// NewListChannelsPaginator returns a new ListChannelsPaginator -func NewListChannelsPaginator(client ListChannelsAPIClient, params *ListChannelsInput, optFns ...func(*ListChannelsPaginatorOptions)) *ListChannelsPaginator { - if params == nil { - params = &ListChannelsInput{} - } - - options := ListChannelsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListChannelsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListChannelsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListChannels page. -func (p *ListChannelsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListChannels(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListChannelsMiddleware struct { -} - -func (*endpointPrefix_opListChannelsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelsAPIClient is a client that implements the ListChannels operation. -type ListChannelsAPIClient interface { - ListChannels(context.Context, *ListChannelsInput, ...func(*Options)) (*ListChannelsOutput, error) -} - -var _ ListChannelsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListChannels(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListChannels", - } -} diff --git a/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go b/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go deleted file mode 100644 index d5d82b8b059..00000000000 --- a/service/chime/api_op_ListChannelsModeratedByAppInstanceUser.go +++ /dev/null @@ -1,307 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// A list of the channels moderated by an AppInstanceUser . -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListChannelsModeratedByAppInstanceUser], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListChannelsModeratedByAppInstanceUser in the Amazon -// Chime SDK Messaging Namespace -// -// [ListChannelsModeratedByAppInstanceUser]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_ListChannelsModeratedByAppInstanceUser.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) ListChannelsModeratedByAppInstanceUser(ctx context.Context, params *ListChannelsModeratedByAppInstanceUserInput, optFns ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) { - if params == nil { - params = &ListChannelsModeratedByAppInstanceUserInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListChannelsModeratedByAppInstanceUser", params, optFns, c.addOperationListChannelsModeratedByAppInstanceUserMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListChannelsModeratedByAppInstanceUserOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListChannelsModeratedByAppInstanceUserInput struct { - - // The ARN of the user in the moderated channel. - AppInstanceUserArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The maximum number of channels in the request. - MaxResults *int32 - - // The token returned from previous API requests until the number of channels - // moderated by the user is reached. - NextToken *string - - noSmithyDocumentSerde -} - -type ListChannelsModeratedByAppInstanceUserOutput struct { - - // The moderated channels in the request. - Channels []types.ChannelModeratedByAppInstanceUserSummary - - // The token returned from previous API requests until the number of channels - // moderated by the user is reached. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListChannelsModeratedByAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListChannelsModeratedByAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListChannelsModeratedByAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListChannelsModeratedByAppInstanceUser"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListChannelsModeratedByAppInstanceUser(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListChannelsModeratedByAppInstanceUserPaginatorOptions is the paginator options -// for ListChannelsModeratedByAppInstanceUser -type ListChannelsModeratedByAppInstanceUserPaginatorOptions struct { - // The maximum number of channels in the request. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListChannelsModeratedByAppInstanceUserPaginator is a paginator for -// ListChannelsModeratedByAppInstanceUser -type ListChannelsModeratedByAppInstanceUserPaginator struct { - options ListChannelsModeratedByAppInstanceUserPaginatorOptions - client ListChannelsModeratedByAppInstanceUserAPIClient - params *ListChannelsModeratedByAppInstanceUserInput - nextToken *string - firstPage bool -} - -// NewListChannelsModeratedByAppInstanceUserPaginator returns a new -// ListChannelsModeratedByAppInstanceUserPaginator -func NewListChannelsModeratedByAppInstanceUserPaginator(client ListChannelsModeratedByAppInstanceUserAPIClient, params *ListChannelsModeratedByAppInstanceUserInput, optFns ...func(*ListChannelsModeratedByAppInstanceUserPaginatorOptions)) *ListChannelsModeratedByAppInstanceUserPaginator { - if params == nil { - params = &ListChannelsModeratedByAppInstanceUserInput{} - } - - options := ListChannelsModeratedByAppInstanceUserPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListChannelsModeratedByAppInstanceUserPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListChannelsModeratedByAppInstanceUserPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListChannelsModeratedByAppInstanceUser page. -func (p *ListChannelsModeratedByAppInstanceUserPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListChannelsModeratedByAppInstanceUser(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -type endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opListChannelsModeratedByAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -// ListChannelsModeratedByAppInstanceUserAPIClient is a client that implements the -// ListChannelsModeratedByAppInstanceUser operation. -type ListChannelsModeratedByAppInstanceUserAPIClient interface { - ListChannelsModeratedByAppInstanceUser(context.Context, *ListChannelsModeratedByAppInstanceUserInput, ...func(*Options)) (*ListChannelsModeratedByAppInstanceUserOutput, error) -} - -var _ ListChannelsModeratedByAppInstanceUserAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListChannelsModeratedByAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListChannelsModeratedByAppInstanceUser", - } -} diff --git a/service/chime/api_op_ListMediaCapturePipelines.go b/service/chime/api_op_ListMediaCapturePipelines.go deleted file mode 100644 index c7a0de04614..00000000000 --- a/service/chime/api_op_ListMediaCapturePipelines.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Returns a list of media capture pipelines. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListMediaCapturePipelines], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListMediaCapturePipelines in the Amazon Chime SDK Media -// Pipelines Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListMediaCapturePipelines]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_media-pipelines-chime_ListMediaCapturePipelines.html -func (c *Client) ListMediaCapturePipelines(ctx context.Context, params *ListMediaCapturePipelinesInput, optFns ...func(*Options)) (*ListMediaCapturePipelinesOutput, error) { - if params == nil { - params = &ListMediaCapturePipelinesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListMediaCapturePipelines", params, optFns, c.addOperationListMediaCapturePipelinesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListMediaCapturePipelinesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListMediaCapturePipelinesInput struct { - - // The maximum number of results to return in a single call. Valid Range: 1 - 99. - MaxResults *int32 - - // The token used to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type ListMediaCapturePipelinesOutput struct { - - // The media capture pipeline objects in the list. - MediaCapturePipelines []types.MediaCapturePipeline - - // The token used to retrieve the next page of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListMediaCapturePipelinesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListMediaCapturePipelines{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListMediaCapturePipelines{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListMediaCapturePipelines"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMediaCapturePipelines(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListMediaCapturePipelinesPaginatorOptions is the paginator options for -// ListMediaCapturePipelines -type ListMediaCapturePipelinesPaginatorOptions struct { - // The maximum number of results to return in a single call. Valid Range: 1 - 99. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListMediaCapturePipelinesPaginator is a paginator for ListMediaCapturePipelines -type ListMediaCapturePipelinesPaginator struct { - options ListMediaCapturePipelinesPaginatorOptions - client ListMediaCapturePipelinesAPIClient - params *ListMediaCapturePipelinesInput - nextToken *string - firstPage bool -} - -// NewListMediaCapturePipelinesPaginator returns a new -// ListMediaCapturePipelinesPaginator -func NewListMediaCapturePipelinesPaginator(client ListMediaCapturePipelinesAPIClient, params *ListMediaCapturePipelinesInput, optFns ...func(*ListMediaCapturePipelinesPaginatorOptions)) *ListMediaCapturePipelinesPaginator { - if params == nil { - params = &ListMediaCapturePipelinesInput{} - } - - options := ListMediaCapturePipelinesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListMediaCapturePipelinesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListMediaCapturePipelinesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListMediaCapturePipelines page. -func (p *ListMediaCapturePipelinesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMediaCapturePipelinesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListMediaCapturePipelines(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListMediaCapturePipelinesAPIClient is a client that implements the -// ListMediaCapturePipelines operation. -type ListMediaCapturePipelinesAPIClient interface { - ListMediaCapturePipelines(context.Context, *ListMediaCapturePipelinesInput, ...func(*Options)) (*ListMediaCapturePipelinesOutput, error) -} - -var _ ListMediaCapturePipelinesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListMediaCapturePipelines(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListMediaCapturePipelines", - } -} diff --git a/service/chime/api_op_ListMeetingTags.go b/service/chime/api_op_ListMeetingTags.go deleted file mode 100644 index 92b2f9c6496..00000000000 --- a/service/chime/api_op_ListMeetingTags.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the tags applied to an Amazon Chime SDK meeting resource. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListTagsForResource], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Use ListTagsForResource in the Amazon Chime SDK Meetings Namespace. -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListTagsForResource]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_ListTagsForResource.html -func (c *Client) ListMeetingTags(ctx context.Context, params *ListMeetingTagsInput, optFns ...func(*Options)) (*ListMeetingTagsOutput, error) { - if params == nil { - params = &ListMeetingTagsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListMeetingTags", params, optFns, c.addOperationListMeetingTagsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListMeetingTagsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListMeetingTagsInput struct { - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - noSmithyDocumentSerde -} - -type ListMeetingTagsOutput struct { - - // A list of tag key-value pairs. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListMeetingTagsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListMeetingTags{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListMeetingTags{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListMeetingTags"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListMeetingTagsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMeetingTags(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListMeetingTags(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListMeetingTags", - } -} diff --git a/service/chime/api_op_ListMeetings.go b/service/chime/api_op_ListMeetings.go deleted file mode 100644 index dde7c1b2b7d..00000000000 --- a/service/chime/api_op_ListMeetings.go +++ /dev/null @@ -1,261 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists up to 100 active Amazon Chime SDK meetings. -// -// ListMeetings is not supported in the Amazon Chime SDK Meetings Namespace. -// Update your application to remove calls to this API. -// -// For more information about the Amazon Chime SDK, see [Using the Amazon Chime SDK] in the Amazon Chime SDK -// Developer Guide. -// -// Deprecated: ListMeetings is not supported in the Amazon Chime SDK Meetings -// Namespace. Update your application to remove calls to this API. -// -// [Using the Amazon Chime SDK]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meetings-sdk.html -func (c *Client) ListMeetings(ctx context.Context, params *ListMeetingsInput, optFns ...func(*Options)) (*ListMeetingsOutput, error) { - if params == nil { - params = &ListMeetingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListMeetings", params, optFns, c.addOperationListMeetingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListMeetingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListMeetingsInput struct { - - // The maximum number of results to return in a single call. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type ListMeetingsOutput struct { - - // The Amazon Chime SDK meeting information. - Meetings []types.Meeting - - // The token to use to retrieve the next page of results. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListMeetingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListMeetings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListMeetings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListMeetings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListMeetings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListMeetingsPaginatorOptions is the paginator options for ListMeetings -type ListMeetingsPaginatorOptions struct { - // The maximum number of results to return in a single call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListMeetingsPaginator is a paginator for ListMeetings -type ListMeetingsPaginator struct { - options ListMeetingsPaginatorOptions - client ListMeetingsAPIClient - params *ListMeetingsInput - nextToken *string - firstPage bool -} - -// NewListMeetingsPaginator returns a new ListMeetingsPaginator -func NewListMeetingsPaginator(client ListMeetingsAPIClient, params *ListMeetingsInput, optFns ...func(*ListMeetingsPaginatorOptions)) *ListMeetingsPaginator { - if params == nil { - params = &ListMeetingsInput{} - } - - options := ListMeetingsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListMeetingsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListMeetingsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListMeetings page. -func (p *ListMeetingsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListMeetingsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListMeetings(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListMeetingsAPIClient is a client that implements the ListMeetings operation. -type ListMeetingsAPIClient interface { - ListMeetings(context.Context, *ListMeetingsInput, ...func(*Options)) (*ListMeetingsOutput, error) -} - -var _ ListMeetingsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListMeetings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListMeetings", - } -} diff --git a/service/chime/api_op_ListProxySessions.go b/service/chime/api_op_ListProxySessions.go deleted file mode 100644 index 44648dcc447..00000000000 --- a/service/chime/api_op_ListProxySessions.go +++ /dev/null @@ -1,274 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the proxy sessions for the specified Amazon Chime Voice Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListProxySessions], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListProxySessions in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListProxySessions]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_ListProxySessions.html -func (c *Client) ListProxySessions(ctx context.Context, params *ListProxySessionsInput, optFns ...func(*Options)) (*ListProxySessionsOutput, error) { - if params == nil { - params = &ListProxySessionsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListProxySessions", params, optFns, c.addOperationListProxySessionsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListProxySessionsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListProxySessionsInput struct { - - // The Amazon Chime voice connector ID. - // - // This member is required. - VoiceConnectorId *string - - // The maximum number of results to return in a single call. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - // The proxy session status. - Status types.ProxySessionStatus - - noSmithyDocumentSerde -} - -type ListProxySessionsOutput struct { - - // The token to use to retrieve the next page of results. - NextToken *string - - // The proxy session details. - ProxySessions []types.ProxySession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListProxySessionsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListProxySessions{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListProxySessions{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListProxySessions"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListProxySessionsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProxySessions(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListProxySessionsPaginatorOptions is the paginator options for ListProxySessions -type ListProxySessionsPaginatorOptions struct { - // The maximum number of results to return in a single call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListProxySessionsPaginator is a paginator for ListProxySessions -type ListProxySessionsPaginator struct { - options ListProxySessionsPaginatorOptions - client ListProxySessionsAPIClient - params *ListProxySessionsInput - nextToken *string - firstPage bool -} - -// NewListProxySessionsPaginator returns a new ListProxySessionsPaginator -func NewListProxySessionsPaginator(client ListProxySessionsAPIClient, params *ListProxySessionsInput, optFns ...func(*ListProxySessionsPaginatorOptions)) *ListProxySessionsPaginator { - if params == nil { - params = &ListProxySessionsInput{} - } - - options := ListProxySessionsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListProxySessionsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListProxySessionsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListProxySessions page. -func (p *ListProxySessionsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListProxySessionsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListProxySessions(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListProxySessionsAPIClient is a client that implements the ListProxySessions -// operation. -type ListProxySessionsAPIClient interface { - ListProxySessions(context.Context, *ListProxySessionsInput, ...func(*Options)) (*ListProxySessionsOutput, error) -} - -var _ ListProxySessionsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListProxySessions(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListProxySessions", - } -} diff --git a/service/chime/api_op_ListSipMediaApplications.go b/service/chime/api_op_ListSipMediaApplications.go deleted file mode 100644 index 5ff2cf24ed0..00000000000 --- a/service/chime/api_op_ListSipMediaApplications.go +++ /dev/null @@ -1,265 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the SIP media applications under the administrator's AWS account. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListSipMediaApplications], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListSipMediaApplications in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListSipMediaApplications]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_ListSipMediaApplications.html -func (c *Client) ListSipMediaApplications(ctx context.Context, params *ListSipMediaApplicationsInput, optFns ...func(*Options)) (*ListSipMediaApplicationsOutput, error) { - if params == nil { - params = &ListSipMediaApplicationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListSipMediaApplications", params, optFns, c.addOperationListSipMediaApplicationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListSipMediaApplicationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListSipMediaApplicationsInput struct { - - // The maximum number of results to return in a single call. Defaults to 100. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type ListSipMediaApplicationsOutput struct { - - // The token to use to retrieve the next page of results. - NextToken *string - - // List of SIP media applications and application details. - SipMediaApplications []types.SipMediaApplication - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListSipMediaApplicationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListSipMediaApplications{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListSipMediaApplications{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListSipMediaApplications"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSipMediaApplications(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListSipMediaApplicationsPaginatorOptions is the paginator options for -// ListSipMediaApplications -type ListSipMediaApplicationsPaginatorOptions struct { - // The maximum number of results to return in a single call. Defaults to 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListSipMediaApplicationsPaginator is a paginator for ListSipMediaApplications -type ListSipMediaApplicationsPaginator struct { - options ListSipMediaApplicationsPaginatorOptions - client ListSipMediaApplicationsAPIClient - params *ListSipMediaApplicationsInput - nextToken *string - firstPage bool -} - -// NewListSipMediaApplicationsPaginator returns a new -// ListSipMediaApplicationsPaginator -func NewListSipMediaApplicationsPaginator(client ListSipMediaApplicationsAPIClient, params *ListSipMediaApplicationsInput, optFns ...func(*ListSipMediaApplicationsPaginatorOptions)) *ListSipMediaApplicationsPaginator { - if params == nil { - params = &ListSipMediaApplicationsInput{} - } - - options := ListSipMediaApplicationsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListSipMediaApplicationsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListSipMediaApplicationsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListSipMediaApplications page. -func (p *ListSipMediaApplicationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSipMediaApplicationsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListSipMediaApplications(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListSipMediaApplicationsAPIClient is a client that implements the -// ListSipMediaApplications operation. -type ListSipMediaApplicationsAPIClient interface { - ListSipMediaApplications(context.Context, *ListSipMediaApplicationsInput, ...func(*Options)) (*ListSipMediaApplicationsOutput, error) -} - -var _ ListSipMediaApplicationsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListSipMediaApplications(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListSipMediaApplications", - } -} diff --git a/service/chime/api_op_ListSipRules.go b/service/chime/api_op_ListSipRules.go deleted file mode 100644 index 0c9d86109f3..00000000000 --- a/service/chime/api_op_ListSipRules.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the SIP rules under the administrator's AWS account. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListSipRules], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListSipRules in the Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListSipRules]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_ListSipRules.html -func (c *Client) ListSipRules(ctx context.Context, params *ListSipRulesInput, optFns ...func(*Options)) (*ListSipRulesOutput, error) { - if params == nil { - params = &ListSipRulesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListSipRules", params, optFns, c.addOperationListSipRulesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListSipRulesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListSipRulesInput struct { - - // The maximum number of results to return in a single call. Defaults to 100. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - // The SIP media application ID. - SipMediaApplicationId *string - - noSmithyDocumentSerde -} - -type ListSipRulesOutput struct { - - // The token to use to retrieve the next page of results. - NextToken *string - - // List of SIP rules and rule details. - SipRules []types.SipRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListSipRulesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListSipRules{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListSipRules{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListSipRules"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListSipRules(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListSipRulesPaginatorOptions is the paginator options for ListSipRules -type ListSipRulesPaginatorOptions struct { - // The maximum number of results to return in a single call. Defaults to 100. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListSipRulesPaginator is a paginator for ListSipRules -type ListSipRulesPaginator struct { - options ListSipRulesPaginatorOptions - client ListSipRulesAPIClient - params *ListSipRulesInput - nextToken *string - firstPage bool -} - -// NewListSipRulesPaginator returns a new ListSipRulesPaginator -func NewListSipRulesPaginator(client ListSipRulesAPIClient, params *ListSipRulesInput, optFns ...func(*ListSipRulesPaginatorOptions)) *ListSipRulesPaginator { - if params == nil { - params = &ListSipRulesInput{} - } - - options := ListSipRulesPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListSipRulesPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListSipRulesPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListSipRules page. -func (p *ListSipRulesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListSipRulesOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListSipRules(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListSipRulesAPIClient is a client that implements the ListSipRules operation. -type ListSipRulesAPIClient interface { - ListSipRules(context.Context, *ListSipRulesInput, ...func(*Options)) (*ListSipRulesOutput, error) -} - -var _ ListSipRulesAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListSipRules(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListSipRules", - } -} diff --git a/service/chime/api_op_ListTagsForResource.go b/service/chime/api_op_ListTagsForResource.go deleted file mode 100644 index bd33a28ddb4..00000000000 --- a/service/chime/api_op_ListTagsForResource.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the tags applied to an Amazon Chime SDK meeting and messaging resources. -// -// This API is is no longer supported and will not be updated. We recommend using -// the applicable latest version in the Amazon Chime SDK. -// -// - For meetings: [ListTagsForResource]. -// -// - For messaging: [ListTagsForResource]. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListTagsForResource in the Amazon Chime SDK Voice, -// Amazon Chime SDK Meetings, Amazon Chime SDK Identity, Amazon Chime SDK -// Messaging, and Amazon Chime SDK Media Pipelines Namespaces -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListTagsForResource]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_ListTagsForResource.html -func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { - if params == nil { - params = &ListTagsForResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTagsForResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListTagsForResourceInput struct { - - // The resource ARN. - // - // This member is required. - ResourceARN *string - - noSmithyDocumentSerde -} - -type ListTagsForResourceOutput struct { - - // A list of tag-key value pairs. - Tags []types.Tag - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListTagsForResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTagsForResource", - } -} diff --git a/service/chime/api_op_ListVoiceConnectorGroups.go b/service/chime/api_op_ListVoiceConnectorGroups.go deleted file mode 100644 index 6f7d5d49b02..00000000000 --- a/service/chime/api_op_ListVoiceConnectorGroups.go +++ /dev/null @@ -1,266 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the Amazon Chime Voice Connector groups for the administrator's AWS -// account. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListVoiceConnectorGroups], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListVoiceConnectorGroups in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListVoiceConnectorGroups]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_ListVoiceConnectorGroups.html -func (c *Client) ListVoiceConnectorGroups(ctx context.Context, params *ListVoiceConnectorGroupsInput, optFns ...func(*Options)) (*ListVoiceConnectorGroupsOutput, error) { - if params == nil { - params = &ListVoiceConnectorGroupsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListVoiceConnectorGroups", params, optFns, c.addOperationListVoiceConnectorGroupsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListVoiceConnectorGroupsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListVoiceConnectorGroupsInput struct { - - // The maximum number of results to return in a single call. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type ListVoiceConnectorGroupsOutput struct { - - // The token to use to retrieve the next page of results. - NextToken *string - - // The details of the Amazon Chime Voice Connector groups. - VoiceConnectorGroups []types.VoiceConnectorGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListVoiceConnectorGroupsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListVoiceConnectorGroups{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListVoiceConnectorGroups{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListVoiceConnectorGroups"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVoiceConnectorGroups(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListVoiceConnectorGroupsPaginatorOptions is the paginator options for -// ListVoiceConnectorGroups -type ListVoiceConnectorGroupsPaginatorOptions struct { - // The maximum number of results to return in a single call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListVoiceConnectorGroupsPaginator is a paginator for ListVoiceConnectorGroups -type ListVoiceConnectorGroupsPaginator struct { - options ListVoiceConnectorGroupsPaginatorOptions - client ListVoiceConnectorGroupsAPIClient - params *ListVoiceConnectorGroupsInput - nextToken *string - firstPage bool -} - -// NewListVoiceConnectorGroupsPaginator returns a new -// ListVoiceConnectorGroupsPaginator -func NewListVoiceConnectorGroupsPaginator(client ListVoiceConnectorGroupsAPIClient, params *ListVoiceConnectorGroupsInput, optFns ...func(*ListVoiceConnectorGroupsPaginatorOptions)) *ListVoiceConnectorGroupsPaginator { - if params == nil { - params = &ListVoiceConnectorGroupsInput{} - } - - options := ListVoiceConnectorGroupsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListVoiceConnectorGroupsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListVoiceConnectorGroupsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListVoiceConnectorGroups page. -func (p *ListVoiceConnectorGroupsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListVoiceConnectorGroupsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListVoiceConnectorGroups(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListVoiceConnectorGroupsAPIClient is a client that implements the -// ListVoiceConnectorGroups operation. -type ListVoiceConnectorGroupsAPIClient interface { - ListVoiceConnectorGroups(context.Context, *ListVoiceConnectorGroupsInput, ...func(*Options)) (*ListVoiceConnectorGroupsOutput, error) -} - -var _ ListVoiceConnectorGroupsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListVoiceConnectorGroups(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListVoiceConnectorGroups", - } -} diff --git a/service/chime/api_op_ListVoiceConnectorTerminationCredentials.go b/service/chime/api_op_ListVoiceConnectorTerminationCredentials.go deleted file mode 100644 index 5c9dcd21c2a..00000000000 --- a/service/chime/api_op_ListVoiceConnectorTerminationCredentials.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the SIP credentials for the specified Amazon Chime Voice Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListVoiceConnectorTerminationCredentials], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListVoiceConnectorTerminationCredentials in the Amazon -// Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListVoiceConnectorTerminationCredentials]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_ListVoiceConnectorTerminationCredentials.html -func (c *Client) ListVoiceConnectorTerminationCredentials(ctx context.Context, params *ListVoiceConnectorTerminationCredentialsInput, optFns ...func(*Options)) (*ListVoiceConnectorTerminationCredentialsOutput, error) { - if params == nil { - params = &ListVoiceConnectorTerminationCredentialsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListVoiceConnectorTerminationCredentials", params, optFns, c.addOperationListVoiceConnectorTerminationCredentialsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListVoiceConnectorTerminationCredentialsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListVoiceConnectorTerminationCredentialsInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type ListVoiceConnectorTerminationCredentialsOutput struct { - - // A list of user names. - Usernames []string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListVoiceConnectorTerminationCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListVoiceConnectorTerminationCredentials{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListVoiceConnectorTerminationCredentials{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListVoiceConnectorTerminationCredentials"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVoiceConnectorTerminationCredentials(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListVoiceConnectorTerminationCredentials(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListVoiceConnectorTerminationCredentials", - } -} diff --git a/service/chime/api_op_ListVoiceConnectors.go b/service/chime/api_op_ListVoiceConnectors.go deleted file mode 100644 index 58cf291a7fe..00000000000 --- a/service/chime/api_op_ListVoiceConnectors.go +++ /dev/null @@ -1,264 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists the Amazon Chime Voice Connectors for the administrator's AWS account. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ListVoiceConnectors], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ListVoiceConnectors in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ListVoiceConnectors]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_ListVoiceConnectors.html -func (c *Client) ListVoiceConnectors(ctx context.Context, params *ListVoiceConnectorsInput, optFns ...func(*Options)) (*ListVoiceConnectorsOutput, error) { - if params == nil { - params = &ListVoiceConnectorsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListVoiceConnectors", params, optFns, c.addOperationListVoiceConnectorsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListVoiceConnectorsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListVoiceConnectorsInput struct { - - // The maximum number of results to return in a single call. - MaxResults *int32 - - // The token to use to retrieve the next page of results. - NextToken *string - - noSmithyDocumentSerde -} - -type ListVoiceConnectorsOutput struct { - - // The token to use to retrieve the next page of results. - NextToken *string - - // The details of the Amazon Chime Voice Connectors. - VoiceConnectors []types.VoiceConnector - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListVoiceConnectorsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpListVoiceConnectors{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListVoiceConnectors{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListVoiceConnectors"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListVoiceConnectors(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -// ListVoiceConnectorsPaginatorOptions is the paginator options for -// ListVoiceConnectors -type ListVoiceConnectorsPaginatorOptions struct { - // The maximum number of results to return in a single call. - Limit int32 - - // Set to true if pagination should stop if the service returns a pagination token - // that matches the most recent token provided to the service. - StopOnDuplicateToken bool -} - -// ListVoiceConnectorsPaginator is a paginator for ListVoiceConnectors -type ListVoiceConnectorsPaginator struct { - options ListVoiceConnectorsPaginatorOptions - client ListVoiceConnectorsAPIClient - params *ListVoiceConnectorsInput - nextToken *string - firstPage bool -} - -// NewListVoiceConnectorsPaginator returns a new ListVoiceConnectorsPaginator -func NewListVoiceConnectorsPaginator(client ListVoiceConnectorsAPIClient, params *ListVoiceConnectorsInput, optFns ...func(*ListVoiceConnectorsPaginatorOptions)) *ListVoiceConnectorsPaginator { - if params == nil { - params = &ListVoiceConnectorsInput{} - } - - options := ListVoiceConnectorsPaginatorOptions{} - if params.MaxResults != nil { - options.Limit = *params.MaxResults - } - - for _, fn := range optFns { - fn(&options) - } - - return &ListVoiceConnectorsPaginator{ - options: options, - client: client, - params: params, - firstPage: true, - nextToken: params.NextToken, - } -} - -// HasMorePages returns a boolean indicating whether more pages are available -func (p *ListVoiceConnectorsPaginator) HasMorePages() bool { - return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) -} - -// NextPage retrieves the next ListVoiceConnectors page. -func (p *ListVoiceConnectorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListVoiceConnectorsOutput, error) { - if !p.HasMorePages() { - return nil, fmt.Errorf("no more pages available") - } - - params := *p.params - params.NextToken = p.nextToken - - var limit *int32 - if p.options.Limit > 0 { - limit = &p.options.Limit - } - params.MaxResults = limit - - optFns = append([]func(*Options){ - addIsPaginatorUserAgent, - }, optFns...) - result, err := p.client.ListVoiceConnectors(ctx, ¶ms, optFns...) - if err != nil { - return nil, err - } - p.firstPage = false - - prevToken := p.nextToken - p.nextToken = result.NextToken - - if p.options.StopOnDuplicateToken && - prevToken != nil && - p.nextToken != nil && - *prevToken == *p.nextToken { - p.nextToken = nil - } - - return result, nil -} - -// ListVoiceConnectorsAPIClient is a client that implements the -// ListVoiceConnectors operation. -type ListVoiceConnectorsAPIClient interface { - ListVoiceConnectors(context.Context, *ListVoiceConnectorsInput, ...func(*Options)) (*ListVoiceConnectorsOutput, error) -} - -var _ ListVoiceConnectorsAPIClient = (*Client)(nil) - -func newServiceMetadataMiddleware_opListVoiceConnectors(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListVoiceConnectors", - } -} diff --git a/service/chime/api_op_PutAppInstanceRetentionSettings.go b/service/chime/api_op_PutAppInstanceRetentionSettings.go deleted file mode 100644 index 7d485a14755..00000000000 --- a/service/chime/api_op_PutAppInstanceRetentionSettings.go +++ /dev/null @@ -1,208 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Sets the amount of time in days that a given AppInstance retains data. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutAppInstanceRetentionSettings], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutAppInstanceRetentionSettings in the Amazon Chime SDK -// Identity Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [PutAppInstanceRetentionSettings]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_PutAppInstanceRetentionSettings.html -func (c *Client) PutAppInstanceRetentionSettings(ctx context.Context, params *PutAppInstanceRetentionSettingsInput, optFns ...func(*Options)) (*PutAppInstanceRetentionSettingsOutput, error) { - if params == nil { - params = &PutAppInstanceRetentionSettingsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutAppInstanceRetentionSettings", params, optFns, c.addOperationPutAppInstanceRetentionSettingsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutAppInstanceRetentionSettingsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutAppInstanceRetentionSettingsInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - // The time in days to retain data. Data type: number. - // - // This member is required. - AppInstanceRetentionSettings *types.AppInstanceRetentionSettings - - noSmithyDocumentSerde -} - -type PutAppInstanceRetentionSettingsOutput struct { - - // The time in days to retain data. Data type: number. - AppInstanceRetentionSettings *types.AppInstanceRetentionSettings - - // The time at which the API deletes data. - InitiateDeletionTimestamp *time.Time - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutAppInstanceRetentionSettingsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutAppInstanceRetentionSettings{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutAppInstanceRetentionSettings{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutAppInstanceRetentionSettings"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opPutAppInstanceRetentionSettingsMiddleware(stack); err != nil { - return err - } - if err = addOpPutAppInstanceRetentionSettingsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAppInstanceRetentionSettings(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opPutAppInstanceRetentionSettingsMiddleware struct { -} - -func (*endpointPrefix_opPutAppInstanceRetentionSettingsMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opPutAppInstanceRetentionSettingsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opPutAppInstanceRetentionSettingsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opPutAppInstanceRetentionSettingsMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opPutAppInstanceRetentionSettings(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutAppInstanceRetentionSettings", - } -} diff --git a/service/chime/api_op_PutAppInstanceStreamingConfigurations.go b/service/chime/api_op_PutAppInstanceStreamingConfigurations.go deleted file mode 100644 index 1df4a7f6066..00000000000 --- a/service/chime/api_op_PutAppInstanceStreamingConfigurations.go +++ /dev/null @@ -1,174 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The data streaming configurations of an AppInstance . -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutMessagingStreamingConfigurations], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutAppInstanceStreamingConfigurations in the Amazon -// Chime SDK Messaging Namespace -// -// [PutMessagingStreamingConfigurations]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_PutMessagingStreamingConfigurations.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) PutAppInstanceStreamingConfigurations(ctx context.Context, params *PutAppInstanceStreamingConfigurationsInput, optFns ...func(*Options)) (*PutAppInstanceStreamingConfigurationsOutput, error) { - if params == nil { - params = &PutAppInstanceStreamingConfigurationsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutAppInstanceStreamingConfigurations", params, optFns, c.addOperationPutAppInstanceStreamingConfigurationsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutAppInstanceStreamingConfigurationsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutAppInstanceStreamingConfigurationsInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - // The streaming configurations set for an AppInstance . - // - // This member is required. - AppInstanceStreamingConfigurations []types.AppInstanceStreamingConfiguration - - noSmithyDocumentSerde -} - -type PutAppInstanceStreamingConfigurationsOutput struct { - - // The streaming configurations of an AppInstance . - AppInstanceStreamingConfigurations []types.AppInstanceStreamingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutAppInstanceStreamingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutAppInstanceStreamingConfigurations{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutAppInstanceStreamingConfigurations{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutAppInstanceStreamingConfigurations"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutAppInstanceStreamingConfigurationsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutAppInstanceStreamingConfigurations(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutAppInstanceStreamingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutAppInstanceStreamingConfigurations", - } -} diff --git a/service/chime/api_op_PutSipMediaApplicationLoggingConfiguration.go b/service/chime/api_op_PutSipMediaApplicationLoggingConfiguration.go deleted file mode 100644 index 72cd2f65dd1..00000000000 --- a/service/chime/api_op_PutSipMediaApplicationLoggingConfiguration.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the logging configuration for the specified SIP media application. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutSipMediaApplicationLoggingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutSipMediaApplicationLoggingConfiguration in the -// Amazon Chime SDK Voice Namespace -// -// [PutSipMediaApplicationLoggingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_PutSipMediaApplicationLoggingConfiguration.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) PutSipMediaApplicationLoggingConfiguration(ctx context.Context, params *PutSipMediaApplicationLoggingConfigurationInput, optFns ...func(*Options)) (*PutSipMediaApplicationLoggingConfigurationOutput, error) { - if params == nil { - params = &PutSipMediaApplicationLoggingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutSipMediaApplicationLoggingConfiguration", params, optFns, c.addOperationPutSipMediaApplicationLoggingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutSipMediaApplicationLoggingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutSipMediaApplicationLoggingConfigurationInput struct { - - // The SIP media application ID. - // - // This member is required. - SipMediaApplicationId *string - - // The actual logging configuration. - SipMediaApplicationLoggingConfiguration *types.SipMediaApplicationLoggingConfiguration - - noSmithyDocumentSerde -} - -type PutSipMediaApplicationLoggingConfigurationOutput struct { - - // The logging configuration of the SIP media application. - SipMediaApplicationLoggingConfiguration *types.SipMediaApplicationLoggingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutSipMediaApplicationLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutSipMediaApplicationLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutSipMediaApplicationLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutSipMediaApplicationLoggingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutSipMediaApplicationLoggingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutSipMediaApplicationLoggingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutSipMediaApplicationLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutSipMediaApplicationLoggingConfiguration", - } -} diff --git a/service/chime/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go b/service/chime/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go deleted file mode 100644 index 4f59bc42c15..00000000000 --- a/service/chime/api_op_PutVoiceConnectorEmergencyCallingConfiguration.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Puts emergency calling configuration details to the specified Amazon Chime -// Voice Connector, such as emergency phone numbers and calling countries. -// Origination and termination settings must be enabled for the Amazon Chime Voice -// Connector before emergency calling can be configured. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutVoiceConnectorEmergencyCallingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutVoiceConnectorEmergencyCallingConfiguration in the -// Amazon Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [PutVoiceConnectorEmergencyCallingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_PutVoiceConnectorEmergencyCallingConfiguration.html -func (c *Client) PutVoiceConnectorEmergencyCallingConfiguration(ctx context.Context, params *PutVoiceConnectorEmergencyCallingConfigurationInput, optFns ...func(*Options)) (*PutVoiceConnectorEmergencyCallingConfigurationOutput, error) { - if params == nil { - params = &PutVoiceConnectorEmergencyCallingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutVoiceConnectorEmergencyCallingConfiguration", params, optFns, c.addOperationPutVoiceConnectorEmergencyCallingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutVoiceConnectorEmergencyCallingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutVoiceConnectorEmergencyCallingConfigurationInput struct { - - // The emergency calling configuration details. - // - // This member is required. - EmergencyCallingConfiguration *types.EmergencyCallingConfiguration - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type PutVoiceConnectorEmergencyCallingConfigurationOutput struct { - - // The emergency calling configuration details. - EmergencyCallingConfiguration *types.EmergencyCallingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutVoiceConnectorEmergencyCallingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutVoiceConnectorEmergencyCallingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutVoiceConnectorEmergencyCallingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutVoiceConnectorEmergencyCallingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutVoiceConnectorEmergencyCallingConfiguration", - } -} diff --git a/service/chime/api_op_PutVoiceConnectorLoggingConfiguration.go b/service/chime/api_op_PutVoiceConnectorLoggingConfiguration.go deleted file mode 100644 index 4935534b443..00000000000 --- a/service/chime/api_op_PutVoiceConnectorLoggingConfiguration.go +++ /dev/null @@ -1,176 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds a logging configuration for the specified Amazon Chime Voice Connector. -// The logging configuration specifies whether SIP message logs are enabled for -// sending to Amazon CloudWatch Logs. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutVoiceConnectorLoggingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutVoiceConnectorLoggingConfiguration in the Amazon -// Chime SDK Voice Namespace -// -// [PutVoiceConnectorLoggingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_PutVoiceConnectorLoggingConfiguration.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) PutVoiceConnectorLoggingConfiguration(ctx context.Context, params *PutVoiceConnectorLoggingConfigurationInput, optFns ...func(*Options)) (*PutVoiceConnectorLoggingConfigurationOutput, error) { - if params == nil { - params = &PutVoiceConnectorLoggingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutVoiceConnectorLoggingConfiguration", params, optFns, c.addOperationPutVoiceConnectorLoggingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutVoiceConnectorLoggingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutVoiceConnectorLoggingConfigurationInput struct { - - // The logging configuration details to add. - // - // This member is required. - LoggingConfiguration *types.LoggingConfiguration - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type PutVoiceConnectorLoggingConfigurationOutput struct { - - // The updated logging configuration details. - LoggingConfiguration *types.LoggingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutVoiceConnectorLoggingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutVoiceConnectorLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutVoiceConnectorLoggingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutVoiceConnectorLoggingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutVoiceConnectorLoggingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutVoiceConnectorLoggingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutVoiceConnectorLoggingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutVoiceConnectorLoggingConfiguration", - } -} diff --git a/service/chime/api_op_PutVoiceConnectorOrigination.go b/service/chime/api_op_PutVoiceConnectorOrigination.go deleted file mode 100644 index 159d1c016b1..00000000000 --- a/service/chime/api_op_PutVoiceConnectorOrigination.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds origination settings for the specified Amazon Chime Voice Connector. -// -// If emergency calling is configured for the Amazon Chime Voice Connector, it -// must be deleted prior to turning off origination settings. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutVoiceConnectorOrigination], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutVoiceConnectorOrigination in the Amazon Chime SDK -// Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [PutVoiceConnectorOrigination]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_PutVoiceConnectorOrigination.html -func (c *Client) PutVoiceConnectorOrigination(ctx context.Context, params *PutVoiceConnectorOriginationInput, optFns ...func(*Options)) (*PutVoiceConnectorOriginationOutput, error) { - if params == nil { - params = &PutVoiceConnectorOriginationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutVoiceConnectorOrigination", params, optFns, c.addOperationPutVoiceConnectorOriginationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutVoiceConnectorOriginationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutVoiceConnectorOriginationInput struct { - - // The origination setting details to add. - // - // This member is required. - Origination *types.Origination - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type PutVoiceConnectorOriginationOutput struct { - - // The updated origination setting details. - Origination *types.Origination - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutVoiceConnectorOriginationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutVoiceConnectorOrigination{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutVoiceConnectorOrigination{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutVoiceConnectorOrigination"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutVoiceConnectorOriginationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutVoiceConnectorOrigination(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutVoiceConnectorOrigination(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutVoiceConnectorOrigination", - } -} diff --git a/service/chime/api_op_PutVoiceConnectorProxy.go b/service/chime/api_op_PutVoiceConnectorProxy.go deleted file mode 100644 index 4dc10793a32..00000000000 --- a/service/chime/api_op_PutVoiceConnectorProxy.go +++ /dev/null @@ -1,187 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Puts the specified proxy configuration to the specified Amazon Chime Voice -// Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutVoiceConnectorProxy], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutVoiceConnectorProxy in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [PutVoiceConnectorProxy]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_PutVoiceConnectorProxy.html -func (c *Client) PutVoiceConnectorProxy(ctx context.Context, params *PutVoiceConnectorProxyInput, optFns ...func(*Options)) (*PutVoiceConnectorProxyOutput, error) { - if params == nil { - params = &PutVoiceConnectorProxyInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutVoiceConnectorProxy", params, optFns, c.addOperationPutVoiceConnectorProxyMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutVoiceConnectorProxyOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutVoiceConnectorProxyInput struct { - - // The default number of minutes allowed for proxy sessions. - // - // This member is required. - DefaultSessionExpiryMinutes *int32 - - // The countries for proxy phone numbers to be selected from. - // - // This member is required. - PhoneNumberPoolCountries []string - - // The Amazon Chime voice connector ID. - // - // This member is required. - VoiceConnectorId *string - - // When true, stops proxy sessions from being created on the specified Amazon - // Chime Voice Connector. - Disabled *bool - - // The phone number to route calls to after a proxy session expires. - FallBackPhoneNumber *string - - noSmithyDocumentSerde -} - -type PutVoiceConnectorProxyOutput struct { - - // The proxy configuration details. - Proxy *types.Proxy - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutVoiceConnectorProxyMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutVoiceConnectorProxy{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutVoiceConnectorProxy{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutVoiceConnectorProxy"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutVoiceConnectorProxyValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutVoiceConnectorProxy(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutVoiceConnectorProxy(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutVoiceConnectorProxy", - } -} diff --git a/service/chime/api_op_PutVoiceConnectorStreamingConfiguration.go b/service/chime/api_op_PutVoiceConnectorStreamingConfiguration.go deleted file mode 100644 index 96ff8b13e38..00000000000 --- a/service/chime/api_op_PutVoiceConnectorStreamingConfiguration.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds a streaming configuration for the specified Amazon Chime Voice Connector. -// The streaming configuration specifies whether media streaming is enabled for -// sending to Kinesis. It also sets the retention period, in hours, for the Amazon -// Kinesis data. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutVoiceConnectorStreamingConfiguration], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutVoiceConnectorStreamingConfiguration in the Amazon -// Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [PutVoiceConnectorStreamingConfiguration]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_PutVoiceConnectorStreamingConfiguration.html -func (c *Client) PutVoiceConnectorStreamingConfiguration(ctx context.Context, params *PutVoiceConnectorStreamingConfigurationInput, optFns ...func(*Options)) (*PutVoiceConnectorStreamingConfigurationOutput, error) { - if params == nil { - params = &PutVoiceConnectorStreamingConfigurationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutVoiceConnectorStreamingConfiguration", params, optFns, c.addOperationPutVoiceConnectorStreamingConfigurationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutVoiceConnectorStreamingConfigurationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutVoiceConnectorStreamingConfigurationInput struct { - - // The streaming configuration details to add. - // - // This member is required. - StreamingConfiguration *types.StreamingConfiguration - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type PutVoiceConnectorStreamingConfigurationOutput struct { - - // The updated streaming configuration details. - StreamingConfiguration *types.StreamingConfiguration - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutVoiceConnectorStreamingConfigurationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutVoiceConnectorStreamingConfiguration{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutVoiceConnectorStreamingConfiguration{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutVoiceConnectorStreamingConfiguration"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutVoiceConnectorStreamingConfigurationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutVoiceConnectorStreamingConfiguration(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutVoiceConnectorStreamingConfiguration(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutVoiceConnectorStreamingConfiguration", - } -} diff --git a/service/chime/api_op_PutVoiceConnectorTermination.go b/service/chime/api_op_PutVoiceConnectorTermination.go deleted file mode 100644 index b3829adc1de..00000000000 --- a/service/chime/api_op_PutVoiceConnectorTermination.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds termination settings for the specified Amazon Chime Voice Connector. -// -// If emergency calling is configured for the Amazon Chime Voice Connector, it -// must be deleted prior to turning off termination settings. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutVoiceConnectorTermination], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutVoiceConnectorTermination in the Amazon Chime SDK -// Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [PutVoiceConnectorTermination]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_PutVoiceConnectorTermination.html -func (c *Client) PutVoiceConnectorTermination(ctx context.Context, params *PutVoiceConnectorTerminationInput, optFns ...func(*Options)) (*PutVoiceConnectorTerminationOutput, error) { - if params == nil { - params = &PutVoiceConnectorTerminationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutVoiceConnectorTermination", params, optFns, c.addOperationPutVoiceConnectorTerminationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutVoiceConnectorTerminationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutVoiceConnectorTerminationInput struct { - - // The termination setting details to add. - // - // This member is required. - Termination *types.Termination - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type PutVoiceConnectorTerminationOutput struct { - - // The updated termination setting details. - Termination *types.Termination - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutVoiceConnectorTerminationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutVoiceConnectorTermination{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutVoiceConnectorTermination{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutVoiceConnectorTermination"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutVoiceConnectorTerminationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutVoiceConnectorTermination(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutVoiceConnectorTermination(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutVoiceConnectorTermination", - } -} diff --git a/service/chime/api_op_PutVoiceConnectorTerminationCredentials.go b/service/chime/api_op_PutVoiceConnectorTerminationCredentials.go deleted file mode 100644 index 8b6d1ada770..00000000000 --- a/service/chime/api_op_PutVoiceConnectorTerminationCredentials.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds termination SIP credentials for the specified Amazon Chime Voice Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [PutVoiceConnectorTerminationCredentials], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by PutVoiceConnectorTerminationCredentials in the Amazon -// Chime SDK Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [PutVoiceConnectorTerminationCredentials]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_PutVoiceConnectorTerminationCredentials.html -func (c *Client) PutVoiceConnectorTerminationCredentials(ctx context.Context, params *PutVoiceConnectorTerminationCredentialsInput, optFns ...func(*Options)) (*PutVoiceConnectorTerminationCredentialsOutput, error) { - if params == nil { - params = &PutVoiceConnectorTerminationCredentialsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "PutVoiceConnectorTerminationCredentials", params, optFns, c.addOperationPutVoiceConnectorTerminationCredentialsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*PutVoiceConnectorTerminationCredentialsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type PutVoiceConnectorTerminationCredentialsInput struct { - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - // The termination SIP credentials. - Credentials []types.Credential - - noSmithyDocumentSerde -} - -type PutVoiceConnectorTerminationCredentialsOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationPutVoiceConnectorTerminationCredentialsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpPutVoiceConnectorTerminationCredentials{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutVoiceConnectorTerminationCredentials{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "PutVoiceConnectorTerminationCredentials"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpPutVoiceConnectorTerminationCredentialsValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutVoiceConnectorTerminationCredentials(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opPutVoiceConnectorTerminationCredentials(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "PutVoiceConnectorTerminationCredentials", - } -} diff --git a/service/chime/api_op_RedactChannelMessage.go b/service/chime/api_op_RedactChannelMessage.go deleted file mode 100644 index 7c566373062..00000000000 --- a/service/chime/api_op_RedactChannelMessage.go +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Redacts message content, but not metadata. The message exists in the back end, -// but the action returns null content, and the state shows as redacted. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [RedactChannelMessage], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by RedactChannelMessage in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [RedactChannelMessage]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_RedactChannelMessage.html -func (c *Client) RedactChannelMessage(ctx context.Context, params *RedactChannelMessageInput, optFns ...func(*Options)) (*RedactChannelMessageOutput, error) { - if params == nil { - params = &RedactChannelMessageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "RedactChannelMessage", params, optFns, c.addOperationRedactChannelMessageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*RedactChannelMessageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type RedactChannelMessageInput struct { - - // The ARN of the channel containing the messages that you want to redact. - // - // This member is required. - ChannelArn *string - - // The ID of the message being redacted. - // - // This member is required. - MessageId *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type RedactChannelMessageOutput struct { - - // The ARN of the channel containing the messages that you want to redact. - ChannelArn *string - - // The ID of the message being redacted. - MessageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationRedactChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpRedactChannelMessage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRedactChannelMessage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "RedactChannelMessage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opRedactChannelMessageMiddleware(stack); err != nil { - return err - } - if err = addOpRedactChannelMessageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRedactChannelMessage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opRedactChannelMessageMiddleware struct { -} - -func (*endpointPrefix_opRedactChannelMessageMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opRedactChannelMessageMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opRedactChannelMessageMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opRedactChannelMessageMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opRedactChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "RedactChannelMessage", - } -} diff --git a/service/chime/api_op_SendChannelMessage.go b/service/chime/api_op_SendChannelMessage.go deleted file mode 100644 index 444ec99e6cf..00000000000 --- a/service/chime/api_op_SendChannelMessage.go +++ /dev/null @@ -1,271 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Sends a message to a particular channel that the member is a part of. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// Also, STANDARD messages can contain 4KB of data and the 1KB of metadata. CONTROL -// messages can contain 30 bytes of data and no metadata. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [SendChannelMessage], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by SendChannelMessage in the Amazon Chime SDK Messaging -// Namespace -// -// [SendChannelMessage]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_SendChannelMessage.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) SendChannelMessage(ctx context.Context, params *SendChannelMessageInput, optFns ...func(*Options)) (*SendChannelMessageOutput, error) { - if params == nil { - params = &SendChannelMessageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "SendChannelMessage", params, optFns, c.addOperationSendChannelMessageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*SendChannelMessageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type SendChannelMessageInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The Idempotency token for each client request. - // - // This member is required. - ClientRequestToken *string - - // The content of the message. - // - // This member is required. - Content *string - - // Boolean that controls whether the message is persisted on the back end. - // Required. - // - // This member is required. - Persistence types.ChannelMessagePersistenceType - - // The type of message, STANDARD or CONTROL . - // - // This member is required. - Type types.ChannelMessageType - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The optional metadata for each message. - Metadata *string - - noSmithyDocumentSerde -} - -type SendChannelMessageOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // The ID string assigned to each message. - MessageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationSendChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpSendChannelMessage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpSendChannelMessage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "SendChannelMessage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opSendChannelMessageMiddleware(stack); err != nil { - return err - } - if err = addIdempotencyToken_opSendChannelMessageMiddleware(stack, options); err != nil { - return err - } - if err = addOpSendChannelMessageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opSendChannelMessage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opSendChannelMessageMiddleware struct { -} - -func (*endpointPrefix_opSendChannelMessageMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opSendChannelMessageMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opSendChannelMessageMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opSendChannelMessageMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -type idempotencyToken_initializeOpSendChannelMessage struct { - tokenProvider IdempotencyTokenProvider -} - -func (*idempotencyToken_initializeOpSendChannelMessage) ID() string { - return "OperationIdempotencyTokenAutoFill" -} - -func (m *idempotencyToken_initializeOpSendChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.tokenProvider == nil { - return next.HandleInitialize(ctx, in) - } - - input, ok := in.Parameters.(*SendChannelMessageInput) - if !ok { - return out, metadata, fmt.Errorf("expected middleware input to be of type *SendChannelMessageInput ") - } - - if input.ClientRequestToken == nil { - t, err := m.tokenProvider.GetIdempotencyToken() - if err != nil { - return out, metadata, err - } - input.ClientRequestToken = &t - } - return next.HandleInitialize(ctx, in) -} -func addIdempotencyToken_opSendChannelMessageMiddleware(stack *middleware.Stack, cfg Options) error { - return stack.Initialize.Add(&idempotencyToken_initializeOpSendChannelMessage{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) -} - -func newServiceMetadataMiddleware_opSendChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "SendChannelMessage", - } -} diff --git a/service/chime/api_op_StartMeetingTranscription.go b/service/chime/api_op_StartMeetingTranscription.go deleted file mode 100644 index b10cd9c74c8..00000000000 --- a/service/chime/api_op_StartMeetingTranscription.go +++ /dev/null @@ -1,184 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Starts transcription for the specified meetingId . For more information, refer -// to [Using Amazon Chime SDK live transcription]in the Amazon Chime SDK Developer Guide. -// -// If you specify an invalid configuration, a TranscriptFailed event will be sent -// with the contents of the BadRequestException generated by Amazon Transcribe. -// For more information on each parameter and which combinations are valid, refer -// to the [StartStreamTranscription]API in the Amazon Transcribe Developer Guide. -// -// Amazon Chime SDK live transcription is powered by Amazon Transcribe. Use of -// Amazon Transcribe is subject to the [AWS Service Terms], including the terms specific to the AWS -// Machine Learning and Artificial Intelligence Services. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [StartMeetingTranscription], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by StartMeetingTranscription in the Amazon Chime SDK -// Meetings Namespace -// -// [AWS Service Terms]: https://aws.amazon.com/service-terms/ -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [Using Amazon Chime SDK live transcription]: https://docs.aws.amazon.com/chime-sdk/latest/dg/meeting-transcription.html -// [StartMeetingTranscription]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_StartMeetingTranscription.html -// [StartStreamTranscription]: https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html -func (c *Client) StartMeetingTranscription(ctx context.Context, params *StartMeetingTranscriptionInput, optFns ...func(*Options)) (*StartMeetingTranscriptionOutput, error) { - if params == nil { - params = &StartMeetingTranscriptionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "StartMeetingTranscription", params, optFns, c.addOperationStartMeetingTranscriptionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*StartMeetingTranscriptionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type StartMeetingTranscriptionInput struct { - - // The unique ID of the meeting being transcribed. - // - // This member is required. - MeetingId *string - - // The configuration for the current transcription operation. Must contain - // EngineTranscribeSettings or EngineTranscribeMedicalSettings . - // - // This member is required. - TranscriptionConfiguration *types.TranscriptionConfiguration - - noSmithyDocumentSerde -} - -type StartMeetingTranscriptionOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationStartMeetingTranscriptionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpStartMeetingTranscription{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartMeetingTranscription{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "StartMeetingTranscription"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpStartMeetingTranscriptionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartMeetingTranscription(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opStartMeetingTranscription(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "StartMeetingTranscription", - } -} diff --git a/service/chime/api_op_TagAttendee.go b/service/chime/api_op_TagAttendee.go deleted file mode 100644 index 4205cdd9bb4..00000000000 --- a/service/chime/api_op_TagAttendee.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Applies the specified tags to the specified Amazon Chime attendee. -// -// TagAttendee is not supported in the Amazon Chime SDK Meetings Namespace. Update -// your application to remove calls to this API. -// -// Deprecated: Attendee Tags are not supported in the Amazon Chime SDK Meetings -// Namespace. Update your application to remove calls to this API. -func (c *Client) TagAttendee(ctx context.Context, params *TagAttendeeInput, optFns ...func(*Options)) (*TagAttendeeOutput, error) { - if params == nil { - params = &TagAttendeeInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TagAttendee", params, optFns, c.addOperationTagAttendeeMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TagAttendeeOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TagAttendeeInput struct { - - // The Amazon Chime SDK attendee ID. - // - // This member is required. - AttendeeId *string - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - // The tag key-value pairs. - // - // This member is required. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type TagAttendeeOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTagAttendeeMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpTagAttendee{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagAttendee{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TagAttendee"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpTagAttendeeValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagAttendee(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTagAttendee(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TagAttendee", - } -} diff --git a/service/chime/api_op_TagMeeting.go b/service/chime/api_op_TagMeeting.go deleted file mode 100644 index 232249e2924..00000000000 --- a/service/chime/api_op_TagMeeting.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Applies the specified tags to the specified Amazon Chime SDK meeting. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [TagResource], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Use TagResource in the Amazon Chime SDK Meetings Namespace. -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [TagResource]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_TagResource.html -func (c *Client) TagMeeting(ctx context.Context, params *TagMeetingInput, optFns ...func(*Options)) (*TagMeetingOutput, error) { - if params == nil { - params = &TagMeetingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TagMeeting", params, optFns, c.addOperationTagMeetingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TagMeetingOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TagMeetingInput struct { - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - // The tag key-value pairs. - // - // This member is required. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type TagMeetingOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTagMeetingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpTagMeeting{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagMeeting{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TagMeeting"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpTagMeetingValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagMeeting(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTagMeeting(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TagMeeting", - } -} diff --git a/service/chime/api_op_TagResource.go b/service/chime/api_op_TagResource.go deleted file mode 100644 index 0fb1f62b80a..00000000000 --- a/service/chime/api_op_TagResource.go +++ /dev/null @@ -1,171 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Applies the specified tags to the specified Amazon Chime SDK meeting resource. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [TagResource], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by TagResource in the Amazon Chime SDK Voice, Amazon Chime -// SDK Meetings, Amazon Chime SDK Identity, Amazon Chime SDK Messaging, and Amazon -// Chime SDK Media Pipelines Namespaces -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [TagResource]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_TagResource.html -func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { - if params == nil { - params = &TagResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TagResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TagResourceInput struct { - - // The resource ARN. - // - // This member is required. - ResourceARN *string - - // The tag key-value pairs. - // - // This member is required. - Tags []types.Tag - - noSmithyDocumentSerde -} - -type TagResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TagResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpTagResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TagResource", - } -} diff --git a/service/chime/api_op_UntagMeeting.go b/service/chime/api_op_UntagMeeting.go deleted file mode 100644 index 006837cf731..00000000000 --- a/service/chime/api_op_UntagMeeting.go +++ /dev/null @@ -1,168 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Untags the specified tags from the specified Amazon Chime SDK meeting. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UntagResource], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Use UntagResource in the Amazon Chime SDK Meetings Namespace. -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UntagResource]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_UntagResource.html -func (c *Client) UntagMeeting(ctx context.Context, params *UntagMeetingInput, optFns ...func(*Options)) (*UntagMeetingOutput, error) { - if params == nil { - params = &UntagMeetingInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UntagMeeting", params, optFns, c.addOperationUntagMeetingMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UntagMeetingOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UntagMeetingInput struct { - - // The Amazon Chime SDK meeting ID. - // - // This member is required. - MeetingId *string - - // The tag keys. - // - // This member is required. - TagKeys []string - - noSmithyDocumentSerde -} - -type UntagMeetingOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUntagMeetingMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagMeeting{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagMeeting{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UntagMeeting"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUntagMeetingValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagMeeting(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUntagMeeting(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UntagMeeting", - } -} diff --git a/service/chime/api_op_UntagResource.go b/service/chime/api_op_UntagResource.go deleted file mode 100644 index b4983f0fa00..00000000000 --- a/service/chime/api_op_UntagResource.go +++ /dev/null @@ -1,172 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Untags the specified tags from the specified Amazon Chime SDK meeting resource. -// -// Applies the specified tags to the specified Amazon Chime SDK meeting resource. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UntagResource], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UntagResource in the Amazon Chime SDK Voice, Amazon -// Chime SDK Meetings, Amazon Chime SDK Identity, Amazon Chime SDK Messaging, and -// Amazon Chime SDK Media Pipelines Namespaces -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UntagResource]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_UntagResource.html -func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { - if params == nil { - params = &UntagResourceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UntagResourceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UntagResourceInput struct { - - // The resource ARN. - // - // This member is required. - ResourceARN *string - - // The tag keys. - // - // This member is required. - TagKeys []string - - noSmithyDocumentSerde -} - -type UntagResourceOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UntagResource"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUntagResourceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UntagResource", - } -} diff --git a/service/chime/api_op_UpdateAppInstance.go b/service/chime/api_op_UpdateAppInstance.go deleted file mode 100644 index 67162712481..00000000000 --- a/service/chime/api_op_UpdateAppInstance.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates AppInstance metadata. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateAppInstance], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateAppInstance in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UpdateAppInstance]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_UpdateAppInstance.html -func (c *Client) UpdateAppInstance(ctx context.Context, params *UpdateAppInstanceInput, optFns ...func(*Options)) (*UpdateAppInstanceOutput, error) { - if params == nil { - params = &UpdateAppInstanceInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateAppInstance", params, optFns, c.addOperationUpdateAppInstanceMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateAppInstanceOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateAppInstanceInput struct { - - // The ARN of the AppInstance . - // - // This member is required. - AppInstanceArn *string - - // The name that you want to change. - // - // This member is required. - Name *string - - // The metadata that you want to change. - Metadata *string - - noSmithyDocumentSerde -} - -type UpdateAppInstanceOutput struct { - - // The ARN of the AppInstance . - AppInstanceArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateAppInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAppInstance{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAppInstance{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAppInstance"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opUpdateAppInstanceMiddleware(stack); err != nil { - return err - } - if err = addOpUpdateAppInstanceValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAppInstance(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opUpdateAppInstanceMiddleware struct { -} - -func (*endpointPrefix_opUpdateAppInstanceMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateAppInstanceMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opUpdateAppInstanceMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opUpdateAppInstanceMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opUpdateAppInstance(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateAppInstance", - } -} diff --git a/service/chime/api_op_UpdateAppInstanceUser.go b/service/chime/api_op_UpdateAppInstanceUser.go deleted file mode 100644 index 0a2a25404a7..00000000000 --- a/service/chime/api_op_UpdateAppInstanceUser.go +++ /dev/null @@ -1,206 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the details of an AppInstanceUser . You can update names and metadata. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateAppInstanceUser], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateAppInstanceUser in the Amazon Chime SDK Identity -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UpdateAppInstanceUser]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_identity-chime_UpdateAppInstanceUser.html -func (c *Client) UpdateAppInstanceUser(ctx context.Context, params *UpdateAppInstanceUserInput, optFns ...func(*Options)) (*UpdateAppInstanceUserOutput, error) { - if params == nil { - params = &UpdateAppInstanceUserInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateAppInstanceUser", params, optFns, c.addOperationUpdateAppInstanceUserMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateAppInstanceUserOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateAppInstanceUserInput struct { - - // The ARN of the AppInstanceUser . - // - // This member is required. - AppInstanceUserArn *string - - // The name of the AppInstanceUser . - // - // This member is required. - Name *string - - // The metadata of the AppInstanceUser . - Metadata *string - - noSmithyDocumentSerde -} - -type UpdateAppInstanceUserOutput struct { - - // The ARN of the AppInstanceUser . - AppInstanceUserArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateAppInstanceUserMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateAppInstanceUser{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateAppInstanceUser"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opUpdateAppInstanceUserMiddleware(stack); err != nil { - return err - } - if err = addOpUpdateAppInstanceUserValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateAppInstanceUser(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opUpdateAppInstanceUserMiddleware struct { -} - -func (*endpointPrefix_opUpdateAppInstanceUserMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateAppInstanceUserMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "identity-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opUpdateAppInstanceUserMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opUpdateAppInstanceUserMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opUpdateAppInstanceUser(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateAppInstanceUser", - } -} diff --git a/service/chime/api_op_UpdateChannel.go b/service/chime/api_op_UpdateChannel.go deleted file mode 100644 index 1fc36a1284d..00000000000 --- a/service/chime/api_op_UpdateChannel.go +++ /dev/null @@ -1,220 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Update a channel's attributes. -// -// Restriction: You can't change a channel's privacy. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateChannel], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateChannel in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UpdateChannel]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_UpdateChannel.html -func (c *Client) UpdateChannel(ctx context.Context, params *UpdateChannelInput, optFns ...func(*Options)) (*UpdateChannelOutput, error) { - if params == nil { - params = &UpdateChannelInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateChannel", params, optFns, c.addOperationUpdateChannelMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateChannelOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateChannelInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The mode of the update request. - // - // This member is required. - Mode types.ChannelMode - - // The name of the channel. - // - // This member is required. - Name *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The metadata for the update request. - Metadata *string - - noSmithyDocumentSerde -} - -type UpdateChannelOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateChannelMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannel{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannel{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateChannel"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opUpdateChannelMiddleware(stack); err != nil { - return err - } - if err = addOpUpdateChannelValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannel(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opUpdateChannelMiddleware struct { -} - -func (*endpointPrefix_opUpdateChannelMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateChannelMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opUpdateChannelMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opUpdateChannelMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opUpdateChannel(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateChannel", - } -} diff --git a/service/chime/api_op_UpdateChannelMessage.go b/service/chime/api_op_UpdateChannelMessage.go deleted file mode 100644 index 683fbf5674c..00000000000 --- a/service/chime/api_op_UpdateChannelMessage.go +++ /dev/null @@ -1,218 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the content of a message. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateChannelMessage], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateChannelMessage in the Amazon Chime SDK Messaging -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UpdateChannelMessage]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_UpdateChannelMessage.html -func (c *Client) UpdateChannelMessage(ctx context.Context, params *UpdateChannelMessageInput, optFns ...func(*Options)) (*UpdateChannelMessageOutput, error) { - if params == nil { - params = &UpdateChannelMessageInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateChannelMessage", params, optFns, c.addOperationUpdateChannelMessageMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateChannelMessageOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateChannelMessageInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The ID string of the message being updated. - // - // This member is required. - MessageId *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - // The content of the message being updated. - Content *string - - // The metadata of the message being updated. - Metadata *string - - noSmithyDocumentSerde -} - -type UpdateChannelMessageOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // The ID string of the message being updated. - MessageId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateChannelMessageMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannelMessage{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannelMessage{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateChannelMessage"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opUpdateChannelMessageMiddleware(stack); err != nil { - return err - } - if err = addOpUpdateChannelMessageValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannelMessage(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opUpdateChannelMessageMiddleware struct { -} - -func (*endpointPrefix_opUpdateChannelMessageMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateChannelMessageMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opUpdateChannelMessageMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opUpdateChannelMessageMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opUpdateChannelMessage(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateChannelMessage", - } -} diff --git a/service/chime/api_op_UpdateChannelReadMarker.go b/service/chime/api_op_UpdateChannelReadMarker.go deleted file mode 100644 index b0d0cfca1cd..00000000000 --- a/service/chime/api_op_UpdateChannelReadMarker.go +++ /dev/null @@ -1,204 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// The details of the time when a user last read messages in a channel. -// -// The x-amz-chime-bearer request header is mandatory. Use the AppInstanceUserArn -// of the user that makes the API call as the value in the header. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateChannelReadMarker], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateChannelReadMarker in the Amazon Chime SDK -// Messaging Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UpdateChannelReadMarker]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_messaging-chime_UpdateChannelReadMarker.html -func (c *Client) UpdateChannelReadMarker(ctx context.Context, params *UpdateChannelReadMarkerInput, optFns ...func(*Options)) (*UpdateChannelReadMarkerOutput, error) { - if params == nil { - params = &UpdateChannelReadMarkerInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateChannelReadMarker", params, optFns, c.addOperationUpdateChannelReadMarkerMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateChannelReadMarkerOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateChannelReadMarkerInput struct { - - // The ARN of the channel. - // - // This member is required. - ChannelArn *string - - // The AppInstanceUserArn of the user that makes the API call. - ChimeBearer *string - - noSmithyDocumentSerde -} - -type UpdateChannelReadMarkerOutput struct { - - // The ARN of the channel. - ChannelArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateChannelReadMarkerMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateChannelReadMarker{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateChannelReadMarker{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateChannelReadMarker"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addEndpointPrefix_opUpdateChannelReadMarkerMiddleware(stack); err != nil { - return err - } - if err = addOpUpdateChannelReadMarkerValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateChannelReadMarker(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -type endpointPrefix_opUpdateChannelReadMarkerMiddleware struct { -} - -func (*endpointPrefix_opUpdateChannelReadMarkerMiddleware) ID() string { - return "EndpointHostPrefix" -} - -func (m *endpointPrefix_opUpdateChannelReadMarkerMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if smithyhttp.GetHostnameImmutable(ctx) || smithyhttp.IsEndpointHostPrefixDisabled(ctx) { - return next.HandleFinalize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - req.URL.Host = "messaging-" + req.URL.Host - - return next.HandleFinalize(ctx, in) -} -func addEndpointPrefix_opUpdateChannelReadMarkerMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&endpointPrefix_opUpdateChannelReadMarkerMiddleware{}, "ResolveEndpointV2", middleware.After) -} - -func newServiceMetadataMiddleware_opUpdateChannelReadMarker(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateChannelReadMarker", - } -} diff --git a/service/chime/api_op_UpdateProxySession.go b/service/chime/api_op_UpdateProxySession.go deleted file mode 100644 index 724bfd3e42a..00000000000 --- a/service/chime/api_op_UpdateProxySession.go +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the specified proxy session details, such as voice or SMS capabilities. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateProxySession], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateProxySession in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UpdateProxySession]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_UpdateProxySession.html -func (c *Client) UpdateProxySession(ctx context.Context, params *UpdateProxySessionInput, optFns ...func(*Options)) (*UpdateProxySessionOutput, error) { - if params == nil { - params = &UpdateProxySessionInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateProxySession", params, optFns, c.addOperationUpdateProxySessionMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateProxySessionOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateProxySessionInput struct { - - // The proxy session capabilities. - // - // This member is required. - Capabilities []types.Capability - - // The proxy session ID. - // - // This member is required. - ProxySessionId *string - - // The Amazon Chime voice connector ID. - // - // This member is required. - VoiceConnectorId *string - - // The number of minutes allowed for the proxy session. - ExpiryMinutes *int32 - - noSmithyDocumentSerde -} - -type UpdateProxySessionOutput struct { - - // The proxy session details. - ProxySession *types.ProxySession - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateProxySessionMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateProxySession{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateProxySession{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateProxySession"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateProxySessionValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProxySession(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateProxySession(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateProxySession", - } -} diff --git a/service/chime/api_op_UpdateSipMediaApplication.go b/service/chime/api_op_UpdateSipMediaApplication.go deleted file mode 100644 index 64d470fffac..00000000000 --- a/service/chime/api_op_UpdateSipMediaApplication.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the details of the specified SIP media application. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateSipMediaApplication], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateSipMediaApplication in the Amazon Chime SDK Voice -// Namespace -// -// [UpdateSipMediaApplication]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_UpdateSipMediaApplication.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) UpdateSipMediaApplication(ctx context.Context, params *UpdateSipMediaApplicationInput, optFns ...func(*Options)) (*UpdateSipMediaApplicationOutput, error) { - if params == nil { - params = &UpdateSipMediaApplicationInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateSipMediaApplication", params, optFns, c.addOperationUpdateSipMediaApplicationMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateSipMediaApplicationOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateSipMediaApplicationInput struct { - - // The SIP media application ID. - // - // This member is required. - SipMediaApplicationId *string - - // The new set of endpoints for the specified SIP media application. - Endpoints []types.SipMediaApplicationEndpoint - - // The new name for the specified SIP media application. - Name *string - - noSmithyDocumentSerde -} - -type UpdateSipMediaApplicationOutput struct { - - // The updated SIP media application details. - SipMediaApplication *types.SipMediaApplication - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateSipMediaApplicationMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSipMediaApplication{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSipMediaApplication{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSipMediaApplication"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateSipMediaApplicationValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSipMediaApplication(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateSipMediaApplication(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateSipMediaApplication", - } -} diff --git a/service/chime/api_op_UpdateSipMediaApplicationCall.go b/service/chime/api_op_UpdateSipMediaApplicationCall.go deleted file mode 100644 index 4c6ef7af835..00000000000 --- a/service/chime/api_op_UpdateSipMediaApplicationCall.go +++ /dev/null @@ -1,182 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Invokes the AWS Lambda function associated with the SIP media application and -// transaction ID in an update request. The Lambda function can then return a new -// set of actions. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateSipMediaApplicationCall], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateSipMediaApplicationCall in the Amazon Chime SDK -// Voice Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UpdateSipMediaApplicationCall]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_UpdateSipMediaApplicationCall.html -func (c *Client) UpdateSipMediaApplicationCall(ctx context.Context, params *UpdateSipMediaApplicationCallInput, optFns ...func(*Options)) (*UpdateSipMediaApplicationCallOutput, error) { - if params == nil { - params = &UpdateSipMediaApplicationCallInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateSipMediaApplicationCall", params, optFns, c.addOperationUpdateSipMediaApplicationCallMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateSipMediaApplicationCallOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateSipMediaApplicationCallInput struct { - - // Arguments made available to the Lambda function as part of the - // CALL_UPDATE_REQUESTED event. Can contain 0-20 key-value pairs. - // - // This member is required. - Arguments map[string]string - - // The ID of the SIP media application handling the call. - // - // This member is required. - SipMediaApplicationId *string - - // The ID of the call transaction. - // - // This member is required. - TransactionId *string - - noSmithyDocumentSerde -} - -type UpdateSipMediaApplicationCallOutput struct { - - // A Call instance for a SIP media application. - SipMediaApplicationCall *types.SipMediaApplicationCall - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateSipMediaApplicationCallMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSipMediaApplicationCall{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSipMediaApplicationCall{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSipMediaApplicationCall"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateSipMediaApplicationCallValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSipMediaApplicationCall(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateSipMediaApplicationCall(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateSipMediaApplicationCall", - } -} diff --git a/service/chime/api_op_UpdateSipRule.go b/service/chime/api_op_UpdateSipRule.go deleted file mode 100644 index de0c125fe4c..00000000000 --- a/service/chime/api_op_UpdateSipRule.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates the details of the specified SIP rule. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateSipRule], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateSipRule in the Amazon Chime SDK Voice Namespace -// -// [UpdateSipRule]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_UpdateSipRule.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) UpdateSipRule(ctx context.Context, params *UpdateSipRuleInput, optFns ...func(*Options)) (*UpdateSipRuleOutput, error) { - if params == nil { - params = &UpdateSipRuleInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateSipRule", params, optFns, c.addOperationUpdateSipRuleMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateSipRuleOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateSipRuleInput struct { - - // The new name for the specified SIP rule. - // - // This member is required. - Name *string - - // The SIP rule ID. - // - // This member is required. - SipRuleId *string - - // The new value specified to indicate whether the rule is disabled. - Disabled *bool - - // The new value of the list of target applications. - TargetApplications []types.SipRuleTargetApplication - - noSmithyDocumentSerde -} - -type UpdateSipRuleOutput struct { - - // Updated SIP rule details. - SipRule *types.SipRule - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateSipRuleMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSipRule{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSipRule{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateSipRule"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateSipRuleValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSipRule(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateSipRule(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateSipRule", - } -} diff --git a/service/chime/api_op_UpdateVoiceConnector.go b/service/chime/api_op_UpdateVoiceConnector.go deleted file mode 100644 index a04ec2c5abf..00000000000 --- a/service/chime/api_op_UpdateVoiceConnector.go +++ /dev/null @@ -1,179 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates details for the specified Amazon Chime Voice Connector. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateVoiceConnector], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateVoiceConnector in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [UpdateVoiceConnector]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_UpdateVoiceConnector.html -func (c *Client) UpdateVoiceConnector(ctx context.Context, params *UpdateVoiceConnectorInput, optFns ...func(*Options)) (*UpdateVoiceConnectorOutput, error) { - if params == nil { - params = &UpdateVoiceConnectorInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateVoiceConnector", params, optFns, c.addOperationUpdateVoiceConnectorMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateVoiceConnectorOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateVoiceConnectorInput struct { - - // The name of the Amazon Chime Voice Connector. - // - // This member is required. - Name *string - - // When enabled, requires encryption for the Amazon Chime Voice Connector. - // - // This member is required. - RequireEncryption *bool - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -type UpdateVoiceConnectorOutput struct { - - // The updated Amazon Chime Voice Connector details. - VoiceConnector *types.VoiceConnector - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateVoiceConnectorMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateVoiceConnector{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateVoiceConnector{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateVoiceConnector"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateVoiceConnectorValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateVoiceConnector(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateVoiceConnector(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateVoiceConnector", - } -} diff --git a/service/chime/api_op_UpdateVoiceConnectorGroup.go b/service/chime/api_op_UpdateVoiceConnectorGroup.go deleted file mode 100644 index 774bf7a6863..00000000000 --- a/service/chime/api_op_UpdateVoiceConnectorGroup.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates details of the specified Amazon Chime Voice Connector group, such as -// the name and Amazon Chime Voice Connector priority ranking. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [UpdateVoiceConnectorGroup], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by UpdateVoiceConnectorGroup in the Amazon Chime SDK Voice -// Namespace -// -// [UpdateVoiceConnectorGroup]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_UpdateVoiceConnectorGroup.html -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -func (c *Client) UpdateVoiceConnectorGroup(ctx context.Context, params *UpdateVoiceConnectorGroupInput, optFns ...func(*Options)) (*UpdateVoiceConnectorGroupOutput, error) { - if params == nil { - params = &UpdateVoiceConnectorGroupInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateVoiceConnectorGroup", params, optFns, c.addOperationUpdateVoiceConnectorGroupMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateVoiceConnectorGroupOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateVoiceConnectorGroupInput struct { - - // The name of the Amazon Chime Voice Connector group. - // - // This member is required. - Name *string - - // The Amazon Chime Voice Connector group ID. - // - // This member is required. - VoiceConnectorGroupId *string - - // The VoiceConnectorItems to associate with the group. - // - // This member is required. - VoiceConnectorItems []types.VoiceConnectorItem - - noSmithyDocumentSerde -} - -type UpdateVoiceConnectorGroupOutput struct { - - // The updated Amazon Chime Voice Connector group details. - VoiceConnectorGroup *types.VoiceConnectorGroup - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateVoiceConnectorGroupMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateVoiceConnectorGroup{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateVoiceConnectorGroup"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateVoiceConnectorGroupValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateVoiceConnectorGroup(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateVoiceConnectorGroup(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateVoiceConnectorGroup", - } -} diff --git a/service/chime/api_op_ValidateE911Address.go b/service/chime/api_op_ValidateE911Address.go deleted file mode 100644 index 41d466e7548..00000000000 --- a/service/chime/api_op_ValidateE911Address.go +++ /dev/null @@ -1,213 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package chime - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/chime/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Validates an address to be used for 911 calls made with Amazon Chime Voice -// Connectors. You can use validated addresses in a Presence Information Data -// Format Location Object file that you include in SIP requests. That helps ensure -// that addresses are routed to the appropriate Public Safety Answering Point. -// -// This API is is no longer supported and will not be updated. We recommend using -// the latest version, [ValidateE911Address], in the Amazon Chime SDK. -// -// Using the latest version requires migrating to a dedicated namespace. For more -// information, refer to [Migrating from the Amazon Chime namespace]in the Amazon Chime SDK Developer Guide. -// -// Deprecated: Replaced by ValidateE911Address in the Amazon Chime SDK Voice -// Namespace -// -// [Migrating from the Amazon Chime namespace]: https://docs.aws.amazon.com/chime-sdk/latest/dg/migrate-from-chm-namespace.html -// [ValidateE911Address]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_voice-chime_ValidateE911Address.html -func (c *Client) ValidateE911Address(ctx context.Context, params *ValidateE911AddressInput, optFns ...func(*Options)) (*ValidateE911AddressOutput, error) { - if params == nil { - params = &ValidateE911AddressInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ValidateE911Address", params, optFns, c.addOperationValidateE911AddressMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ValidateE911AddressOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ValidateE911AddressInput struct { - - // The AWS account ID. - // - // This member is required. - AwsAccountId *string - - // The address city, such as Portland . - // - // This member is required. - City *string - - // The address country, such as US . - // - // This member is required. - Country *string - - // The address postal code, such as 04352 . - // - // This member is required. - PostalCode *string - - // The address state, such as ME . - // - // This member is required. - State *string - - // The address street information, such as 8th Avenue . - // - // This member is required. - StreetInfo *string - - // The address street number, such as 200 or 2121 . - // - // This member is required. - StreetNumber *string - - noSmithyDocumentSerde -} - -type ValidateE911AddressOutput struct { - - // The validated address. - Address *types.Address - - // The ID that represents the address. - AddressExternalId *string - - // The list of address suggestions. - CandidateAddressList []types.CandidateAddress - - // Number indicating the result of address validation. 0 means the address was - // perfect as is and successfully validated. 1 means the address was corrected. 2 - // means the address sent was not close enough and was not validated. - ValidationResult int32 - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationValidateE911AddressMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsRestjson1_serializeOpValidateE911Address{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsRestjson1_deserializeOpValidateE911Address{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ValidateE911Address"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addSpanRetryLoop(stack, options); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpValidateE911AddressValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opValidateE911Address(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - if err = addSpanInitializeStart(stack); err != nil { - return err - } - if err = addSpanInitializeEnd(stack); err != nil { - return err - } - if err = addSpanBuildRequestStart(stack); err != nil { - return err - } - if err = addSpanBuildRequestEnd(stack); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opValidateE911Address(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ValidateE911Address", - } -} diff --git a/service/chime/deserializers.go b/service/chime/deserializers.go index 4c8ca2b8693..e7c1520da2b 100644 --- a/service/chime/deserializers.go +++ b/service/chime/deserializers.go @@ -30,14 +30,14 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } -type awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnector struct { +type awsRestjson1_deserializeOpAssociatePhoneNumberWithUser struct { } -func (*awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnector) ID() string { +func (*awsRestjson1_deserializeOpAssociatePhoneNumberWithUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociatePhoneNumberWithUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -55,44 +55,16 @@ func (m *awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnector) Hand } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociatePhoneNumbersWithVoiceConnector(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociatePhoneNumberWithUser(response, &metadata) } - output := &AssociatePhoneNumbersWithVoiceConnectorOutput{} + output := &AssociatePhoneNumberWithUserOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentAssociatePhoneNumbersWithVoiceConnectorOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociatePhoneNumbersWithVoiceConnector(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociatePhoneNumberWithUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -167,50 +139,14 @@ func awsRestjson1_deserializeOpErrorAssociatePhoneNumbersWithVoiceConnector(resp } } -func awsRestjson1_deserializeOpDocumentAssociatePhoneNumbersWithVoiceConnectorOutput(v **AssociatePhoneNumbersWithVoiceConnectorOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *AssociatePhoneNumbersWithVoiceConnectorOutput - if *v == nil { - sv = &AssociatePhoneNumbersWithVoiceConnectorOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumberErrors": - if err := awsRestjson1_deserializeDocumentPhoneNumberErrorList(&sv.PhoneNumberErrors, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnectorGroup struct { +type awsRestjson1_deserializeOpAssociateSigninDelegateGroupsWithAccount struct { } -func (*awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnectorGroup) ID() string { +func (*awsRestjson1_deserializeOpAssociateSigninDelegateGroupsWithAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnectorGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAssociateSigninDelegateGroupsWithAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -228,44 +164,16 @@ func (m *awsRestjson1_deserializeOpAssociatePhoneNumbersWithVoiceConnectorGroup) } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociatePhoneNumbersWithVoiceConnectorGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAssociateSigninDelegateGroupsWithAccount(response, &metadata) } - output := &AssociatePhoneNumbersWithVoiceConnectorGroupOutput{} + output := &AssociateSigninDelegateGroupsWithAccountOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentAssociatePhoneNumbersWithVoiceConnectorGroupOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociatePhoneNumbersWithVoiceConnectorGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAssociateSigninDelegateGroupsWithAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -306,9 +214,6 @@ func awsRestjson1_deserializeOpErrorAssociatePhoneNumbersWithVoiceConnectorGroup } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -340,50 +245,14 @@ func awsRestjson1_deserializeOpErrorAssociatePhoneNumbersWithVoiceConnectorGroup } } -func awsRestjson1_deserializeOpDocumentAssociatePhoneNumbersWithVoiceConnectorGroupOutput(v **AssociatePhoneNumbersWithVoiceConnectorGroupOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *AssociatePhoneNumbersWithVoiceConnectorGroupOutput - if *v == nil { - sv = &AssociatePhoneNumbersWithVoiceConnectorGroupOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumberErrors": - if err := awsRestjson1_deserializeDocumentPhoneNumberErrorList(&sv.PhoneNumberErrors, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpAssociatePhoneNumberWithUser struct { +type awsRestjson1_deserializeOpBatchCreateRoomMembership struct { } -func (*awsRestjson1_deserializeOpAssociatePhoneNumberWithUser) ID() string { +func (*awsRestjson1_deserializeOpBatchCreateRoomMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociatePhoneNumberWithUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpBatchCreateRoomMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -401,16 +270,44 @@ func (m *awsRestjson1_deserializeOpAssociatePhoneNumberWithUser) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociatePhoneNumberWithUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorBatchCreateRoomMembership(response, &metadata) } - output := &AssociatePhoneNumberWithUserOutput{} + output := &BatchCreateRoomMembershipOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentBatchCreateRoomMembershipOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociatePhoneNumberWithUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorBatchCreateRoomMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -451,9 +348,6 @@ func awsRestjson1_deserializeOpErrorAssociatePhoneNumberWithUser(response *smith } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -485,14 +379,50 @@ func awsRestjson1_deserializeOpErrorAssociatePhoneNumberWithUser(response *smith } } -type awsRestjson1_deserializeOpAssociateSigninDelegateGroupsWithAccount struct { +func awsRestjson1_deserializeOpDocumentBatchCreateRoomMembershipOutput(v **BatchCreateRoomMembershipOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchCreateRoomMembershipOutput + if *v == nil { + sv = &BatchCreateRoomMembershipOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Errors": + if err := awsRestjson1_deserializeDocumentMemberErrorList(&sv.Errors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpAssociateSigninDelegateGroupsWithAccount) ID() string { +type awsRestjson1_deserializeOpBatchDeletePhoneNumber struct { +} + +func (*awsRestjson1_deserializeOpBatchDeletePhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAssociateSigninDelegateGroupsWithAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpBatchDeletePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -510,16 +440,44 @@ func (m *awsRestjson1_deserializeOpAssociateSigninDelegateGroupsWithAccount) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAssociateSigninDelegateGroupsWithAccount(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorBatchDeletePhoneNumber(response, &metadata) } - output := &AssociateSigninDelegateGroupsWithAccountOutput{} + output := &BatchDeletePhoneNumberOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentBatchDeletePhoneNumberOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorAssociateSigninDelegateGroupsWithAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorBatchDeletePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -591,14 +549,50 @@ func awsRestjson1_deserializeOpErrorAssociateSigninDelegateGroupsWithAccount(res } } -type awsRestjson1_deserializeOpBatchCreateAttendee struct { -} - -func (*awsRestjson1_deserializeOpBatchCreateAttendee) ID() string { +func awsRestjson1_deserializeOpDocumentBatchDeletePhoneNumberOutput(v **BatchDeletePhoneNumberOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *BatchDeletePhoneNumberOutput + if *v == nil { + sv = &BatchDeletePhoneNumberOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PhoneNumberErrors": + if err := awsRestjson1_deserializeDocumentPhoneNumberErrorList(&sv.PhoneNumberErrors, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpBatchSuspendUser struct { +} + +func (*awsRestjson1_deserializeOpBatchSuspendUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpBatchCreateAttendee) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpBatchSuspendUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -616,9 +610,9 @@ func (m *awsRestjson1_deserializeOpBatchCreateAttendee) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorBatchCreateAttendee(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorBatchSuspendUser(response, &metadata) } - output := &BatchCreateAttendeeOutput{} + output := &BatchSuspendUserOutput{} out.Result = output var buff [1024]byte @@ -639,7 +633,7 @@ func (m *awsRestjson1_deserializeOpBatchCreateAttendee) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentBatchCreateAttendeeOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentBatchSuspendUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -653,7 +647,7 @@ func (m *awsRestjson1_deserializeOpBatchCreateAttendee) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorBatchCreateAttendee(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorBatchSuspendUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -703,9 +697,6 @@ func awsRestjson1_deserializeOpErrorBatchCreateAttendee(response *smithyhttp.Res case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -728,7 +719,7 @@ func awsRestjson1_deserializeOpErrorBatchCreateAttendee(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentBatchCreateAttendeeOutput(v **BatchCreateAttendeeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentBatchSuspendUserOutput(v **BatchSuspendUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -741,22 +732,17 @@ func awsRestjson1_deserializeOpDocumentBatchCreateAttendeeOutput(v **BatchCreate return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchCreateAttendeeOutput + var sv *BatchSuspendUserOutput if *v == nil { - sv = &BatchCreateAttendeeOutput{} + sv = &BatchSuspendUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Attendees": - if err := awsRestjson1_deserializeDocumentAttendeeList(&sv.Attendees, value); err != nil { - return err - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentBatchCreateAttendeeErrorList(&sv.Errors, value); err != nil { + case "UserErrors": + if err := awsRestjson1_deserializeDocumentUserErrorList(&sv.UserErrors, value); err != nil { return err } @@ -769,14 +755,14 @@ func awsRestjson1_deserializeOpDocumentBatchCreateAttendeeOutput(v **BatchCreate return nil } -type awsRestjson1_deserializeOpBatchCreateChannelMembership struct { +type awsRestjson1_deserializeOpBatchUnsuspendUser struct { } -func (*awsRestjson1_deserializeOpBatchCreateChannelMembership) ID() string { +func (*awsRestjson1_deserializeOpBatchUnsuspendUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpBatchCreateChannelMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpBatchUnsuspendUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -794,9 +780,9 @@ func (m *awsRestjson1_deserializeOpBatchCreateChannelMembership) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorBatchCreateChannelMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorBatchUnsuspendUser(response, &metadata) } - output := &BatchCreateChannelMembershipOutput{} + output := &BatchUnsuspendUserOutput{} out.Result = output var buff [1024]byte @@ -817,7 +803,7 @@ func (m *awsRestjson1_deserializeOpBatchCreateChannelMembership) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentBatchCreateChannelMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentBatchUnsuspendUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -831,7 +817,7 @@ func (m *awsRestjson1_deserializeOpBatchCreateChannelMembership) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorBatchCreateChannelMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorBatchUnsuspendUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -878,6 +864,9 @@ func awsRestjson1_deserializeOpErrorBatchCreateChannelMembership(response *smith case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -900,7 +889,7 @@ func awsRestjson1_deserializeOpErrorBatchCreateChannelMembership(response *smith } } -func awsRestjson1_deserializeOpDocumentBatchCreateChannelMembershipOutput(v **BatchCreateChannelMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentBatchUnsuspendUserOutput(v **BatchUnsuspendUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -913,22 +902,17 @@ func awsRestjson1_deserializeOpDocumentBatchCreateChannelMembershipOutput(v **Ba return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchCreateChannelMembershipOutput + var sv *BatchUnsuspendUserOutput if *v == nil { - sv = &BatchCreateChannelMembershipOutput{} + sv = &BatchUnsuspendUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "BatchChannelMemberships": - if err := awsRestjson1_deserializeDocumentBatchChannelMemberships(&sv.BatchChannelMemberships, value); err != nil { - return err - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentBatchCreateChannelMembershipErrors(&sv.Errors, value); err != nil { + case "UserErrors": + if err := awsRestjson1_deserializeDocumentUserErrorList(&sv.UserErrors, value); err != nil { return err } @@ -941,14 +925,14 @@ func awsRestjson1_deserializeOpDocumentBatchCreateChannelMembershipOutput(v **Ba return nil } -type awsRestjson1_deserializeOpBatchCreateRoomMembership struct { +type awsRestjson1_deserializeOpBatchUpdatePhoneNumber struct { } -func (*awsRestjson1_deserializeOpBatchCreateRoomMembership) ID() string { +func (*awsRestjson1_deserializeOpBatchUpdatePhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpBatchCreateRoomMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpBatchUpdatePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -966,9 +950,9 @@ func (m *awsRestjson1_deserializeOpBatchCreateRoomMembership) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorBatchCreateRoomMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorBatchUpdatePhoneNumber(response, &metadata) } - output := &BatchCreateRoomMembershipOutput{} + output := &BatchUpdatePhoneNumberOutput{} out.Result = output var buff [1024]byte @@ -989,7 +973,7 @@ func (m *awsRestjson1_deserializeOpBatchCreateRoomMembership) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentBatchCreateRoomMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentBatchUpdatePhoneNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1003,7 +987,7 @@ func (m *awsRestjson1_deserializeOpBatchCreateRoomMembership) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorBatchCreateRoomMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorBatchUpdatePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1075,7 +1059,7 @@ func awsRestjson1_deserializeOpErrorBatchCreateRoomMembership(response *smithyht } } -func awsRestjson1_deserializeOpDocumentBatchCreateRoomMembershipOutput(v **BatchCreateRoomMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentBatchUpdatePhoneNumberOutput(v **BatchUpdatePhoneNumberOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1088,17 +1072,17 @@ func awsRestjson1_deserializeOpDocumentBatchCreateRoomMembershipOutput(v **Batch return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchCreateRoomMembershipOutput + var sv *BatchUpdatePhoneNumberOutput if *v == nil { - sv = &BatchCreateRoomMembershipOutput{} + sv = &BatchUpdatePhoneNumberOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Errors": - if err := awsRestjson1_deserializeDocumentMemberErrorList(&sv.Errors, value); err != nil { + case "PhoneNumberErrors": + if err := awsRestjson1_deserializeDocumentPhoneNumberErrorList(&sv.PhoneNumberErrors, value); err != nil { return err } @@ -1111,14 +1095,14 @@ func awsRestjson1_deserializeOpDocumentBatchCreateRoomMembershipOutput(v **Batch return nil } -type awsRestjson1_deserializeOpBatchDeletePhoneNumber struct { +type awsRestjson1_deserializeOpBatchUpdateUser struct { } -func (*awsRestjson1_deserializeOpBatchDeletePhoneNumber) ID() string { +func (*awsRestjson1_deserializeOpBatchUpdateUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpBatchDeletePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpBatchUpdateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1136,9 +1120,9 @@ func (m *awsRestjson1_deserializeOpBatchDeletePhoneNumber) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorBatchDeletePhoneNumber(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorBatchUpdateUser(response, &metadata) } - output := &BatchDeletePhoneNumberOutput{} + output := &BatchUpdateUserOutput{} out.Result = output var buff [1024]byte @@ -1159,7 +1143,7 @@ func (m *awsRestjson1_deserializeOpBatchDeletePhoneNumber) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentBatchDeletePhoneNumberOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentBatchUpdateUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1173,7 +1157,7 @@ func (m *awsRestjson1_deserializeOpBatchDeletePhoneNumber) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorBatchDeletePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorBatchUpdateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1245,7 +1229,7 @@ func awsRestjson1_deserializeOpErrorBatchDeletePhoneNumber(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentBatchDeletePhoneNumberOutput(v **BatchDeletePhoneNumberOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentBatchUpdateUserOutput(v **BatchUpdateUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1258,17 +1242,17 @@ func awsRestjson1_deserializeOpDocumentBatchDeletePhoneNumberOutput(v **BatchDel return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchDeletePhoneNumberOutput + var sv *BatchUpdateUserOutput if *v == nil { - sv = &BatchDeletePhoneNumberOutput{} + sv = &BatchUpdateUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "PhoneNumberErrors": - if err := awsRestjson1_deserializeDocumentPhoneNumberErrorList(&sv.PhoneNumberErrors, value); err != nil { + case "UserErrors": + if err := awsRestjson1_deserializeDocumentUserErrorList(&sv.UserErrors, value); err != nil { return err } @@ -1281,14 +1265,14 @@ func awsRestjson1_deserializeOpDocumentBatchDeletePhoneNumberOutput(v **BatchDel return nil } -type awsRestjson1_deserializeOpBatchSuspendUser struct { +type awsRestjson1_deserializeOpCreateAccount struct { } -func (*awsRestjson1_deserializeOpBatchSuspendUser) ID() string { +func (*awsRestjson1_deserializeOpCreateAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpBatchSuspendUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1306,9 +1290,9 @@ func (m *awsRestjson1_deserializeOpBatchSuspendUser) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorBatchSuspendUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateAccount(response, &metadata) } - output := &BatchSuspendUserOutput{} + output := &CreateAccountOutput{} out.Result = output var buff [1024]byte @@ -1329,7 +1313,7 @@ func (m *awsRestjson1_deserializeOpBatchSuspendUser) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentBatchSuspendUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateAccountOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1343,7 +1327,7 @@ func (m *awsRestjson1_deserializeOpBatchSuspendUser) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorBatchSuspendUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1415,7 +1399,7 @@ func awsRestjson1_deserializeOpErrorBatchSuspendUser(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentBatchSuspendUserOutput(v **BatchSuspendUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateAccountOutput(v **CreateAccountOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1428,17 +1412,17 @@ func awsRestjson1_deserializeOpDocumentBatchSuspendUserOutput(v **BatchSuspendUs return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchSuspendUserOutput + var sv *CreateAccountOutput if *v == nil { - sv = &BatchSuspendUserOutput{} + sv = &CreateAccountOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "UserErrors": - if err := awsRestjson1_deserializeDocumentUserErrorList(&sv.UserErrors, value); err != nil { + case "Account": + if err := awsRestjson1_deserializeDocumentAccount(&sv.Account, value); err != nil { return err } @@ -1451,14 +1435,14 @@ func awsRestjson1_deserializeOpDocumentBatchSuspendUserOutput(v **BatchSuspendUs return nil } -type awsRestjson1_deserializeOpBatchUnsuspendUser struct { +type awsRestjson1_deserializeOpCreateBot struct { } -func (*awsRestjson1_deserializeOpBatchUnsuspendUser) ID() string { +func (*awsRestjson1_deserializeOpCreateBot) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpBatchUnsuspendUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateBot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1476,9 +1460,9 @@ func (m *awsRestjson1_deserializeOpBatchUnsuspendUser) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorBatchUnsuspendUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateBot(response, &metadata) } - output := &BatchUnsuspendUserOutput{} + output := &CreateBotOutput{} out.Result = output var buff [1024]byte @@ -1499,7 +1483,7 @@ func (m *awsRestjson1_deserializeOpBatchUnsuspendUser) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentBatchUnsuspendUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateBotOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1513,7 +1497,7 @@ func (m *awsRestjson1_deserializeOpBatchUnsuspendUser) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorBatchUnsuspendUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateBot(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1563,6 +1547,9 @@ func awsRestjson1_deserializeOpErrorBatchUnsuspendUser(response *smithyhttp.Resp case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -1585,7 +1572,7 @@ func awsRestjson1_deserializeOpErrorBatchUnsuspendUser(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentBatchUnsuspendUserOutput(v **BatchUnsuspendUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateBotOutput(v **CreateBotOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1598,17 +1585,17 @@ func awsRestjson1_deserializeOpDocumentBatchUnsuspendUserOutput(v **BatchUnsuspe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchUnsuspendUserOutput + var sv *CreateBotOutput if *v == nil { - sv = &BatchUnsuspendUserOutput{} + sv = &CreateBotOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "UserErrors": - if err := awsRestjson1_deserializeDocumentUserErrorList(&sv.UserErrors, value); err != nil { + case "Bot": + if err := awsRestjson1_deserializeDocumentBot(&sv.Bot, value); err != nil { return err } @@ -1621,14 +1608,14 @@ func awsRestjson1_deserializeOpDocumentBatchUnsuspendUserOutput(v **BatchUnsuspe return nil } -type awsRestjson1_deserializeOpBatchUpdatePhoneNumber struct { +type awsRestjson1_deserializeOpCreateMeetingDialOut struct { } -func (*awsRestjson1_deserializeOpBatchUpdatePhoneNumber) ID() string { +func (*awsRestjson1_deserializeOpCreateMeetingDialOut) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpBatchUpdatePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateMeetingDialOut) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1646,9 +1633,9 @@ func (m *awsRestjson1_deserializeOpBatchUpdatePhoneNumber) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorBatchUpdatePhoneNumber(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateMeetingDialOut(response, &metadata) } - output := &BatchUpdatePhoneNumberOutput{} + output := &CreateMeetingDialOutOutput{} out.Result = output var buff [1024]byte @@ -1669,7 +1656,7 @@ func (m *awsRestjson1_deserializeOpBatchUpdatePhoneNumber) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentBatchUpdatePhoneNumberOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateMeetingDialOutOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1683,7 +1670,7 @@ func (m *awsRestjson1_deserializeOpBatchUpdatePhoneNumber) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorBatchUpdatePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateMeetingDialOut(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1724,14 +1711,17 @@ func awsRestjson1_deserializeOpErrorBatchUpdatePhoneNumber(response *smithyhttp. } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -1755,7 +1745,7 @@ func awsRestjson1_deserializeOpErrorBatchUpdatePhoneNumber(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentBatchUpdatePhoneNumberOutput(v **BatchUpdatePhoneNumberOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateMeetingDialOutOutput(v **CreateMeetingDialOutOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1768,18 +1758,22 @@ func awsRestjson1_deserializeOpDocumentBatchUpdatePhoneNumberOutput(v **BatchUpd return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchUpdatePhoneNumberOutput + var sv *CreateMeetingDialOutOutput if *v == nil { - sv = &BatchUpdatePhoneNumberOutput{} + sv = &CreateMeetingDialOutOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "PhoneNumberErrors": - if err := awsRestjson1_deserializeDocumentPhoneNumberErrorList(&sv.PhoneNumberErrors, value); err != nil { - return err + case "TransactionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) + } + sv.TransactionId = ptr.String(jtv) } default: @@ -1791,14 +1785,14 @@ func awsRestjson1_deserializeOpDocumentBatchUpdatePhoneNumberOutput(v **BatchUpd return nil } -type awsRestjson1_deserializeOpBatchUpdateUser struct { +type awsRestjson1_deserializeOpCreatePhoneNumberOrder struct { } -func (*awsRestjson1_deserializeOpBatchUpdateUser) ID() string { +func (*awsRestjson1_deserializeOpCreatePhoneNumberOrder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpBatchUpdateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreatePhoneNumberOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1816,9 +1810,9 @@ func (m *awsRestjson1_deserializeOpBatchUpdateUser) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorBatchUpdateUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreatePhoneNumberOrder(response, &metadata) } - output := &BatchUpdateUserOutput{} + output := &CreatePhoneNumberOrderOutput{} out.Result = output var buff [1024]byte @@ -1839,7 +1833,7 @@ func (m *awsRestjson1_deserializeOpBatchUpdateUser) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentBatchUpdateUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreatePhoneNumberOrderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1853,7 +1847,7 @@ func (m *awsRestjson1_deserializeOpBatchUpdateUser) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorBatchUpdateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreatePhoneNumberOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1894,14 +1888,17 @@ func awsRestjson1_deserializeOpErrorBatchUpdateUser(response *smithyhttp.Respons } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -1925,7 +1922,7 @@ func awsRestjson1_deserializeOpErrorBatchUpdateUser(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentBatchUpdateUserOutput(v **BatchUpdateUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreatePhoneNumberOrderOutput(v **CreatePhoneNumberOrderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1938,17 +1935,17 @@ func awsRestjson1_deserializeOpDocumentBatchUpdateUserOutput(v **BatchUpdateUser return fmt.Errorf("unexpected JSON type %v", value) } - var sv *BatchUpdateUserOutput + var sv *CreatePhoneNumberOrderOutput if *v == nil { - sv = &BatchUpdateUserOutput{} + sv = &CreatePhoneNumberOrderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "UserErrors": - if err := awsRestjson1_deserializeDocumentUserErrorList(&sv.UserErrors, value); err != nil { + case "PhoneNumberOrder": + if err := awsRestjson1_deserializeDocumentPhoneNumberOrder(&sv.PhoneNumberOrder, value); err != nil { return err } @@ -1961,14 +1958,14 @@ func awsRestjson1_deserializeOpDocumentBatchUpdateUserOutput(v **BatchUpdateUser return nil } -type awsRestjson1_deserializeOpCreateAccount struct { +type awsRestjson1_deserializeOpCreateRoom struct { } -func (*awsRestjson1_deserializeOpCreateAccount) ID() string { +func (*awsRestjson1_deserializeOpCreateRoom) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1986,9 +1983,9 @@ func (m *awsRestjson1_deserializeOpCreateAccount) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateAccount(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateRoom(response, &metadata) } - output := &CreateAccountOutput{} + output := &CreateRoomOutput{} out.Result = output var buff [1024]byte @@ -2009,7 +2006,7 @@ func (m *awsRestjson1_deserializeOpCreateAccount) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateAccountOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateRoomOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2023,7 +2020,7 @@ func (m *awsRestjson1_deserializeOpCreateAccount) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2073,6 +2070,9 @@ func awsRestjson1_deserializeOpErrorCreateAccount(response *smithyhttp.Response, case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -2095,7 +2095,7 @@ func awsRestjson1_deserializeOpErrorCreateAccount(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreateAccountOutput(v **CreateAccountOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2108,17 +2108,17 @@ func awsRestjson1_deserializeOpDocumentCreateAccountOutput(v **CreateAccountOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateAccountOutput + var sv *CreateRoomOutput if *v == nil { - sv = &CreateAccountOutput{} + sv = &CreateRoomOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Account": - if err := awsRestjson1_deserializeDocumentAccount(&sv.Account, value); err != nil { + case "Room": + if err := awsRestjson1_deserializeDocumentRoom(&sv.Room, value); err != nil { return err } @@ -2131,14 +2131,14 @@ func awsRestjson1_deserializeOpDocumentCreateAccountOutput(v **CreateAccountOutp return nil } -type awsRestjson1_deserializeOpCreateAppInstance struct { +type awsRestjson1_deserializeOpCreateRoomMembership struct { } -func (*awsRestjson1_deserializeOpCreateAppInstance) ID() string { +func (*awsRestjson1_deserializeOpCreateRoomMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateAppInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateRoomMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2156,9 +2156,9 @@ func (m *awsRestjson1_deserializeOpCreateAppInstance) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateAppInstance(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateRoomMembership(response, &metadata) } - output := &CreateAppInstanceOutput{} + output := &CreateRoomMembershipOutput{} out.Result = output var buff [1024]byte @@ -2179,7 +2179,7 @@ func (m *awsRestjson1_deserializeOpCreateAppInstance) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateAppInstanceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateRoomMembershipOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2193,7 +2193,7 @@ func (m *awsRestjson1_deserializeOpCreateAppInstance) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateAppInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateRoomMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2243,6 +2243,9 @@ func awsRestjson1_deserializeOpErrorCreateAppInstance(response *smithyhttp.Respo case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) @@ -2268,7 +2271,7 @@ func awsRestjson1_deserializeOpErrorCreateAppInstance(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentCreateAppInstanceOutput(v **CreateAppInstanceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateRoomMembershipOutput(v **CreateRoomMembershipOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2281,22 +2284,18 @@ func awsRestjson1_deserializeOpDocumentCreateAppInstanceOutput(v **CreateAppInst return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateAppInstanceOutput + var sv *CreateRoomMembershipOutput if *v == nil { - sv = &CreateAppInstanceOutput{} + sv = &CreateRoomMembershipOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AppInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceArn = ptr.String(jtv) + case "RoomMembership": + if err := awsRestjson1_deserializeDocumentRoomMembership(&sv.RoomMembership, value); err != nil { + return err } default: @@ -2308,14 +2307,14 @@ func awsRestjson1_deserializeOpDocumentCreateAppInstanceOutput(v **CreateAppInst return nil } -type awsRestjson1_deserializeOpCreateAppInstanceAdmin struct { +type awsRestjson1_deserializeOpCreateUser struct { } -func (*awsRestjson1_deserializeOpCreateAppInstanceAdmin) ID() string { +func (*awsRestjson1_deserializeOpCreateUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateAppInstanceAdmin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2333,9 +2332,9 @@ func (m *awsRestjson1_deserializeOpCreateAppInstanceAdmin) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateAppInstanceAdmin(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateUser(response, &metadata) } - output := &CreateAppInstanceAdminOutput{} + output := &CreateUserOutput{} out.Result = output var buff [1024]byte @@ -2356,7 +2355,7 @@ func (m *awsRestjson1_deserializeOpCreateAppInstanceAdmin) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateAppInstanceAdminOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2370,7 +2369,7 @@ func (m *awsRestjson1_deserializeOpCreateAppInstanceAdmin) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateAppInstanceAdmin(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2420,8 +2419,8 @@ func awsRestjson1_deserializeOpErrorCreateAppInstanceAdmin(response *smithyhttp. case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -2445,7 +2444,7 @@ func awsRestjson1_deserializeOpErrorCreateAppInstanceAdmin(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreateAppInstanceAdminOutput(v **CreateAppInstanceAdminOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2458,29 +2457,20 @@ func awsRestjson1_deserializeOpDocumentCreateAppInstanceAdminOutput(v **CreateAp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateAppInstanceAdminOutput + var sv *CreateUserOutput if *v == nil { - sv = &CreateAppInstanceAdminOutput{} + sv = &CreateUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "AppInstanceAdmin": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.AppInstanceAdmin, value); err != nil { + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { return err } - case "AppInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceArn = ptr.String(jtv) - } - default: _, _ = key, value @@ -2490,14 +2480,14 @@ func awsRestjson1_deserializeOpDocumentCreateAppInstanceAdminOutput(v **CreateAp return nil } -type awsRestjson1_deserializeOpCreateAppInstanceUser struct { +type awsRestjson1_deserializeOpDeleteAccount struct { } -func (*awsRestjson1_deserializeOpCreateAppInstanceUser) ID() string { +func (*awsRestjson1_deserializeOpDeleteAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateAppInstanceUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2515,44 +2505,16 @@ func (m *awsRestjson1_deserializeOpCreateAppInstanceUser) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateAppInstanceUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccount(response, &metadata) } - output := &CreateAppInstanceUserOutput{} + output := &DeleteAccountOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateAppInstanceUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateAppInstanceUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2596,14 +2558,11 @@ func awsRestjson1_deserializeOpErrorCreateAppInstanceUser(response *smithyhttp.R case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -2617,6 +2576,9 @@ func awsRestjson1_deserializeOpErrorCreateAppInstanceUser(response *smithyhttp.R case strings.EqualFold("UnauthorizedClientException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + case strings.EqualFold("UnprocessableEntityException", errorCode): + return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2627,54 +2589,14 @@ func awsRestjson1_deserializeOpErrorCreateAppInstanceUser(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentCreateAppInstanceUserOutput(v **CreateAppInstanceUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateAppInstanceUserOutput - if *v == nil { - sv = &CreateAppInstanceUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceUserArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceUserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateAttendee struct { +type awsRestjson1_deserializeOpDeleteEventsConfiguration struct { } -func (*awsRestjson1_deserializeOpCreateAttendee) ID() string { +func (*awsRestjson1_deserializeOpDeleteEventsConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateAttendee) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteEventsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2692,36 +2614,14 @@ func (m *awsRestjson1_deserializeOpCreateAttendee) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateAttendee(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteEventsConfiguration(response, &metadata) } - output := &CreateAttendeeOutput{} + output := &DeleteEventsConfigurationOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateAttendeeOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } @@ -2729,7 +2629,7 @@ func (m *awsRestjson1_deserializeOpCreateAttendee) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateAttendee(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteEventsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2776,9 +2676,6 @@ func awsRestjson1_deserializeOpErrorCreateAttendee(response *smithyhttp.Response case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) @@ -2788,9 +2685,6 @@ func awsRestjson1_deserializeOpErrorCreateAttendee(response *smithyhttp.Response case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - case strings.EqualFold("UnauthorizedClientException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) @@ -2804,50 +2698,14 @@ func awsRestjson1_deserializeOpErrorCreateAttendee(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentCreateAttendeeOutput(v **CreateAttendeeOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateAttendeeOutput - if *v == nil { - sv = &CreateAttendeeOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Attendee": - if err := awsRestjson1_deserializeDocumentAttendee(&sv.Attendee, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateBot struct { +type awsRestjson1_deserializeOpDeletePhoneNumber struct { } -func (*awsRestjson1_deserializeOpCreateBot) ID() string { +func (*awsRestjson1_deserializeOpDeletePhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateBot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeletePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2865,36 +2723,14 @@ func (m *awsRestjson1_deserializeOpCreateBot) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateBot(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeletePhoneNumber(response, &metadata) } - output := &CreateBotOutput{} + output := &DeletePhoneNumberOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateBotOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } @@ -2902,7 +2738,7 @@ func (m *awsRestjson1_deserializeOpCreateBot) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateBot(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeletePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2952,9 +2788,6 @@ func awsRestjson1_deserializeOpErrorCreateBot(response *smithyhttp.Response, met case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -2977,50 +2810,14 @@ func awsRestjson1_deserializeOpErrorCreateBot(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentCreateBotOutput(v **CreateBotOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } +type awsRestjson1_deserializeOpDeleteRoom struct { +} - var sv *CreateBotOutput - if *v == nil { - sv = &CreateBotOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Bot": - if err := awsRestjson1_deserializeDocumentBot(&sv.Bot, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateChannel struct { -} - -func (*awsRestjson1_deserializeOpCreateChannel) ID() string { +func (*awsRestjson1_deserializeOpDeleteRoom) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3038,36 +2835,14 @@ func (m *awsRestjson1_deserializeOpCreateChannel) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateChannel(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoom(response, &metadata) } - output := &CreateChannelOutput{} + output := &DeleteRoomOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateChannelOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } @@ -3075,7 +2850,7 @@ func (m *awsRestjson1_deserializeOpCreateChannel) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3119,14 +2894,11 @@ func awsRestjson1_deserializeOpErrorCreateChannel(response *smithyhttp.Response, case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -3150,54 +2922,14 @@ func awsRestjson1_deserializeOpErrorCreateChannel(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreateChannelOutput(v **CreateChannelOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateChannelOutput - if *v == nil { - sv = &CreateChannelOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateChannelBan struct { +type awsRestjson1_deserializeOpDeleteRoomMembership struct { } -func (*awsRestjson1_deserializeOpCreateChannelBan) ID() string { +func (*awsRestjson1_deserializeOpDeleteRoomMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateChannelBan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteRoomMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3215,36 +2947,14 @@ func (m *awsRestjson1_deserializeOpCreateChannelBan) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateChannelBan(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoomMembership(response, &metadata) } - output := &CreateChannelBanOutput{} + output := &DeleteRoomMembershipOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateChannelBanOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } @@ -3252,7 +2962,7 @@ func (m *awsRestjson1_deserializeOpCreateChannelBan) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateChannelBan(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteRoomMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3296,14 +3006,11 @@ func awsRestjson1_deserializeOpErrorCreateChannelBan(response *smithyhttp.Respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -3327,59 +3034,14 @@ func awsRestjson1_deserializeOpErrorCreateChannelBan(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentCreateChannelBanOutput(v **CreateChannelBanOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateChannelBanOutput - if *v == nil { - sv = &CreateChannelBanOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "Member": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateChannelMembership struct { +type awsRestjson1_deserializeOpDisassociatePhoneNumberFromUser struct { } -func (*awsRestjson1_deserializeOpCreateChannelMembership) ID() string { +func (*awsRestjson1_deserializeOpDisassociatePhoneNumberFromUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateChannelMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociatePhoneNumberFromUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3397,44 +3059,16 @@ func (m *awsRestjson1_deserializeOpCreateChannelMembership) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateChannelMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociatePhoneNumberFromUser(response, &metadata) } - output := &CreateChannelMembershipOutput{} + output := &DisassociatePhoneNumberFromUserOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateChannelMembershipOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateChannelMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociatePhoneNumberFromUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3478,14 +3112,11 @@ func awsRestjson1_deserializeOpErrorCreateChannelMembership(response *smithyhttp case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -3509,59 +3140,14 @@ func awsRestjson1_deserializeOpErrorCreateChannelMembership(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentCreateChannelMembershipOutput(v **CreateChannelMembershipOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateChannelMembershipOutput - if *v == nil { - sv = &CreateChannelMembershipOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "Member": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateChannelModerator struct { +type awsRestjson1_deserializeOpDisassociateSigninDelegateGroupsFromAccount struct { } -func (*awsRestjson1_deserializeOpCreateChannelModerator) ID() string { +func (*awsRestjson1_deserializeOpDisassociateSigninDelegateGroupsFromAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateChannelModerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDisassociateSigninDelegateGroupsFromAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3579,44 +3165,16 @@ func (m *awsRestjson1_deserializeOpCreateChannelModerator) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateChannelModerator(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDisassociateSigninDelegateGroupsFromAccount(response, &metadata) } - output := &CreateChannelModeratorOutput{} + output := &DisassociateSigninDelegateGroupsFromAccountOutput{} out.Result = output - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentCreateChannelModeratorOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateChannelModerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDisassociateSigninDelegateGroupsFromAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3660,14 +3218,11 @@ func awsRestjson1_deserializeOpErrorCreateChannelModerator(response *smithyhttp. case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -3691,59 +3246,14 @@ func awsRestjson1_deserializeOpErrorCreateChannelModerator(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreateChannelModeratorOutput(v **CreateChannelModeratorOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateChannelModeratorOutput - if *v == nil { - sv = &CreateChannelModeratorOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "ChannelModerator": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.ChannelModerator, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpCreateMediaCapturePipeline struct { +type awsRestjson1_deserializeOpGetAccount struct { } -func (*awsRestjson1_deserializeOpCreateMediaCapturePipeline) ID() string { +func (*awsRestjson1_deserializeOpGetAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMediaCapturePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3761,9 +3271,9 @@ func (m *awsRestjson1_deserializeOpCreateMediaCapturePipeline) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMediaCapturePipeline(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetAccount(response, &metadata) } - output := &CreateMediaCapturePipelineOutput{} + output := &GetAccountOutput{} out.Result = output var buff [1024]byte @@ -3784,7 +3294,7 @@ func (m *awsRestjson1_deserializeOpCreateMediaCapturePipeline) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMediaCapturePipelineOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetAccountOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3798,7 +3308,7 @@ func (m *awsRestjson1_deserializeOpCreateMediaCapturePipeline) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMediaCapturePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3845,8 +3355,8 @@ func awsRestjson1_deserializeOpErrorCreateMediaCapturePipeline(response *smithyh case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -3870,7 +3380,7 @@ func awsRestjson1_deserializeOpErrorCreateMediaCapturePipeline(response *smithyh } } -func awsRestjson1_deserializeOpDocumentCreateMediaCapturePipelineOutput(v **CreateMediaCapturePipelineOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetAccountOutput(v **GetAccountOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3883,17 +3393,17 @@ func awsRestjson1_deserializeOpDocumentCreateMediaCapturePipelineOutput(v **Crea return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMediaCapturePipelineOutput + var sv *GetAccountOutput if *v == nil { - sv = &CreateMediaCapturePipelineOutput{} + sv = &GetAccountOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "MediaCapturePipeline": - if err := awsRestjson1_deserializeDocumentMediaCapturePipeline(&sv.MediaCapturePipeline, value); err != nil { + case "Account": + if err := awsRestjson1_deserializeDocumentAccount(&sv.Account, value); err != nil { return err } @@ -3906,14 +3416,14 @@ func awsRestjson1_deserializeOpDocumentCreateMediaCapturePipelineOutput(v **Crea return nil } -type awsRestjson1_deserializeOpCreateMeeting struct { +type awsRestjson1_deserializeOpGetAccountSettings struct { } -func (*awsRestjson1_deserializeOpCreateMeeting) ID() string { +func (*awsRestjson1_deserializeOpGetAccountSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMeeting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3931,9 +3441,9 @@ func (m *awsRestjson1_deserializeOpCreateMeeting) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMeeting(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetAccountSettings(response, &metadata) } - output := &CreateMeetingOutput{} + output := &GetAccountSettingsOutput{} out.Result = output var buff [1024]byte @@ -3954,7 +3464,7 @@ func (m *awsRestjson1_deserializeOpCreateMeeting) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMeetingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3968,7 +3478,7 @@ func (m *awsRestjson1_deserializeOpCreateMeeting) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMeeting(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4015,8 +3525,8 @@ func awsRestjson1_deserializeOpErrorCreateMeeting(response *smithyhttp.Response, case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -4040,7 +3550,7 @@ func awsRestjson1_deserializeOpErrorCreateMeeting(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreateMeetingOutput(v **CreateMeetingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(v **GetAccountSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4053,17 +3563,17 @@ func awsRestjson1_deserializeOpDocumentCreateMeetingOutput(v **CreateMeetingOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMeetingOutput + var sv *GetAccountSettingsOutput if *v == nil { - sv = &CreateMeetingOutput{} + sv = &GetAccountSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Meeting": - if err := awsRestjson1_deserializeDocumentMeeting(&sv.Meeting, value); err != nil { + case "AccountSettings": + if err := awsRestjson1_deserializeDocumentAccountSettings(&sv.AccountSettings, value); err != nil { return err } @@ -4076,14 +3586,14 @@ func awsRestjson1_deserializeOpDocumentCreateMeetingOutput(v **CreateMeetingOutp return nil } -type awsRestjson1_deserializeOpCreateMeetingDialOut struct { +type awsRestjson1_deserializeOpGetBot struct { } -func (*awsRestjson1_deserializeOpCreateMeetingDialOut) ID() string { +func (*awsRestjson1_deserializeOpGetBot) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMeetingDialOut) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetBot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4101,9 +3611,9 @@ func (m *awsRestjson1_deserializeOpCreateMeetingDialOut) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMeetingDialOut(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetBot(response, &metadata) } - output := &CreateMeetingDialOutOutput{} + output := &GetBotOutput{} out.Result = output var buff [1024]byte @@ -4124,7 +3634,7 @@ func (m *awsRestjson1_deserializeOpCreateMeetingDialOut) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMeetingDialOutOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetBotOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4138,7 +3648,7 @@ func (m *awsRestjson1_deserializeOpCreateMeetingDialOut) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMeetingDialOut(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetBot(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4179,17 +3689,14 @@ func awsRestjson1_deserializeOpErrorCreateMeetingDialOut(response *smithyhttp.Re } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -4213,7 +3720,7 @@ func awsRestjson1_deserializeOpErrorCreateMeetingDialOut(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentCreateMeetingDialOutOutput(v **CreateMeetingDialOutOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetBotOutput(v **GetBotOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4226,22 +3733,18 @@ func awsRestjson1_deserializeOpDocumentCreateMeetingDialOutOutput(v **CreateMeet return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMeetingDialOutOutput + var sv *GetBotOutput if *v == nil { - sv = &CreateMeetingDialOutOutput{} + sv = &GetBotOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "TransactionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) - } - sv.TransactionId = ptr.String(jtv) + case "Bot": + if err := awsRestjson1_deserializeDocumentBot(&sv.Bot, value); err != nil { + return err } default: @@ -4253,14 +3756,14 @@ func awsRestjson1_deserializeOpDocumentCreateMeetingDialOutOutput(v **CreateMeet return nil } -type awsRestjson1_deserializeOpCreateMeetingWithAttendees struct { +type awsRestjson1_deserializeOpGetEventsConfiguration struct { } -func (*awsRestjson1_deserializeOpCreateMeetingWithAttendees) ID() string { +func (*awsRestjson1_deserializeOpGetEventsConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateMeetingWithAttendees) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetEventsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4278,9 +3781,9 @@ func (m *awsRestjson1_deserializeOpCreateMeetingWithAttendees) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateMeetingWithAttendees(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetEventsConfiguration(response, &metadata) } - output := &CreateMeetingWithAttendeesOutput{} + output := &GetEventsConfigurationOutput{} out.Result = output var buff [1024]byte @@ -4301,7 +3804,7 @@ func (m *awsRestjson1_deserializeOpCreateMeetingWithAttendees) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateMeetingWithAttendeesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetEventsConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4315,7 +3818,7 @@ func (m *awsRestjson1_deserializeOpCreateMeetingWithAttendees) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateMeetingWithAttendees(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetEventsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4362,6 +3865,9 @@ func awsRestjson1_deserializeOpErrorCreateMeetingWithAttendees(response *smithyh case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) @@ -4371,9 +3877,6 @@ func awsRestjson1_deserializeOpErrorCreateMeetingWithAttendees(response *smithyh case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - case strings.EqualFold("UnauthorizedClientException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) @@ -4387,7 +3890,7 @@ func awsRestjson1_deserializeOpErrorCreateMeetingWithAttendees(response *smithyh } } -func awsRestjson1_deserializeOpDocumentCreateMeetingWithAttendeesOutput(v **CreateMeetingWithAttendeesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetEventsConfigurationOutput(v **GetEventsConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4400,27 +3903,17 @@ func awsRestjson1_deserializeOpDocumentCreateMeetingWithAttendeesOutput(v **Crea return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateMeetingWithAttendeesOutput + var sv *GetEventsConfigurationOutput if *v == nil { - sv = &CreateMeetingWithAttendeesOutput{} + sv = &GetEventsConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Attendees": - if err := awsRestjson1_deserializeDocumentAttendeeList(&sv.Attendees, value); err != nil { - return err - } - - case "Errors": - if err := awsRestjson1_deserializeDocumentBatchCreateAttendeeErrorList(&sv.Errors, value); err != nil { - return err - } - - case "Meeting": - if err := awsRestjson1_deserializeDocumentMeeting(&sv.Meeting, value); err != nil { + case "EventsConfiguration": + if err := awsRestjson1_deserializeDocumentEventsConfiguration(&sv.EventsConfiguration, value); err != nil { return err } @@ -4433,14 +3926,14 @@ func awsRestjson1_deserializeOpDocumentCreateMeetingWithAttendeesOutput(v **Crea return nil } -type awsRestjson1_deserializeOpCreatePhoneNumberOrder struct { +type awsRestjson1_deserializeOpGetGlobalSettings struct { } -func (*awsRestjson1_deserializeOpCreatePhoneNumberOrder) ID() string { +func (*awsRestjson1_deserializeOpGetGlobalSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreatePhoneNumberOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetGlobalSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4458,9 +3951,9 @@ func (m *awsRestjson1_deserializeOpCreatePhoneNumberOrder) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreatePhoneNumberOrder(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetGlobalSettings(response, &metadata) } - output := &CreatePhoneNumberOrderOutput{} + output := &GetGlobalSettingsOutput{} out.Result = output var buff [1024]byte @@ -4481,7 +3974,7 @@ func (m *awsRestjson1_deserializeOpCreatePhoneNumberOrder) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreatePhoneNumberOrderOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetGlobalSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4495,7 +3988,7 @@ func (m *awsRestjson1_deserializeOpCreatePhoneNumberOrder) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreatePhoneNumberOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetGlobalSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4536,18 +4029,12 @@ func awsRestjson1_deserializeOpErrorCreatePhoneNumberOrder(response *smithyhttp. } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -4570,7 +4057,7 @@ func awsRestjson1_deserializeOpErrorCreatePhoneNumberOrder(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentCreatePhoneNumberOrderOutput(v **CreatePhoneNumberOrderOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetGlobalSettingsOutput(v **GetGlobalSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4583,17 +4070,22 @@ func awsRestjson1_deserializeOpDocumentCreatePhoneNumberOrderOutput(v **CreatePh return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreatePhoneNumberOrderOutput + var sv *GetGlobalSettingsOutput if *v == nil { - sv = &CreatePhoneNumberOrderOutput{} + sv = &GetGlobalSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "PhoneNumberOrder": - if err := awsRestjson1_deserializeDocumentPhoneNumberOrder(&sv.PhoneNumberOrder, value); err != nil { + case "BusinessCalling": + if err := awsRestjson1_deserializeDocumentBusinessCallingSettings(&sv.BusinessCalling, value); err != nil { + return err + } + + case "VoiceConnector": + if err := awsRestjson1_deserializeDocumentVoiceConnectorSettings(&sv.VoiceConnector, value); err != nil { return err } @@ -4606,14 +4098,14 @@ func awsRestjson1_deserializeOpDocumentCreatePhoneNumberOrderOutput(v **CreatePh return nil } -type awsRestjson1_deserializeOpCreateProxySession struct { +type awsRestjson1_deserializeOpGetPhoneNumber struct { } -func (*awsRestjson1_deserializeOpCreateProxySession) ID() string { +func (*awsRestjson1_deserializeOpGetPhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateProxySession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4631,9 +4123,9 @@ func (m *awsRestjson1_deserializeOpCreateProxySession) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateProxySession(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetPhoneNumber(response, &metadata) } - output := &CreateProxySessionOutput{} + output := &GetPhoneNumberOutput{} out.Result = output var buff [1024]byte @@ -4654,7 +4146,7 @@ func (m *awsRestjson1_deserializeOpCreateProxySession) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateProxySessionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPhoneNumberOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4668,7 +4160,7 @@ func (m *awsRestjson1_deserializeOpCreateProxySession) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateProxySession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4740,7 +4232,7 @@ func awsRestjson1_deserializeOpErrorCreateProxySession(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentCreateProxySessionOutput(v **CreateProxySessionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPhoneNumberOutput(v **GetPhoneNumberOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4753,17 +4245,17 @@ func awsRestjson1_deserializeOpDocumentCreateProxySessionOutput(v **CreateProxyS return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateProxySessionOutput + var sv *GetPhoneNumberOutput if *v == nil { - sv = &CreateProxySessionOutput{} + sv = &GetPhoneNumberOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "ProxySession": - if err := awsRestjson1_deserializeDocumentProxySession(&sv.ProxySession, value); err != nil { + case "PhoneNumber": + if err := awsRestjson1_deserializeDocumentPhoneNumber(&sv.PhoneNumber, value); err != nil { return err } @@ -4776,14 +4268,14 @@ func awsRestjson1_deserializeOpDocumentCreateProxySessionOutput(v **CreateProxyS return nil } -type awsRestjson1_deserializeOpCreateRoom struct { +type awsRestjson1_deserializeOpGetPhoneNumberOrder struct { } -func (*awsRestjson1_deserializeOpCreateRoom) ID() string { +func (*awsRestjson1_deserializeOpGetPhoneNumberOrder) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPhoneNumberOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4801,9 +4293,9 @@ func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateRoom(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetPhoneNumberOrder(response, &metadata) } - output := &CreateRoomOutput{} + output := &GetPhoneNumberOrderOutput{} out.Result = output var buff [1024]byte @@ -4824,7 +4316,7 @@ func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateRoomOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPhoneNumberOrderOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4838,7 +4330,7 @@ func (m *awsRestjson1_deserializeOpCreateRoom) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPhoneNumberOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4888,9 +4380,6 @@ func awsRestjson1_deserializeOpErrorCreateRoom(response *smithyhttp.Response, me case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -4913,7 +4402,7 @@ func awsRestjson1_deserializeOpErrorCreateRoom(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPhoneNumberOrderOutput(v **GetPhoneNumberOrderOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4926,17 +4415,17 @@ func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateRoomOutput + var sv *GetPhoneNumberOrderOutput if *v == nil { - sv = &CreateRoomOutput{} + sv = &GetPhoneNumberOrderOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "Room": - if err := awsRestjson1_deserializeDocumentRoom(&sv.Room, value); err != nil { + case "PhoneNumberOrder": + if err := awsRestjson1_deserializeDocumentPhoneNumberOrder(&sv.PhoneNumberOrder, value); err != nil { return err } @@ -4949,14 +4438,14 @@ func awsRestjson1_deserializeOpDocumentCreateRoomOutput(v **CreateRoomOutput, va return nil } -type awsRestjson1_deserializeOpCreateRoomMembership struct { +type awsRestjson1_deserializeOpGetPhoneNumberSettings struct { } -func (*awsRestjson1_deserializeOpCreateRoomMembership) ID() string { +func (*awsRestjson1_deserializeOpGetPhoneNumberSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateRoomMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetPhoneNumberSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4974,9 +4463,9 @@ func (m *awsRestjson1_deserializeOpCreateRoomMembership) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateRoomMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetPhoneNumberSettings(response, &metadata) } - output := &CreateRoomMembershipOutput{} + output := &GetPhoneNumberSettingsOutput{} out.Result = output var buff [1024]byte @@ -4997,7 +4486,7 @@ func (m *awsRestjson1_deserializeOpCreateRoomMembership) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateRoomMembershipOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetPhoneNumberSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5011,7 +4500,7 @@ func (m *awsRestjson1_deserializeOpCreateRoomMembership) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateRoomMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetPhoneNumberSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5055,18 +4544,9 @@ func awsRestjson1_deserializeOpErrorCreateRoomMembership(response *smithyhttp.Re case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -5089,7 +4569,7 @@ func awsRestjson1_deserializeOpErrorCreateRoomMembership(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentCreateRoomMembershipOutput(v **CreateRoomMembershipOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetPhoneNumberSettingsOutput(v **GetPhoneNumberSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5102,18 +4582,35 @@ func awsRestjson1_deserializeOpDocumentCreateRoomMembershipOutput(v **CreateRoom return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateRoomMembershipOutput + var sv *GetPhoneNumberSettingsOutput if *v == nil { - sv = &CreateRoomMembershipOutput{} + sv = &GetPhoneNumberSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "RoomMembership": - if err := awsRestjson1_deserializeDocumentRoomMembership(&sv.RoomMembership, value); err != nil { - return err + case "CallingName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CallingName to be of type string, got %T instead", value) + } + sv.CallingName = ptr.String(jtv) + } + + case "CallingNameUpdatedTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CallingNameUpdatedTimestamp = ptr.Time(t) } default: @@ -5125,14 +4622,14 @@ func awsRestjson1_deserializeOpDocumentCreateRoomMembershipOutput(v **CreateRoom return nil } -type awsRestjson1_deserializeOpCreateSipMediaApplication struct { +type awsRestjson1_deserializeOpGetRetentionSettings struct { } -func (*awsRestjson1_deserializeOpCreateSipMediaApplication) ID() string { +func (*awsRestjson1_deserializeOpGetRetentionSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateSipMediaApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetRetentionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5150,9 +4647,9 @@ func (m *awsRestjson1_deserializeOpCreateSipMediaApplication) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateSipMediaApplication(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetRetentionSettings(response, &metadata) } - output := &CreateSipMediaApplicationOutput{} + output := &GetRetentionSettingsOutput{} out.Result = output var buff [1024]byte @@ -5173,7 +4670,7 @@ func (m *awsRestjson1_deserializeOpCreateSipMediaApplication) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateSipMediaApplicationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetRetentionSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5187,7 +4684,7 @@ func (m *awsRestjson1_deserializeOpCreateSipMediaApplication) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateSipMediaApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetRetentionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5228,20 +4725,14 @@ func awsRestjson1_deserializeOpErrorCreateSipMediaApplication(response *smithyht } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -5265,7 +4756,7 @@ func awsRestjson1_deserializeOpErrorCreateSipMediaApplication(response *smithyht } } -func awsRestjson1_deserializeOpDocumentCreateSipMediaApplicationOutput(v **CreateSipMediaApplicationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetRetentionSettingsOutput(v **GetRetentionSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5278,17 +4769,30 @@ func awsRestjson1_deserializeOpDocumentCreateSipMediaApplicationOutput(v **Creat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateSipMediaApplicationOutput + var sv *GetRetentionSettingsOutput if *v == nil { - sv = &CreateSipMediaApplicationOutput{} + sv = &GetRetentionSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "SipMediaApplication": - if err := awsRestjson1_deserializeDocumentSipMediaApplication(&sv.SipMediaApplication, value); err != nil { + case "InitiateDeletionTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.InitiateDeletionTimestamp = ptr.Time(t) + } + + case "RetentionSettings": + if err := awsRestjson1_deserializeDocumentRetentionSettings(&sv.RetentionSettings, value); err != nil { return err } @@ -5301,14 +4805,14 @@ func awsRestjson1_deserializeOpDocumentCreateSipMediaApplicationOutput(v **Creat return nil } -type awsRestjson1_deserializeOpCreateSipMediaApplicationCall struct { +type awsRestjson1_deserializeOpGetRoom struct { } -func (*awsRestjson1_deserializeOpCreateSipMediaApplicationCall) ID() string { +func (*awsRestjson1_deserializeOpGetRoom) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateSipMediaApplicationCall) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5326,9 +4830,9 @@ func (m *awsRestjson1_deserializeOpCreateSipMediaApplicationCall) HandleDeserial } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateSipMediaApplicationCall(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetRoom(response, &metadata) } - output := &CreateSipMediaApplicationCallOutput{} + output := &GetRoomOutput{} out.Result = output var buff [1024]byte @@ -5349,7 +4853,7 @@ func (m *awsRestjson1_deserializeOpCreateSipMediaApplicationCall) HandleDeserial return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateSipMediaApplicationCallOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetRoomOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5363,7 +4867,7 @@ func (m *awsRestjson1_deserializeOpCreateSipMediaApplicationCall) HandleDeserial return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateSipMediaApplicationCall(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5404,17 +4908,14 @@ func awsRestjson1_deserializeOpErrorCreateSipMediaApplicationCall(response *smit } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -5438,7 +4939,7 @@ func awsRestjson1_deserializeOpErrorCreateSipMediaApplicationCall(response *smit } } -func awsRestjson1_deserializeOpDocumentCreateSipMediaApplicationCallOutput(v **CreateSipMediaApplicationCallOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetRoomOutput(v **GetRoomOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5451,17 +4952,17 @@ func awsRestjson1_deserializeOpDocumentCreateSipMediaApplicationCallOutput(v **C return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateSipMediaApplicationCallOutput + var sv *GetRoomOutput if *v == nil { - sv = &CreateSipMediaApplicationCallOutput{} + sv = &GetRoomOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "SipMediaApplicationCall": - if err := awsRestjson1_deserializeDocumentSipMediaApplicationCall(&sv.SipMediaApplicationCall, value); err != nil { + case "Room": + if err := awsRestjson1_deserializeDocumentRoom(&sv.Room, value); err != nil { return err } @@ -5474,14 +4975,14 @@ func awsRestjson1_deserializeOpDocumentCreateSipMediaApplicationCallOutput(v **C return nil } -type awsRestjson1_deserializeOpCreateSipRule struct { +type awsRestjson1_deserializeOpGetUser struct { } -func (*awsRestjson1_deserializeOpCreateSipRule) ID() string { +func (*awsRestjson1_deserializeOpGetUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateSipRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5499,9 +5000,9 @@ func (m *awsRestjson1_deserializeOpCreateSipRule) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateSipRule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetUser(response, &metadata) } - output := &CreateSipRuleOutput{} + output := &GetUserOutput{} out.Result = output var buff [1024]byte @@ -5522,7 +5023,7 @@ func (m *awsRestjson1_deserializeOpCreateSipRule) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateSipRuleOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetUserOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5536,7 +5037,7 @@ func (m *awsRestjson1_deserializeOpCreateSipRule) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateSipRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5577,20 +5078,14 @@ func awsRestjson1_deserializeOpErrorCreateSipRule(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -5614,7 +5109,7 @@ func awsRestjson1_deserializeOpErrorCreateSipRule(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentCreateSipRuleOutput(v **CreateSipRuleOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetUserOutput(v **GetUserOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5627,17 +5122,17 @@ func awsRestjson1_deserializeOpDocumentCreateSipRuleOutput(v **CreateSipRuleOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateSipRuleOutput + var sv *GetUserOutput if *v == nil { - sv = &CreateSipRuleOutput{} + sv = &GetUserOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "SipRule": - if err := awsRestjson1_deserializeDocumentSipRule(&sv.SipRule, value); err != nil { + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { return err } @@ -5650,14 +5145,14 @@ func awsRestjson1_deserializeOpDocumentCreateSipRuleOutput(v **CreateSipRuleOutp return nil } -type awsRestjson1_deserializeOpCreateUser struct { +type awsRestjson1_deserializeOpGetUserSettings struct { } -func (*awsRestjson1_deserializeOpCreateUser) ID() string { +func (*awsRestjson1_deserializeOpGetUserSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetUserSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5675,9 +5170,9 @@ func (m *awsRestjson1_deserializeOpCreateUser) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetUserSettings(response, &metadata) } - output := &CreateUserOutput{} + output := &GetUserSettingsOutput{} out.Result = output var buff [1024]byte @@ -5698,7 +5193,7 @@ func (m *awsRestjson1_deserializeOpCreateUser) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateUserOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetUserSettingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5712,7 +5207,7 @@ func (m *awsRestjson1_deserializeOpCreateUser) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetUserSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5756,9 +5251,6 @@ func awsRestjson1_deserializeOpErrorCreateUser(response *smithyhttp.Response, me case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -5787,7 +5279,7 @@ func awsRestjson1_deserializeOpErrorCreateUser(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetUserSettingsOutput(v **GetUserSettingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5800,17 +5292,17 @@ func awsRestjson1_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateUserOutput + var sv *GetUserSettingsOutput if *v == nil { - sv = &CreateUserOutput{} + sv = &GetUserSettingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { + case "UserSettings": + if err := awsRestjson1_deserializeDocumentUserSettings(&sv.UserSettings, value); err != nil { return err } @@ -5823,14 +5315,14 @@ func awsRestjson1_deserializeOpDocumentCreateUserOutput(v **CreateUserOutput, va return nil } -type awsRestjson1_deserializeOpCreateVoiceConnector struct { +type awsRestjson1_deserializeOpInviteUsers struct { } -func (*awsRestjson1_deserializeOpCreateVoiceConnector) ID() string { +func (*awsRestjson1_deserializeOpInviteUsers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateVoiceConnector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpInviteUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -5848,9 +5340,9 @@ func (m *awsRestjson1_deserializeOpCreateVoiceConnector) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateVoiceConnector(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorInviteUsers(response, &metadata) } - output := &CreateVoiceConnectorOutput{} + output := &InviteUsersOutput{} out.Result = output var buff [1024]byte @@ -5871,7 +5363,7 @@ func (m *awsRestjson1_deserializeOpCreateVoiceConnector) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateVoiceConnectorOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentInviteUsersOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5885,7 +5377,7 @@ func (m *awsRestjson1_deserializeOpCreateVoiceConnector) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateVoiceConnector(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorInviteUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5926,17 +5418,14 @@ func awsRestjson1_deserializeOpErrorCreateVoiceConnector(response *smithyhttp.Re } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -5960,7 +5449,7 @@ func awsRestjson1_deserializeOpErrorCreateVoiceConnector(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentCreateVoiceConnectorOutput(v **CreateVoiceConnectorOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentInviteUsersOutput(v **InviteUsersOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5973,17 +5462,17 @@ func awsRestjson1_deserializeOpDocumentCreateVoiceConnectorOutput(v **CreateVoic return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateVoiceConnectorOutput + var sv *InviteUsersOutput if *v == nil { - sv = &CreateVoiceConnectorOutput{} + sv = &InviteUsersOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "VoiceConnector": - if err := awsRestjson1_deserializeDocumentVoiceConnector(&sv.VoiceConnector, value); err != nil { + case "Invites": + if err := awsRestjson1_deserializeDocumentInviteList(&sv.Invites, value); err != nil { return err } @@ -5996,14 +5485,14 @@ func awsRestjson1_deserializeOpDocumentCreateVoiceConnectorOutput(v **CreateVoic return nil } -type awsRestjson1_deserializeOpCreateVoiceConnectorGroup struct { +type awsRestjson1_deserializeOpListAccounts struct { } -func (*awsRestjson1_deserializeOpCreateVoiceConnectorGroup) ID() string { +func (*awsRestjson1_deserializeOpListAccounts) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateVoiceConnectorGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6021,9 +5510,9 @@ func (m *awsRestjson1_deserializeOpCreateVoiceConnectorGroup) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateVoiceConnectorGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAccounts(response, &metadata) } - output := &CreateVoiceConnectorGroupOutput{} + output := &ListAccountsOutput{} out.Result = output var buff [1024]byte @@ -6044,7 +5533,7 @@ func (m *awsRestjson1_deserializeOpCreateVoiceConnectorGroup) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateVoiceConnectorGroupOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAccountsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6058,7 +5547,7 @@ func (m *awsRestjson1_deserializeOpCreateVoiceConnectorGroup) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateVoiceConnectorGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6099,17 +5588,14 @@ func awsRestjson1_deserializeOpErrorCreateVoiceConnectorGroup(response *smithyht } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -6133,7 +5619,7 @@ func awsRestjson1_deserializeOpErrorCreateVoiceConnectorGroup(response *smithyht } } -func awsRestjson1_deserializeOpDocumentCreateVoiceConnectorGroupOutput(v **CreateVoiceConnectorGroupOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAccountsOutput(v **ListAccountsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6146,20 +5632,29 @@ func awsRestjson1_deserializeOpDocumentCreateVoiceConnectorGroupOutput(v **Creat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateVoiceConnectorGroupOutput + var sv *ListAccountsOutput if *v == nil { - sv = &CreateVoiceConnectorGroupOutput{} + sv = &ListAccountsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "VoiceConnectorGroup": - if err := awsRestjson1_deserializeDocumentVoiceConnectorGroup(&sv.VoiceConnectorGroup, value); err != nil { + case "Accounts": + if err := awsRestjson1_deserializeDocumentAccountList(&sv.Accounts, value); err != nil { return err } + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -6169,14 +5664,14 @@ func awsRestjson1_deserializeOpDocumentCreateVoiceConnectorGroupOutput(v **Creat return nil } -type awsRestjson1_deserializeOpDeleteAccount struct { +type awsRestjson1_deserializeOpListBots struct { } -func (*awsRestjson1_deserializeOpDeleteAccount) ID() string { +func (*awsRestjson1_deserializeOpListBots) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListBots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6194,16 +5689,44 @@ func (m *awsRestjson1_deserializeOpDeleteAccount) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAccount(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListBots(response, &metadata) } - output := &DeleteAccountOutput{} + output := &ListBotsOutput{} out.Result = output + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListBotsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListBots(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6265,9 +5788,6 @@ func awsRestjson1_deserializeOpErrorDeleteAccount(response *smithyhttp.Response, case strings.EqualFold("UnauthorizedClientException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6278,39 +5798,106 @@ func awsRestjson1_deserializeOpErrorDeleteAccount(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeleteAppInstance struct { -} - -func (*awsRestjson1_deserializeOpDeleteAppInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteAppInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err +func awsRestjson1_deserializeOpDocumentListBotsOutput(v **ListBotsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil } - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) + shape, ok := value.(map[string]interface{}) if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + return fmt.Errorf("unexpected JSON type %v", value) } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAppInstance(response, &metadata) - } - output := &DeleteAppInstanceOutput{} - out.Result = output + var sv *ListBotsOutput + if *v == nil { + sv = &ListBotsOutput{} + } else { + sv = *v + } - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + for key, value := range shape { + switch key { + case "Bots": + if err := awsRestjson1_deserializeDocumentBotList(&sv.Bots, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListPhoneNumberOrders struct { +} + +func (*awsRestjson1_deserializeOpListPhoneNumberOrders) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListPhoneNumberOrders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListPhoneNumberOrders(response, &metadata) + } + output := &ListPhoneNumberOrdersOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListPhoneNumberOrdersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -6318,7 +5905,7 @@ func (m *awsRestjson1_deserializeOpDeleteAppInstance) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAppInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPhoneNumberOrders(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6387,14 +5974,59 @@ func awsRestjson1_deserializeOpErrorDeleteAppInstance(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpDeleteAppInstanceAdmin struct { +func awsRestjson1_deserializeOpDocumentListPhoneNumberOrdersOutput(v **ListPhoneNumberOrdersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListPhoneNumberOrdersOutput + if *v == nil { + sv = &ListPhoneNumberOrdersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "PhoneNumberOrders": + if err := awsRestjson1_deserializeDocumentPhoneNumberOrderList(&sv.PhoneNumberOrders, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListPhoneNumbers struct { } -func (*awsRestjson1_deserializeOpDeleteAppInstanceAdmin) ID() string { +func (*awsRestjson1_deserializeOpListPhoneNumbers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAppInstanceAdmin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListPhoneNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6412,14 +6044,36 @@ func (m *awsRestjson1_deserializeOpDeleteAppInstanceAdmin) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAppInstanceAdmin(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListPhoneNumbers(response, &metadata) } - output := &DeleteAppInstanceAdminOutput{} + output := &ListPhoneNumbersOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListPhoneNumbersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -6427,7 +6081,7 @@ func (m *awsRestjson1_deserializeOpDeleteAppInstanceAdmin) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAppInstanceAdmin(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListPhoneNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6471,12 +6125,12 @@ func awsRestjson1_deserializeOpErrorDeleteAppInstanceAdmin(response *smithyhttp. case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -6499,14 +6153,59 @@ func awsRestjson1_deserializeOpErrorDeleteAppInstanceAdmin(response *smithyhttp. } } -type awsRestjson1_deserializeOpDeleteAppInstanceStreamingConfigurations struct { +func awsRestjson1_deserializeOpDocumentListPhoneNumbersOutput(v **ListPhoneNumbersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListPhoneNumbersOutput + if *v == nil { + sv = &ListPhoneNumbersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "PhoneNumbers": + if err := awsRestjson1_deserializeDocumentPhoneNumberList(&sv.PhoneNumbers, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListRoomMemberships struct { } -func (*awsRestjson1_deserializeOpDeleteAppInstanceStreamingConfigurations) ID() string { +func (*awsRestjson1_deserializeOpListRoomMemberships) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAppInstanceStreamingConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListRoomMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6524,14 +6223,36 @@ func (m *awsRestjson1_deserializeOpDeleteAppInstanceStreamingConfigurations) Han } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAppInstanceStreamingConfigurations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListRoomMemberships(response, &metadata) } - output := &DeleteAppInstanceStreamingConfigurationsOutput{} + output := &ListRoomMembershipsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListRoomMembershipsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -6539,7 +6260,7 @@ func (m *awsRestjson1_deserializeOpDeleteAppInstanceStreamingConfigurations) Han return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAppInstanceStreamingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListRoomMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6611,14 +6332,59 @@ func awsRestjson1_deserializeOpErrorDeleteAppInstanceStreamingConfigurations(res } } -type awsRestjson1_deserializeOpDeleteAppInstanceUser struct { -} +func awsRestjson1_deserializeOpDocumentListRoomMembershipsOutput(v **ListRoomMembershipsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } -func (*awsRestjson1_deserializeOpDeleteAppInstanceUser) ID() string { + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRoomMembershipsOutput + if *v == nil { + sv = &ListRoomMembershipsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "RoomMemberships": + if err := awsRestjson1_deserializeDocumentRoomMembershipList(&sv.RoomMemberships, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListRooms struct { +} + +func (*awsRestjson1_deserializeOpListRooms) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAppInstanceUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListRooms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6636,14 +6402,36 @@ func (m *awsRestjson1_deserializeOpDeleteAppInstanceUser) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAppInstanceUser(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListRooms(response, &metadata) } - output := &DeleteAppInstanceUserOutput{} + output := &ListRoomsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListRoomsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -6651,7 +6439,7 @@ func (m *awsRestjson1_deserializeOpDeleteAppInstanceUser) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAppInstanceUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListRooms(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6698,6 +6486,9 @@ func awsRestjson1_deserializeOpErrorDeleteAppInstanceUser(response *smithyhttp.R case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -6720,14 +6511,59 @@ func awsRestjson1_deserializeOpErrorDeleteAppInstanceUser(response *smithyhttp.R } } -type awsRestjson1_deserializeOpDeleteAttendee struct { +func awsRestjson1_deserializeOpDocumentListRoomsOutput(v **ListRoomsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListRoomsOutput + if *v == nil { + sv = &ListRoomsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Rooms": + if err := awsRestjson1_deserializeDocumentRoomList(&sv.Rooms, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListSupportedPhoneNumberCountries struct { } -func (*awsRestjson1_deserializeOpDeleteAttendee) ID() string { +func (*awsRestjson1_deserializeOpListSupportedPhoneNumberCountries) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteAttendee) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSupportedPhoneNumberCountries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6745,14 +6581,36 @@ func (m *awsRestjson1_deserializeOpDeleteAttendee) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteAttendee(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSupportedPhoneNumberCountries(response, &metadata) } - output := &DeleteAttendeeOutput{} + output := &ListSupportedPhoneNumberCountriesOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListSupportedPhoneNumberCountriesOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -6760,7 +6618,7 @@ func (m *awsRestjson1_deserializeOpDeleteAttendee) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteAttendee(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSupportedPhoneNumberCountries(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6801,15 +6659,15 @@ func awsRestjson1_deserializeOpErrorDeleteAttendee(response *smithyhttp.Response } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -6832,14 +6690,50 @@ func awsRestjson1_deserializeOpErrorDeleteAttendee(response *smithyhttp.Response } } -type awsRestjson1_deserializeOpDeleteChannel struct { +func awsRestjson1_deserializeOpDocumentListSupportedPhoneNumberCountriesOutput(v **ListSupportedPhoneNumberCountriesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSupportedPhoneNumberCountriesOutput + if *v == nil { + sv = &ListSupportedPhoneNumberCountriesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PhoneNumberCountries": + if err := awsRestjson1_deserializeDocumentPhoneNumberCountriesList(&sv.PhoneNumberCountries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListUsers struct { } -func (*awsRestjson1_deserializeOpDeleteChannel) ID() string { +func (*awsRestjson1_deserializeOpListUsers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6857,14 +6751,36 @@ func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannel(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListUsers(response, &metadata) } - output := &DeleteChannelOutput{} + output := &ListUsersOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListUsersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -6872,7 +6788,7 @@ func (m *awsRestjson1_deserializeOpDeleteChannel) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6919,6 +6835,9 @@ func awsRestjson1_deserializeOpErrorDeleteChannel(response *smithyhttp.Response, case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -6941,47 +6860,86 @@ func awsRestjson1_deserializeOpErrorDeleteChannel(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeleteChannelBan struct { -} - -func (*awsRestjson1_deserializeOpDeleteChannelBan) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteChannelBan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err +func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + if value == nil { + return nil } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannelBan(response, &metadata) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - output := &DeleteChannelBanOutput{} - out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var sv *ListUsersOutput + if *v == nil { + sv = &ListUsersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "Users": + if err := awsRestjson1_deserializeDocumentUserList(&sv.Users, value); err != nil { + return err + } + + default: + _, _ = key, value + } } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpLogoutUser struct { +} + +func (*awsRestjson1_deserializeOpLogoutUser) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpLogoutUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + _, span := tracing.StartSpan(ctx, "OperationDeserializer") + endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") + defer endTimer() + defer span.End() + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorLogoutUser(response, &metadata) + } + output := &LogoutUserOutput{} + out.Result = output span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteChannelBan(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorLogoutUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7028,6 +6986,9 @@ func awsRestjson1_deserializeOpErrorDeleteChannelBan(response *smithyhttp.Respon case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -7050,14 +7011,14 @@ func awsRestjson1_deserializeOpErrorDeleteChannelBan(response *smithyhttp.Respon } } -type awsRestjson1_deserializeOpDeleteChannelMembership struct { +type awsRestjson1_deserializeOpPutEventsConfiguration struct { } -func (*awsRestjson1_deserializeOpDeleteChannelMembership) ID() string { +func (*awsRestjson1_deserializeOpPutEventsConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteChannelMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutEventsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7075,14 +7036,36 @@ func (m *awsRestjson1_deserializeOpDeleteChannelMembership) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannelMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutEventsConfiguration(response, &metadata) } - output := &DeleteChannelMembershipOutput{} + output := &PutEventsConfigurationOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutEventsConfigurationOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -7090,7 +7073,7 @@ func (m *awsRestjson1_deserializeOpDeleteChannelMembership) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteChannelMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutEventsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7134,21 +7117,21 @@ func awsRestjson1_deserializeOpErrorDeleteChannelMembership(response *smithyhttp case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - case strings.EqualFold("UnauthorizedClientException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) @@ -7162,14 +7145,50 @@ func awsRestjson1_deserializeOpErrorDeleteChannelMembership(response *smithyhttp } } -type awsRestjson1_deserializeOpDeleteChannelMessage struct { +func awsRestjson1_deserializeOpDocumentPutEventsConfigurationOutput(v **PutEventsConfigurationOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutEventsConfigurationOutput + if *v == nil { + sv = &PutEventsConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "EventsConfiguration": + if err := awsRestjson1_deserializeDocumentEventsConfiguration(&sv.EventsConfiguration, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutRetentionSettings struct { } -func (*awsRestjson1_deserializeOpDeleteChannelMessage) ID() string { +func (*awsRestjson1_deserializeOpPutRetentionSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteChannelMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutRetentionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7187,14 +7206,36 @@ func (m *awsRestjson1_deserializeOpDeleteChannelMessage) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannelMessage(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutRetentionSettings(response, &metadata) } - output := &DeleteChannelMessageOutput{} + output := &PutRetentionSettingsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentPutRetentionSettingsOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -7202,7 +7243,7 @@ func (m *awsRestjson1_deserializeOpDeleteChannelMessage) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteChannelMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutRetentionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7246,9 +7287,15 @@ func awsRestjson1_deserializeOpErrorDeleteChannelMessage(response *smithyhttp.Re case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -7271,14 +7318,63 @@ func awsRestjson1_deserializeOpErrorDeleteChannelMessage(response *smithyhttp.Re } } -type awsRestjson1_deserializeOpDeleteChannelModerator struct { +func awsRestjson1_deserializeOpDocumentPutRetentionSettingsOutput(v **PutRetentionSettingsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *PutRetentionSettingsOutput + if *v == nil { + sv = &PutRetentionSettingsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "InitiateDeletionTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.InitiateDeletionTimestamp = ptr.Time(t) + } + + case "RetentionSettings": + if err := awsRestjson1_deserializeDocumentRetentionSettings(&sv.RetentionSettings, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRedactConversationMessage struct { } -func (*awsRestjson1_deserializeOpDeleteChannelModerator) ID() string { +func (*awsRestjson1_deserializeOpRedactConversationMessage) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteChannelModerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRedactConversationMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7296,22 +7392,16 @@ func (m *awsRestjson1_deserializeOpDeleteChannelModerator) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteChannelModerator(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRedactConversationMessage(response, &metadata) } - output := &DeleteChannelModeratorOutput{} + output := &RedactConversationMessageOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteChannelModerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRedactConversationMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7358,6 +7448,9 @@ func awsRestjson1_deserializeOpErrorDeleteChannelModerator(response *smithyhttp. case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -7380,14 +7473,14 @@ func awsRestjson1_deserializeOpErrorDeleteChannelModerator(response *smithyhttp. } } -type awsRestjson1_deserializeOpDeleteEventsConfiguration struct { +type awsRestjson1_deserializeOpRedactRoomMessage struct { } -func (*awsRestjson1_deserializeOpDeleteEventsConfiguration) ID() string { +func (*awsRestjson1_deserializeOpRedactRoomMessage) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteEventsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRedactRoomMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7405,22 +7498,16 @@ func (m *awsRestjson1_deserializeOpDeleteEventsConfiguration) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteEventsConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRedactRoomMessage(response, &metadata) } - output := &DeleteEventsConfigurationOutput{} + output := &RedactRoomMessageOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteEventsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRedactRoomMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7467,8 +7554,8 @@ func awsRestjson1_deserializeOpErrorDeleteEventsConfiguration(response *smithyht case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -7476,6 +7563,9 @@ func awsRestjson1_deserializeOpErrorDeleteEventsConfiguration(response *smithyht case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + case strings.EqualFold("UnauthorizedClientException", errorCode): return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) @@ -7489,14 +7579,14 @@ func awsRestjson1_deserializeOpErrorDeleteEventsConfiguration(response *smithyht } } -type awsRestjson1_deserializeOpDeleteMediaCapturePipeline struct { +type awsRestjson1_deserializeOpRegenerateSecurityToken struct { } -func (*awsRestjson1_deserializeOpDeleteMediaCapturePipeline) ID() string { +func (*awsRestjson1_deserializeOpRegenerateSecurityToken) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMediaCapturePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRegenerateSecurityToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7514,14 +7604,36 @@ func (m *awsRestjson1_deserializeOpDeleteMediaCapturePipeline) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMediaCapturePipeline(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRegenerateSecurityToken(response, &metadata) } - output := &DeleteMediaCapturePipelineOutput{} + output := &RegenerateSecurityTokenOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentRegenerateSecurityTokenOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -7529,7 +7641,7 @@ func (m *awsRestjson1_deserializeOpDeleteMediaCapturePipeline) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMediaCapturePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRegenerateSecurityToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7601,14 +7713,50 @@ func awsRestjson1_deserializeOpErrorDeleteMediaCapturePipeline(response *smithyh } } -type awsRestjson1_deserializeOpDeleteMeeting struct { +func awsRestjson1_deserializeOpDocumentRegenerateSecurityTokenOutput(v **RegenerateSecurityTokenOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RegenerateSecurityTokenOutput + if *v == nil { + sv = &RegenerateSecurityTokenOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Bot": + if err := awsRestjson1_deserializeDocumentBot(&sv.Bot, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpResetPersonalPIN struct { } -func (*awsRestjson1_deserializeOpDeleteMeeting) ID() string { +func (*awsRestjson1_deserializeOpResetPersonalPIN) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteMeeting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpResetPersonalPIN) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7626,14 +7774,36 @@ func (m *awsRestjson1_deserializeOpDeleteMeeting) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteMeeting(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorResetPersonalPIN(response, &metadata) } - output := &DeleteMeetingOutput{} + output := &ResetPersonalPINOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentResetPersonalPINOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -7641,7 +7811,7 @@ func (m *awsRestjson1_deserializeOpDeleteMeeting) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteMeeting(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorResetPersonalPIN(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7713,14 +7883,50 @@ func awsRestjson1_deserializeOpErrorDeleteMeeting(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeletePhoneNumber struct { +func awsRestjson1_deserializeOpDocumentResetPersonalPINOutput(v **ResetPersonalPINOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ResetPersonalPINOutput + if *v == nil { + sv = &ResetPersonalPINOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeletePhoneNumber) ID() string { +type awsRestjson1_deserializeOpRestorePhoneNumber struct { +} + +func (*awsRestjson1_deserializeOpRestorePhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeletePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRestorePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7738,14 +7944,36 @@ func (m *awsRestjson1_deserializeOpDeletePhoneNumber) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeletePhoneNumber(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRestorePhoneNumber(response, &metadata) } - output := &DeletePhoneNumberOutput{} + output := &RestorePhoneNumberOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentRestorePhoneNumberOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -7753,7 +7981,7 @@ func (m *awsRestjson1_deserializeOpDeletePhoneNumber) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeletePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRestorePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7803,6 +8031,9 @@ func awsRestjson1_deserializeOpErrorDeletePhoneNumber(response *smithyhttp.Respo case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ResourceLimitExceededException", errorCode): + return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) + case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -7825,14 +8056,50 @@ func awsRestjson1_deserializeOpErrorDeletePhoneNumber(response *smithyhttp.Respo } } -type awsRestjson1_deserializeOpDeleteProxySession struct { +func awsRestjson1_deserializeOpDocumentRestorePhoneNumberOutput(v **RestorePhoneNumberOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RestorePhoneNumberOutput + if *v == nil { + sv = &RestorePhoneNumberOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PhoneNumber": + if err := awsRestjson1_deserializeDocumentPhoneNumber(&sv.PhoneNumber, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpSearchAvailablePhoneNumbers struct { } -func (*awsRestjson1_deserializeOpDeleteProxySession) ID() string { +func (*awsRestjson1_deserializeOpSearchAvailablePhoneNumbers) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteProxySession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpSearchAvailablePhoneNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7850,22 +8117,44 @@ func (m *awsRestjson1_deserializeOpDeleteProxySession) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteProxySession(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorSearchAvailablePhoneNumbers(response, &metadata) } - output := &DeleteProxySessionOutput{} + output := &SearchAvailablePhoneNumbersOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return out, metadata, err } - span.End() - return out, metadata, err -} + err = awsRestjson1_deserializeOpDocumentSearchAvailablePhoneNumbersOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() + return out, metadata, err +} -func awsRestjson1_deserializeOpErrorDeleteProxySession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorSearchAvailablePhoneNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7906,15 +8195,15 @@ func awsRestjson1_deserializeOpErrorDeleteProxySession(response *smithyhttp.Resp } switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -7937,14 +8226,59 @@ func awsRestjson1_deserializeOpErrorDeleteProxySession(response *smithyhttp.Resp } } -type awsRestjson1_deserializeOpDeleteRoom struct { +func awsRestjson1_deserializeOpDocumentSearchAvailablePhoneNumbersOutput(v **SearchAvailablePhoneNumbersOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *SearchAvailablePhoneNumbersOutput + if *v == nil { + sv = &SearchAvailablePhoneNumbersOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "E164PhoneNumbers": + if err := awsRestjson1_deserializeDocumentE164PhoneNumberList(&sv.E164PhoneNumbers, value); err != nil { + return err + } + + case "NextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteRoom) ID() string { +type awsRestjson1_deserializeOpUpdateAccount struct { +} + +func (*awsRestjson1_deserializeOpUpdateAccount) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7962,14 +8296,36 @@ func (m *awsRestjson1_deserializeOpDeleteRoom) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoom(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccount(response, &metadata) } - output := &DeleteRoomOutput{} + output := &UpdateAccountOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateAccountOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -7977,7 +8333,7 @@ func (m *awsRestjson1_deserializeOpDeleteRoom) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8049,14 +8405,50 @@ func awsRestjson1_deserializeOpErrorDeleteRoom(response *smithyhttp.Response, me } } -type awsRestjson1_deserializeOpDeleteRoomMembership struct { +func awsRestjson1_deserializeOpDocumentUpdateAccountOutput(v **UpdateAccountOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateAccountOutput + if *v == nil { + sv = &UpdateAccountOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Account": + if err := awsRestjson1_deserializeDocumentAccount(&sv.Account, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpDeleteRoomMembership) ID() string { +type awsRestjson1_deserializeOpUpdateAccountSettings struct { +} + +func (*awsRestjson1_deserializeOpUpdateAccountSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteRoomMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8074,22 +8466,16 @@ func (m *awsRestjson1_deserializeOpDeleteRoomMembership) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteRoomMembership(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountSettings(response, &metadata) } - output := &DeleteRoomMembershipOutput{} + output := &UpdateAccountSettingsOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteRoomMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8133,6 +8519,9 @@ func awsRestjson1_deserializeOpErrorDeleteRoomMembership(response *smithyhttp.Re case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -8161,14 +8550,14 @@ func awsRestjson1_deserializeOpErrorDeleteRoomMembership(response *smithyhttp.Re } } -type awsRestjson1_deserializeOpDeleteSipMediaApplication struct { +type awsRestjson1_deserializeOpUpdateBot struct { } -func (*awsRestjson1_deserializeOpDeleteSipMediaApplication) ID() string { +func (*awsRestjson1_deserializeOpUpdateBot) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSipMediaApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateBot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8186,14 +8575,36 @@ func (m *awsRestjson1_deserializeOpDeleteSipMediaApplication) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSipMediaApplication(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateBot(response, &metadata) } - output := &DeleteSipMediaApplicationOutput{} + output := &UpdateBotOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateBotOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -8201,7 +8612,7 @@ func (m *awsRestjson1_deserializeOpDeleteSipMediaApplication) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSipMediaApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateBot(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8245,9 +8656,6 @@ func awsRestjson1_deserializeOpErrorDeleteSipMediaApplication(response *smithyht case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -8276,14 +8684,50 @@ func awsRestjson1_deserializeOpErrorDeleteSipMediaApplication(response *smithyht } } -type awsRestjson1_deserializeOpDeleteSipRule struct { +func awsRestjson1_deserializeOpDocumentUpdateBotOutput(v **UpdateBotOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateBotOutput + if *v == nil { + sv = &UpdateBotOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Bot": + if err := awsRestjson1_deserializeDocumentBot(&sv.Bot, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateGlobalSettings struct { } -func (*awsRestjson1_deserializeOpDeleteSipRule) ID() string { +func (*awsRestjson1_deserializeOpUpdateGlobalSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteSipRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateGlobalSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8301,9 +8745,9 @@ func (m *awsRestjson1_deserializeOpDeleteSipRule) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteSipRule(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateGlobalSettings(response, &metadata) } - output := &DeleteSipRuleOutput{} + output := &UpdateGlobalSettingsOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8316,7 +8760,7 @@ func (m *awsRestjson1_deserializeOpDeleteSipRule) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteSipRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateGlobalSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8360,15 +8804,9 @@ func awsRestjson1_deserializeOpErrorDeleteSipRule(response *smithyhttp.Response, case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -8391,14 +8829,14 @@ func awsRestjson1_deserializeOpErrorDeleteSipRule(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpDeleteVoiceConnector struct { +type awsRestjson1_deserializeOpUpdatePhoneNumber struct { } -func (*awsRestjson1_deserializeOpDeleteVoiceConnector) ID() string { +func (*awsRestjson1_deserializeOpUpdatePhoneNumber) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVoiceConnector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8416,22 +8854,44 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnector) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVoiceConnector(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response, &metadata) } - output := &DeleteVoiceConnectorOutput{} + output := &UpdatePhoneNumberOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - span.End() + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + span.End() return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVoiceConnector(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8506,14 +8966,50 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnector(response *smithyhttp.Re } } -type awsRestjson1_deserializeOpDeleteVoiceConnectorEmergencyCallingConfiguration struct { +func awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(v **UpdatePhoneNumberOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdatePhoneNumberOutput + if *v == nil { + sv = &UpdatePhoneNumberOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "PhoneNumber": + if err := awsRestjson1_deserializeDocumentPhoneNumber(&sv.PhoneNumber, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdatePhoneNumberSettings struct { } -func (*awsRestjson1_deserializeOpDeleteVoiceConnectorEmergencyCallingConfiguration) ID() string { +func (*awsRestjson1_deserializeOpUpdatePhoneNumberSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorEmergencyCallingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdatePhoneNumberSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8531,9 +9027,9 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorEmergencyCallingConfigura } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVoiceConnectorEmergencyCallingConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdatePhoneNumberSettings(response, &metadata) } - output := &DeleteVoiceConnectorEmergencyCallingConfigurationOutput{} + output := &UpdatePhoneNumberSettingsOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -8546,7 +9042,7 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorEmergencyCallingConfigura return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorEmergencyCallingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdatePhoneNumberSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8593,9 +9089,6 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorEmergencyCallingConfigur case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceFailureException", errorCode): return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) @@ -8618,14 +9111,14 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorEmergencyCallingConfigur } } -type awsRestjson1_deserializeOpDeleteVoiceConnectorGroup struct { +type awsRestjson1_deserializeOpUpdateRoom struct { } -func (*awsRestjson1_deserializeOpDeleteVoiceConnectorGroup) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoom) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8643,14 +9136,36 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorGroup) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVoiceConnectorGroup(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoom(response, &metadata) } - output := &DeleteVoiceConnectorGroupOutput{} + output := &UpdateRoomOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateRoomOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -8658,7 +9173,7 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorGroup) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8702,9 +9217,6 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorGroup(response *smithyht case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) @@ -8733,14 +9245,50 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorGroup(response *smithyht } } -type awsRestjson1_deserializeOpDeleteVoiceConnectorOrigination struct { +func awsRestjson1_deserializeOpDocumentUpdateRoomOutput(v **UpdateRoomOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateRoomOutput + if *v == nil { + sv = &UpdateRoomOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Room": + if err := awsRestjson1_deserializeDocumentRoom(&sv.Room, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateRoomMembership struct { } -func (*awsRestjson1_deserializeOpDeleteVoiceConnectorOrigination) ID() string { +func (*awsRestjson1_deserializeOpUpdateRoomMembership) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorOrigination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateRoomMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8758,14 +9306,36 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorOrigination) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVoiceConnectorOrigination(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoomMembership(response, &metadata) } - output := &DeleteVoiceConnectorOriginationOutput{} + output := &UpdateRoomMembershipOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateRoomMembershipOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -8773,7 +9343,7 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorOrigination) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorOrigination(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateRoomMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8845,14 +9415,50 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorOrigination(response *sm } } -type awsRestjson1_deserializeOpDeleteVoiceConnectorProxy struct { +func awsRestjson1_deserializeOpDocumentUpdateRoomMembershipOutput(v **UpdateRoomMembershipOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateRoomMembershipOutput + if *v == nil { + sv = &UpdateRoomMembershipOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "RoomMembership": + if err := awsRestjson1_deserializeDocumentRoomMembership(&sv.RoomMembership, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateUser struct { } -func (*awsRestjson1_deserializeOpDeleteVoiceConnectorProxy) ID() string { +func (*awsRestjson1_deserializeOpUpdateUser) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorProxy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8870,14 +9476,36 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorProxy) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVoiceConnectorProxy(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUser(response, &metadata) } - output := &DeleteVoiceConnectorProxyOutput{} + output := &UpdateUserOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentUpdateUserOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), } } @@ -8885,7 +9513,7 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorProxy) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorProxy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8957,126 +9585,50 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorProxy(response *smithyht } } -type awsRestjson1_deserializeOpDeleteVoiceConnectorStreamingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpDeleteVoiceConnectorStreamingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorStreamingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err +func awsRestjson1_deserializeOpDocumentUpdateUserOutput(v **UpdateUserOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVoiceConnectorStreamingConfiguration(response, &metadata) - } - output := &DeleteVoiceConnectorStreamingConfigurationOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorStreamingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) + if value == nil { + return nil } - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message + var sv *UpdateUserOutput + if *v == nil { + sv = &UpdateUserOutput{} + } else { + sv = *v } - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + for key, value := range shape { + switch key { + case "User": + if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { + return err + } - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpDeleteVoiceConnectorTermination struct { +type awsRestjson1_deserializeOpUpdateUserSettings struct { } -func (*awsRestjson1_deserializeOpDeleteVoiceConnectorTermination) ID() string { +func (*awsRestjson1_deserializeOpUpdateUserSettings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorTermination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateUserSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9094,9 +9646,9 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorTermination) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVoiceConnectorTermination(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserSettings(response, &metadata) } - output := &DeleteVoiceConnectorTerminationOutput{} + output := &UpdateUserSettingsOutput{} out.Result = output if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { @@ -9109,7 +9661,7 @@ func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorTermination) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorTermination(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateUserSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9181,69 +9733,16 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorTermination(response *sm } } -type awsRestjson1_deserializeOpDeleteVoiceConnectorTerminationCredentials struct { -} - -func (*awsRestjson1_deserializeOpDeleteVoiceConnectorTerminationCredentials) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDeleteVoiceConnectorTerminationCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteVoiceConnectorTerminationCredentials(response, &metadata) - } - output := &DeleteVoiceConnectorTerminationCredentialsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorTerminationCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -9253,81 +9752,29 @@ func awsRestjson1_deserializeOpErrorDeleteVoiceConnectorTerminationCredentials(r return err } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } - return genericError - + return err } -} -type awsRestjson1_deserializeOpDescribeAppInstance struct { -} + errorBody.Seek(0, io.SeekStart) -func (*awsRestjson1_deserializeOpDescribeAppInstance) ID() string { - return "OperationDeserializer" + return output } -func (m *awsRestjson1_deserializeOpDescribeAppInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAppInstance(response, &metadata) - } - output := &DescribeAppInstanceOutput{} - out.Result = output - +func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.BadRequestException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -9338,46 +9785,36 @@ func (m *awsRestjson1_deserializeOpDescribeAppInstance) HandleDeserialize(ctx co Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return out, metadata, err + return err } - err = awsRestjson1_deserializeOpDocumentDescribeAppInstanceOutput(&output, shape) + err := awsRestjson1_deserializeDocumentBadRequestException(&output, shape) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } + return err } - span.End() - return out, metadata, err + errorBody.Seek(0, io.SeekStart) + + return output } -func awsRestjson1_deserializeOpErrorDescribeAppInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - +func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ConflictException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -9387,114 +9824,137 @@ func awsRestjson1_deserializeOpErrorDescribeAppInstance(response *smithyhttp.Res return err } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } + err := awsRestjson1_deserializeDocumentConflictException(&output, shape) - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + errorBody.Seek(0, io.SeekStart) - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + return output +} - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) +func awsRestjson1_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ForbiddenException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + err := awsRestjson1_deserializeDocumentForbiddenException(&output, shape) - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } - return genericError - + return err } + + errorBody.Seek(0, io.SeekStart) + + return output } -func awsRestjson1_deserializeOpDocumentDescribeAppInstanceOutput(v **DescribeAppInstanceOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } +func awsRestjson1_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.NotFoundException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - var sv *DescribeAppInstanceOutput - if *v == nil { - sv = &DescribeAppInstanceOutput{} - } else { - sv = *v + err := awsRestjson1_deserializeDocumentNotFoundException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - for key, value := range shape { - switch key { - case "AppInstance": - if err := awsRestjson1_deserializeDocumentAppInstance(&sv.AppInstance, value); err != nil { - return err - } + errorBody.Seek(0, io.SeekStart) - default: - _, _ = key, value + return output +} + +func awsRestjson1_deserializeErrorResourceLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceLimitExceededException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } + return err } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeAppInstanceAdmin struct { -} -func (*awsRestjson1_deserializeOpDescribeAppInstanceAdmin) ID() string { - return "OperationDeserializer" -} + err := awsRestjson1_deserializeDocumentResourceLimitExceededException(&output, shape) -func (m *awsRestjson1_deserializeOpDescribeAppInstanceAdmin) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - return out, metadata, err + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } + errorBody.Seek(0, io.SeekStart) - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAppInstanceAdmin(response, &metadata) - } - output := &DescribeAppInstanceAdminOutput{} - out.Result = output + return output +} +func awsRestjson1_deserializeErrorServiceFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceFailureException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -9505,45 +9965,83 @@ func (m *awsRestjson1_deserializeOpDescribeAppInstanceAdmin) HandleDeserialize(c Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return out, metadata, err + return err } - err = awsRestjson1_deserializeOpDocumentDescribeAppInstanceAdminOutput(&output, shape) + err := awsRestjson1_deserializeDocumentServiceFailureException(&output, shape) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } + return err } - span.End() - return out, metadata, err + errorBody.Seek(0, io.SeekStart) + + return output } -func awsRestjson1_deserializeOpErrorDescribeAppInstanceAdmin(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} +func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceUnavailableException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - errorCode := "UnknownError" - errorMessage := errorCode + err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeErrorThrottledClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottledClientException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentThrottledClientException(&output, shape) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9555,113 +10053,16 @@ func awsRestjson1_deserializeOpErrorDescribeAppInstanceAdmin(response *smithyhtt } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDescribeAppInstanceAdminOutput(v **DescribeAppInstanceAdminOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeAppInstanceAdminOutput - if *v == nil { - sv = &DescribeAppInstanceAdminOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceAdmin": - if err := awsRestjson1_deserializeDocumentAppInstanceAdmin(&sv.AppInstanceAdmin, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} -type awsRestjson1_deserializeOpDescribeAppInstanceUser struct { -} - -func (*awsRestjson1_deserializeOpDescribeAppInstanceUser) ID() string { - return "OperationDeserializer" + return output } -func (m *awsRestjson1_deserializeOpDescribeAppInstanceUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeAppInstanceUser(response, &metadata) - } - output := &DescribeAppInstanceUserOutput{} - out.Result = output - +func awsRestjson1_deserializeErrorUnauthorizedClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnauthorizedClientException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -9672,45 +10073,11 @@ func (m *awsRestjson1_deserializeOpDescribeAppInstanceUser) HandleDeserialize(ct Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDescribeAppInstanceUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDescribeAppInstanceUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) + return err } - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + err := awsRestjson1_deserializeDocumentUnauthorizedClientException(&output, shape) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9722,113 +10089,16 @@ func awsRestjson1_deserializeOpErrorDescribeAppInstanceUser(response *smithyhttp } errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDescribeAppInstanceUserOutput(v **DescribeAppInstanceUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeAppInstanceUserOutput - if *v == nil { - sv = &DescribeAppInstanceUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceUser": - if err := awsRestjson1_deserializeDocumentAppInstanceUser(&sv.AppInstanceUser, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeChannel struct { -} -func (*awsRestjson1_deserializeOpDescribeChannel) ID() string { - return "OperationDeserializer" + return output } -func (m *awsRestjson1_deserializeOpDescribeChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeChannel(response, &metadata) - } - output := &DescribeChannelOutput{} - out.Result = output - +func awsRestjson1_deserializeErrorUnprocessableEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UnprocessableEntityException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -9839,26176 +10109,27 @@ func (m *awsRestjson1_deserializeOpDescribeChannel) HandleDeserialize(ctx contex Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDescribeChannelOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDescribeChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDescribeChannelOutput(v **DescribeChannelOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeChannelOutput - if *v == nil { - sv = &DescribeChannelOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Channel": - if err := awsRestjson1_deserializeDocumentChannel(&sv.Channel, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeChannelBan struct { -} - -func (*awsRestjson1_deserializeOpDescribeChannelBan) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDescribeChannelBan) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeChannelBan(response, &metadata) - } - output := &DescribeChannelBanOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDescribeChannelBanOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDescribeChannelBan(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDescribeChannelBanOutput(v **DescribeChannelBanOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeChannelBanOutput - if *v == nil { - sv = &DescribeChannelBanOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelBan": - if err := awsRestjson1_deserializeDocumentChannelBan(&sv.ChannelBan, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeChannelMembership struct { -} - -func (*awsRestjson1_deserializeOpDescribeChannelMembership) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDescribeChannelMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeChannelMembership(response, &metadata) - } - output := &DescribeChannelMembershipOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDescribeChannelMembershipOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDescribeChannelMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDescribeChannelMembershipOutput(v **DescribeChannelMembershipOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeChannelMembershipOutput - if *v == nil { - sv = &DescribeChannelMembershipOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelMembership": - if err := awsRestjson1_deserializeDocumentChannelMembership(&sv.ChannelMembership, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeChannelMembershipForAppInstanceUser struct { -} - -func (*awsRestjson1_deserializeOpDescribeChannelMembershipForAppInstanceUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDescribeChannelMembershipForAppInstanceUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeChannelMembershipForAppInstanceUser(response, &metadata) - } - output := &DescribeChannelMembershipForAppInstanceUserOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDescribeChannelMembershipForAppInstanceUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDescribeChannelMembershipForAppInstanceUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDescribeChannelMembershipForAppInstanceUserOutput(v **DescribeChannelMembershipForAppInstanceUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeChannelMembershipForAppInstanceUserOutput - if *v == nil { - sv = &DescribeChannelMembershipForAppInstanceUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelMembership": - if err := awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummary(&sv.ChannelMembership, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeChannelModeratedByAppInstanceUser struct { -} - -func (*awsRestjson1_deserializeOpDescribeChannelModeratedByAppInstanceUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDescribeChannelModeratedByAppInstanceUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeChannelModeratedByAppInstanceUser(response, &metadata) - } - output := &DescribeChannelModeratedByAppInstanceUserOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDescribeChannelModeratedByAppInstanceUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDescribeChannelModeratedByAppInstanceUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDescribeChannelModeratedByAppInstanceUserOutput(v **DescribeChannelModeratedByAppInstanceUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeChannelModeratedByAppInstanceUserOutput - if *v == nil { - sv = &DescribeChannelModeratedByAppInstanceUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Channel": - if err := awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummary(&sv.Channel, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDescribeChannelModerator struct { -} - -func (*awsRestjson1_deserializeOpDescribeChannelModerator) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDescribeChannelModerator) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeChannelModerator(response, &metadata) - } - output := &DescribeChannelModeratorOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDescribeChannelModeratorOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDescribeChannelModerator(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDescribeChannelModeratorOutput(v **DescribeChannelModeratorOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeChannelModeratorOutput - if *v == nil { - sv = &DescribeChannelModeratorOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelModerator": - if err := awsRestjson1_deserializeDocumentChannelModerator(&sv.ChannelModerator, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDisassociatePhoneNumberFromUser struct { -} - -func (*awsRestjson1_deserializeOpDisassociatePhoneNumberFromUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDisassociatePhoneNumberFromUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociatePhoneNumberFromUser(response, &metadata) - } - output := &DisassociatePhoneNumberFromUserOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDisassociatePhoneNumberFromUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpDisassociatePhoneNumbersFromVoiceConnector struct { -} - -func (*awsRestjson1_deserializeOpDisassociatePhoneNumbersFromVoiceConnector) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDisassociatePhoneNumbersFromVoiceConnector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociatePhoneNumbersFromVoiceConnector(response, &metadata) - } - output := &DisassociatePhoneNumbersFromVoiceConnectorOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDisassociatePhoneNumbersFromVoiceConnectorOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDisassociatePhoneNumbersFromVoiceConnector(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDisassociatePhoneNumbersFromVoiceConnectorOutput(v **DisassociatePhoneNumbersFromVoiceConnectorOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DisassociatePhoneNumbersFromVoiceConnectorOutput - if *v == nil { - sv = &DisassociatePhoneNumbersFromVoiceConnectorOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumberErrors": - if err := awsRestjson1_deserializeDocumentPhoneNumberErrorList(&sv.PhoneNumberErrors, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDisassociatePhoneNumbersFromVoiceConnectorGroup struct { -} - -func (*awsRestjson1_deserializeOpDisassociatePhoneNumbersFromVoiceConnectorGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDisassociatePhoneNumbersFromVoiceConnectorGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociatePhoneNumbersFromVoiceConnectorGroup(response, &metadata) - } - output := &DisassociatePhoneNumbersFromVoiceConnectorGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentDisassociatePhoneNumbersFromVoiceConnectorGroupOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDisassociatePhoneNumbersFromVoiceConnectorGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentDisassociatePhoneNumbersFromVoiceConnectorGroupOutput(v **DisassociatePhoneNumbersFromVoiceConnectorGroupOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DisassociatePhoneNumbersFromVoiceConnectorGroupOutput - if *v == nil { - sv = &DisassociatePhoneNumbersFromVoiceConnectorGroupOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumberErrors": - if err := awsRestjson1_deserializeDocumentPhoneNumberErrorList(&sv.PhoneNumberErrors, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpDisassociateSigninDelegateGroupsFromAccount struct { -} - -func (*awsRestjson1_deserializeOpDisassociateSigninDelegateGroupsFromAccount) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpDisassociateSigninDelegateGroupsFromAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDisassociateSigninDelegateGroupsFromAccount(response, &metadata) - } - output := &DisassociateSigninDelegateGroupsFromAccountOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorDisassociateSigninDelegateGroupsFromAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpGetAccount struct { -} - -func (*awsRestjson1_deserializeOpGetAccount) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAccount(response, &metadata) - } - output := &GetAccountOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetAccountOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetAccountOutput(v **GetAccountOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetAccountOutput - if *v == nil { - sv = &GetAccountOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Account": - if err := awsRestjson1_deserializeDocumentAccount(&sv.Account, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetAccountSettings struct { -} - -func (*awsRestjson1_deserializeOpGetAccountSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAccountSettings(response, &metadata) - } - output := &GetAccountSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetAccountSettingsOutput(v **GetAccountSettingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetAccountSettingsOutput - if *v == nil { - sv = &GetAccountSettingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AccountSettings": - if err := awsRestjson1_deserializeDocumentAccountSettings(&sv.AccountSettings, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetAppInstanceRetentionSettings struct { -} - -func (*awsRestjson1_deserializeOpGetAppInstanceRetentionSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetAppInstanceRetentionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAppInstanceRetentionSettings(response, &metadata) - } - output := &GetAppInstanceRetentionSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetAppInstanceRetentionSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetAppInstanceRetentionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetAppInstanceRetentionSettingsOutput(v **GetAppInstanceRetentionSettingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetAppInstanceRetentionSettingsOutput - if *v == nil { - sv = &GetAppInstanceRetentionSettingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceRetentionSettings": - if err := awsRestjson1_deserializeDocumentAppInstanceRetentionSettings(&sv.AppInstanceRetentionSettings, value); err != nil { - return err - } - - case "InitiateDeletionTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.InitiateDeletionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetAppInstanceStreamingConfigurations struct { -} - -func (*awsRestjson1_deserializeOpGetAppInstanceStreamingConfigurations) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetAppInstanceStreamingConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAppInstanceStreamingConfigurations(response, &metadata) - } - output := &GetAppInstanceStreamingConfigurationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetAppInstanceStreamingConfigurationsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetAppInstanceStreamingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetAppInstanceStreamingConfigurationsOutput(v **GetAppInstanceStreamingConfigurationsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetAppInstanceStreamingConfigurationsOutput - if *v == nil { - sv = &GetAppInstanceStreamingConfigurationsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceStreamingConfigurations": - if err := awsRestjson1_deserializeDocumentAppInstanceStreamingConfigurationList(&sv.AppInstanceStreamingConfigurations, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetAttendee struct { -} - -func (*awsRestjson1_deserializeOpGetAttendee) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetAttendee) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetAttendee(response, &metadata) - } - output := &GetAttendeeOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetAttendeeOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetAttendee(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetAttendeeOutput(v **GetAttendeeOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetAttendeeOutput - if *v == nil { - sv = &GetAttendeeOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Attendee": - if err := awsRestjson1_deserializeDocumentAttendee(&sv.Attendee, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetBot struct { -} - -func (*awsRestjson1_deserializeOpGetBot) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetBot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetBot(response, &metadata) - } - output := &GetBotOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetBotOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetBot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetBotOutput(v **GetBotOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetBotOutput - if *v == nil { - sv = &GetBotOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Bot": - if err := awsRestjson1_deserializeDocumentBot(&sv.Bot, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetChannelMessage struct { -} - -func (*awsRestjson1_deserializeOpGetChannelMessage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetChannelMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetChannelMessage(response, &metadata) - } - output := &GetChannelMessageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetChannelMessageOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetChannelMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetChannelMessageOutput(v **GetChannelMessageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetChannelMessageOutput - if *v == nil { - sv = &GetChannelMessageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelMessage": - if err := awsRestjson1_deserializeDocumentChannelMessage(&sv.ChannelMessage, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetEventsConfiguration struct { -} - -func (*awsRestjson1_deserializeOpGetEventsConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetEventsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetEventsConfiguration(response, &metadata) - } - output := &GetEventsConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetEventsConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetEventsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetEventsConfigurationOutput(v **GetEventsConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetEventsConfigurationOutput - if *v == nil { - sv = &GetEventsConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EventsConfiguration": - if err := awsRestjson1_deserializeDocumentEventsConfiguration(&sv.EventsConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetGlobalSettings struct { -} - -func (*awsRestjson1_deserializeOpGetGlobalSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetGlobalSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetGlobalSettings(response, &metadata) - } - output := &GetGlobalSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetGlobalSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetGlobalSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetGlobalSettingsOutput(v **GetGlobalSettingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetGlobalSettingsOutput - if *v == nil { - sv = &GetGlobalSettingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "BusinessCalling": - if err := awsRestjson1_deserializeDocumentBusinessCallingSettings(&sv.BusinessCalling, value); err != nil { - return err - } - - case "VoiceConnector": - if err := awsRestjson1_deserializeDocumentVoiceConnectorSettings(&sv.VoiceConnector, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetMediaCapturePipeline struct { -} - -func (*awsRestjson1_deserializeOpGetMediaCapturePipeline) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetMediaCapturePipeline) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMediaCapturePipeline(response, &metadata) - } - output := &GetMediaCapturePipelineOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetMediaCapturePipelineOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetMediaCapturePipeline(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetMediaCapturePipelineOutput(v **GetMediaCapturePipelineOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetMediaCapturePipelineOutput - if *v == nil { - sv = &GetMediaCapturePipelineOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "MediaCapturePipeline": - if err := awsRestjson1_deserializeDocumentMediaCapturePipeline(&sv.MediaCapturePipeline, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetMeeting struct { -} - -func (*awsRestjson1_deserializeOpGetMeeting) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetMeeting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMeeting(response, &metadata) - } - output := &GetMeetingOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetMeetingOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetMeeting(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetMeetingOutput(v **GetMeetingOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetMeetingOutput - if *v == nil { - sv = &GetMeetingOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Meeting": - if err := awsRestjson1_deserializeDocumentMeeting(&sv.Meeting, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetMessagingSessionEndpoint struct { -} - -func (*awsRestjson1_deserializeOpGetMessagingSessionEndpoint) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetMessagingSessionEndpoint) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetMessagingSessionEndpoint(response, &metadata) - } - output := &GetMessagingSessionEndpointOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetMessagingSessionEndpointOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetMessagingSessionEndpoint(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetMessagingSessionEndpointOutput(v **GetMessagingSessionEndpointOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetMessagingSessionEndpointOutput - if *v == nil { - sv = &GetMessagingSessionEndpointOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Endpoint": - if err := awsRestjson1_deserializeDocumentMessagingSessionEndpoint(&sv.Endpoint, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetPhoneNumber struct { -} - -func (*awsRestjson1_deserializeOpGetPhoneNumber) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetPhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetPhoneNumber(response, &metadata) - } - output := &GetPhoneNumberOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetPhoneNumberOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetPhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetPhoneNumberOutput(v **GetPhoneNumberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetPhoneNumberOutput - if *v == nil { - sv = &GetPhoneNumberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumber": - if err := awsRestjson1_deserializeDocumentPhoneNumber(&sv.PhoneNumber, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetPhoneNumberOrder struct { -} - -func (*awsRestjson1_deserializeOpGetPhoneNumberOrder) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetPhoneNumberOrder) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetPhoneNumberOrder(response, &metadata) - } - output := &GetPhoneNumberOrderOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetPhoneNumberOrderOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetPhoneNumberOrder(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetPhoneNumberOrderOutput(v **GetPhoneNumberOrderOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetPhoneNumberOrderOutput - if *v == nil { - sv = &GetPhoneNumberOrderOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumberOrder": - if err := awsRestjson1_deserializeDocumentPhoneNumberOrder(&sv.PhoneNumberOrder, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetPhoneNumberSettings struct { -} - -func (*awsRestjson1_deserializeOpGetPhoneNumberSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetPhoneNumberSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetPhoneNumberSettings(response, &metadata) - } - output := &GetPhoneNumberSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetPhoneNumberSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetPhoneNumberSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetPhoneNumberSettingsOutput(v **GetPhoneNumberSettingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetPhoneNumberSettingsOutput - if *v == nil { - sv = &GetPhoneNumberSettingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "CallingName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CallingName to be of type string, got %T instead", value) - } - sv.CallingName = ptr.String(jtv) - } - - case "CallingNameUpdatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CallingNameUpdatedTimestamp = ptr.Time(t) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetProxySession struct { -} - -func (*awsRestjson1_deserializeOpGetProxySession) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetProxySession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetProxySession(response, &metadata) - } - output := &GetProxySessionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetProxySessionOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetProxySession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetProxySessionOutput(v **GetProxySessionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetProxySessionOutput - if *v == nil { - sv = &GetProxySessionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ProxySession": - if err := awsRestjson1_deserializeDocumentProxySession(&sv.ProxySession, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetRetentionSettings struct { -} - -func (*awsRestjson1_deserializeOpGetRetentionSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetRetentionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetRetentionSettings(response, &metadata) - } - output := &GetRetentionSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetRetentionSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetRetentionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetRetentionSettingsOutput(v **GetRetentionSettingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetRetentionSettingsOutput - if *v == nil { - sv = &GetRetentionSettingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "InitiateDeletionTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.InitiateDeletionTimestamp = ptr.Time(t) - } - - case "RetentionSettings": - if err := awsRestjson1_deserializeDocumentRetentionSettings(&sv.RetentionSettings, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetRoom struct { -} - -func (*awsRestjson1_deserializeOpGetRoom) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetRoom(response, &metadata) - } - output := &GetRoomOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetRoomOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetRoomOutput(v **GetRoomOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetRoomOutput - if *v == nil { - sv = &GetRoomOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Room": - if err := awsRestjson1_deserializeDocumentRoom(&sv.Room, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetSipMediaApplication struct { -} - -func (*awsRestjson1_deserializeOpGetSipMediaApplication) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetSipMediaApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSipMediaApplication(response, &metadata) - } - output := &GetSipMediaApplicationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetSipMediaApplicationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetSipMediaApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetSipMediaApplicationOutput(v **GetSipMediaApplicationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetSipMediaApplicationOutput - if *v == nil { - sv = &GetSipMediaApplicationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "SipMediaApplication": - if err := awsRestjson1_deserializeDocumentSipMediaApplication(&sv.SipMediaApplication, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetSipMediaApplicationLoggingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpGetSipMediaApplicationLoggingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetSipMediaApplicationLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSipMediaApplicationLoggingConfiguration(response, &metadata) - } - output := &GetSipMediaApplicationLoggingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetSipMediaApplicationLoggingConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetSipMediaApplicationLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetSipMediaApplicationLoggingConfigurationOutput(v **GetSipMediaApplicationLoggingConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetSipMediaApplicationLoggingConfigurationOutput - if *v == nil { - sv = &GetSipMediaApplicationLoggingConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "SipMediaApplicationLoggingConfiguration": - if err := awsRestjson1_deserializeDocumentSipMediaApplicationLoggingConfiguration(&sv.SipMediaApplicationLoggingConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetSipRule struct { -} - -func (*awsRestjson1_deserializeOpGetSipRule) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetSipRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSipRule(response, &metadata) - } - output := &GetSipRuleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetSipRuleOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetSipRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetSipRuleOutput(v **GetSipRuleOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetSipRuleOutput - if *v == nil { - sv = &GetSipRuleOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "SipRule": - if err := awsRestjson1_deserializeDocumentSipRule(&sv.SipRule, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetUser struct { -} - -func (*awsRestjson1_deserializeOpGetUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetUser(response, &metadata) - } - output := &GetUserOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetUserOutput(v **GetUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetUserOutput - if *v == nil { - sv = &GetUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetUserSettings struct { -} - -func (*awsRestjson1_deserializeOpGetUserSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetUserSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetUserSettings(response, &metadata) - } - output := &GetUserSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetUserSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetUserSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetUserSettingsOutput(v **GetUserSettingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetUserSettingsOutput - if *v == nil { - sv = &GetUserSettingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "UserSettings": - if err := awsRestjson1_deserializeDocumentUserSettings(&sv.UserSettings, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnector struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnector) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnector(response, &metadata) - } - output := &GetVoiceConnectorOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnector(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorOutput(v **GetVoiceConnectorOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorOutput - if *v == nil { - sv = &GetVoiceConnectorOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "VoiceConnector": - if err := awsRestjson1_deserializeDocumentVoiceConnector(&sv.VoiceConnector, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnectorEmergencyCallingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnectorEmergencyCallingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnectorEmergencyCallingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnectorEmergencyCallingConfiguration(response, &metadata) - } - output := &GetVoiceConnectorEmergencyCallingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorEmergencyCallingConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnectorEmergencyCallingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorEmergencyCallingConfigurationOutput(v **GetVoiceConnectorEmergencyCallingConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorEmergencyCallingConfigurationOutput - if *v == nil { - sv = &GetVoiceConnectorEmergencyCallingConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EmergencyCallingConfiguration": - if err := awsRestjson1_deserializeDocumentEmergencyCallingConfiguration(&sv.EmergencyCallingConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnectorGroup struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnectorGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnectorGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnectorGroup(response, &metadata) - } - output := &GetVoiceConnectorGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorGroupOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnectorGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorGroupOutput(v **GetVoiceConnectorGroupOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorGroupOutput - if *v == nil { - sv = &GetVoiceConnectorGroupOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "VoiceConnectorGroup": - if err := awsRestjson1_deserializeDocumentVoiceConnectorGroup(&sv.VoiceConnectorGroup, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnectorLoggingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnectorLoggingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnectorLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnectorLoggingConfiguration(response, &metadata) - } - output := &GetVoiceConnectorLoggingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorLoggingConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnectorLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorLoggingConfigurationOutput(v **GetVoiceConnectorLoggingConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorLoggingConfigurationOutput - if *v == nil { - sv = &GetVoiceConnectorLoggingConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "LoggingConfiguration": - if err := awsRestjson1_deserializeDocumentLoggingConfiguration(&sv.LoggingConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnectorOrigination struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnectorOrigination) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnectorOrigination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnectorOrigination(response, &metadata) - } - output := &GetVoiceConnectorOriginationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorOriginationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnectorOrigination(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorOriginationOutput(v **GetVoiceConnectorOriginationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorOriginationOutput - if *v == nil { - sv = &GetVoiceConnectorOriginationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Origination": - if err := awsRestjson1_deserializeDocumentOrigination(&sv.Origination, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnectorProxy struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnectorProxy) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnectorProxy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnectorProxy(response, &metadata) - } - output := &GetVoiceConnectorProxyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorProxyOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnectorProxy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorProxyOutput(v **GetVoiceConnectorProxyOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorProxyOutput - if *v == nil { - sv = &GetVoiceConnectorProxyOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Proxy": - if err := awsRestjson1_deserializeDocumentProxy(&sv.Proxy, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnectorStreamingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnectorStreamingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnectorStreamingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnectorStreamingConfiguration(response, &metadata) - } - output := &GetVoiceConnectorStreamingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorStreamingConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnectorStreamingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorStreamingConfigurationOutput(v **GetVoiceConnectorStreamingConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorStreamingConfigurationOutput - if *v == nil { - sv = &GetVoiceConnectorStreamingConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "StreamingConfiguration": - if err := awsRestjson1_deserializeDocumentStreamingConfiguration(&sv.StreamingConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnectorTermination struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnectorTermination) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnectorTermination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnectorTermination(response, &metadata) - } - output := &GetVoiceConnectorTerminationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorTerminationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnectorTermination(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorTerminationOutput(v **GetVoiceConnectorTerminationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorTerminationOutput - if *v == nil { - sv = &GetVoiceConnectorTerminationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Termination": - if err := awsRestjson1_deserializeDocumentTermination(&sv.Termination, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpGetVoiceConnectorTerminationHealth struct { -} - -func (*awsRestjson1_deserializeOpGetVoiceConnectorTerminationHealth) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpGetVoiceConnectorTerminationHealth) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetVoiceConnectorTerminationHealth(response, &metadata) - } - output := &GetVoiceConnectorTerminationHealthOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentGetVoiceConnectorTerminationHealthOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorGetVoiceConnectorTerminationHealth(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentGetVoiceConnectorTerminationHealthOutput(v **GetVoiceConnectorTerminationHealthOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *GetVoiceConnectorTerminationHealthOutput - if *v == nil { - sv = &GetVoiceConnectorTerminationHealthOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "TerminationHealth": - if err := awsRestjson1_deserializeDocumentTerminationHealth(&sv.TerminationHealth, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpInviteUsers struct { -} - -func (*awsRestjson1_deserializeOpInviteUsers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpInviteUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorInviteUsers(response, &metadata) - } - output := &InviteUsersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentInviteUsersOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorInviteUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentInviteUsersOutput(v **InviteUsersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *InviteUsersOutput - if *v == nil { - sv = &InviteUsersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Invites": - if err := awsRestjson1_deserializeDocumentInviteList(&sv.Invites, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListAccounts struct { -} - -func (*awsRestjson1_deserializeOpListAccounts) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListAccounts) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAccounts(response, &metadata) - } - output := &ListAccountsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListAccountsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListAccounts(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListAccountsOutput(v **ListAccountsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListAccountsOutput - if *v == nil { - sv = &ListAccountsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Accounts": - if err := awsRestjson1_deserializeDocumentAccountList(&sv.Accounts, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListAppInstanceAdmins struct { -} - -func (*awsRestjson1_deserializeOpListAppInstanceAdmins) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListAppInstanceAdmins) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAppInstanceAdmins(response, &metadata) - } - output := &ListAppInstanceAdminsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListAppInstanceAdminsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListAppInstanceAdmins(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListAppInstanceAdminsOutput(v **ListAppInstanceAdminsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListAppInstanceAdminsOutput - if *v == nil { - sv = &ListAppInstanceAdminsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceAdmins": - if err := awsRestjson1_deserializeDocumentAppInstanceAdminList(&sv.AppInstanceAdmins, value); err != nil { - return err - } - - case "AppInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceArn = ptr.String(jtv) - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListAppInstances struct { -} - -func (*awsRestjson1_deserializeOpListAppInstances) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListAppInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAppInstances(response, &metadata) - } - output := &ListAppInstancesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListAppInstancesOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListAppInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListAppInstancesOutput(v **ListAppInstancesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListAppInstancesOutput - if *v == nil { - sv = &ListAppInstancesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstances": - if err := awsRestjson1_deserializeDocumentAppInstanceList(&sv.AppInstances, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListAppInstanceUsers struct { -} - -func (*awsRestjson1_deserializeOpListAppInstanceUsers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListAppInstanceUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAppInstanceUsers(response, &metadata) - } - output := &ListAppInstanceUsersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListAppInstanceUsersOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListAppInstanceUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListAppInstanceUsersOutput(v **ListAppInstanceUsersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListAppInstanceUsersOutput - if *v == nil { - sv = &ListAppInstanceUsersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceArn = ptr.String(jtv) - } - - case "AppInstanceUsers": - if err := awsRestjson1_deserializeDocumentAppInstanceUserList(&sv.AppInstanceUsers, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListAttendees struct { -} - -func (*awsRestjson1_deserializeOpListAttendees) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListAttendees) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAttendees(response, &metadata) - } - output := &ListAttendeesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListAttendeesOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListAttendees(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListAttendeesOutput(v **ListAttendeesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListAttendeesOutput - if *v == nil { - sv = &ListAttendeesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Attendees": - if err := awsRestjson1_deserializeDocumentAttendeeList(&sv.Attendees, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListAttendeeTags struct { -} - -func (*awsRestjson1_deserializeOpListAttendeeTags) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListAttendeeTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAttendeeTags(response, &metadata) - } - output := &ListAttendeeTagsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListAttendeeTagsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListAttendeeTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListAttendeeTagsOutput(v **ListAttendeeTagsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListAttendeeTagsOutput - if *v == nil { - sv = &ListAttendeeTagsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListBots struct { -} - -func (*awsRestjson1_deserializeOpListBots) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListBots) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListBots(response, &metadata) - } - output := &ListBotsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListBotsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListBots(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListBotsOutput(v **ListBotsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListBotsOutput - if *v == nil { - sv = &ListBotsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Bots": - if err := awsRestjson1_deserializeDocumentBotList(&sv.Bots, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListChannelBans struct { -} - -func (*awsRestjson1_deserializeOpListChannelBans) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListChannelBans) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListChannelBans(response, &metadata) - } - output := &ListChannelBansOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListChannelBansOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListChannelBans(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListChannelBansOutput(v **ListChannelBansOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListChannelBansOutput - if *v == nil { - sv = &ListChannelBansOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "ChannelBans": - if err := awsRestjson1_deserializeDocumentChannelBanSummaryList(&sv.ChannelBans, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListChannelMemberships struct { -} - -func (*awsRestjson1_deserializeOpListChannelMemberships) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListChannelMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListChannelMemberships(response, &metadata) - } - output := &ListChannelMembershipsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListChannelMembershipsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListChannelMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListChannelMembershipsOutput(v **ListChannelMembershipsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListChannelMembershipsOutput - if *v == nil { - sv = &ListChannelMembershipsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "ChannelMemberships": - if err := awsRestjson1_deserializeDocumentChannelMembershipSummaryList(&sv.ChannelMemberships, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListChannelMembershipsForAppInstanceUser struct { -} - -func (*awsRestjson1_deserializeOpListChannelMembershipsForAppInstanceUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListChannelMembershipsForAppInstanceUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListChannelMembershipsForAppInstanceUser(response, &metadata) - } - output := &ListChannelMembershipsForAppInstanceUserOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListChannelMembershipsForAppInstanceUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListChannelMembershipsForAppInstanceUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListChannelMembershipsForAppInstanceUserOutput(v **ListChannelMembershipsForAppInstanceUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListChannelMembershipsForAppInstanceUserOutput - if *v == nil { - sv = &ListChannelMembershipsForAppInstanceUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelMemberships": - if err := awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummaryList(&sv.ChannelMemberships, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListChannelMessages struct { -} - -func (*awsRestjson1_deserializeOpListChannelMessages) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListChannelMessages) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListChannelMessages(response, &metadata) - } - output := &ListChannelMessagesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListChannelMessagesOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListChannelMessages(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListChannelMessagesOutput(v **ListChannelMessagesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListChannelMessagesOutput - if *v == nil { - sv = &ListChannelMessagesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "ChannelMessages": - if err := awsRestjson1_deserializeDocumentChannelMessageSummaryList(&sv.ChannelMessages, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListChannelModerators struct { -} - -func (*awsRestjson1_deserializeOpListChannelModerators) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListChannelModerators) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListChannelModerators(response, &metadata) - } - output := &ListChannelModeratorsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListChannelModeratorsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListChannelModerators(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListChannelModeratorsOutput(v **ListChannelModeratorsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListChannelModeratorsOutput - if *v == nil { - sv = &ListChannelModeratorsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "ChannelModerators": - if err := awsRestjson1_deserializeDocumentChannelModeratorSummaryList(&sv.ChannelModerators, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListChannels struct { -} - -func (*awsRestjson1_deserializeOpListChannels) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListChannels) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListChannels(response, &metadata) - } - output := &ListChannelsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListChannelsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListChannels(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListChannelsOutput(v **ListChannelsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListChannelsOutput - if *v == nil { - sv = &ListChannelsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Channels": - if err := awsRestjson1_deserializeDocumentChannelSummaryList(&sv.Channels, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListChannelsModeratedByAppInstanceUser struct { -} - -func (*awsRestjson1_deserializeOpListChannelsModeratedByAppInstanceUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListChannelsModeratedByAppInstanceUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListChannelsModeratedByAppInstanceUser(response, &metadata) - } - output := &ListChannelsModeratedByAppInstanceUserOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListChannelsModeratedByAppInstanceUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListChannelsModeratedByAppInstanceUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListChannelsModeratedByAppInstanceUserOutput(v **ListChannelsModeratedByAppInstanceUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListChannelsModeratedByAppInstanceUserOutput - if *v == nil { - sv = &ListChannelsModeratedByAppInstanceUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Channels": - if err := awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummaryList(&sv.Channels, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListMediaCapturePipelines struct { -} - -func (*awsRestjson1_deserializeOpListMediaCapturePipelines) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListMediaCapturePipelines) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMediaCapturePipelines(response, &metadata) - } - output := &ListMediaCapturePipelinesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListMediaCapturePipelinesOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListMediaCapturePipelines(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListMediaCapturePipelinesOutput(v **ListMediaCapturePipelinesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListMediaCapturePipelinesOutput - if *v == nil { - sv = &ListMediaCapturePipelinesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "MediaCapturePipelines": - if err := awsRestjson1_deserializeDocumentMediaCapturePipelineList(&sv.MediaCapturePipelines, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListMeetings struct { -} - -func (*awsRestjson1_deserializeOpListMeetings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListMeetings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMeetings(response, &metadata) - } - output := &ListMeetingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListMeetingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListMeetings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListMeetingsOutput(v **ListMeetingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListMeetingsOutput - if *v == nil { - sv = &ListMeetingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Meetings": - if err := awsRestjson1_deserializeDocumentMeetingList(&sv.Meetings, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListMeetingTags struct { -} - -func (*awsRestjson1_deserializeOpListMeetingTags) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListMeetingTags) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListMeetingTags(response, &metadata) - } - output := &ListMeetingTagsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListMeetingTagsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListMeetingTags(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListMeetingTagsOutput(v **ListMeetingTagsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListMeetingTagsOutput - if *v == nil { - sv = &ListMeetingTagsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListPhoneNumberOrders struct { -} - -func (*awsRestjson1_deserializeOpListPhoneNumberOrders) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListPhoneNumberOrders) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListPhoneNumberOrders(response, &metadata) - } - output := &ListPhoneNumberOrdersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListPhoneNumberOrdersOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListPhoneNumberOrders(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListPhoneNumberOrdersOutput(v **ListPhoneNumberOrdersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListPhoneNumberOrdersOutput - if *v == nil { - sv = &ListPhoneNumberOrdersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "PhoneNumberOrders": - if err := awsRestjson1_deserializeDocumentPhoneNumberOrderList(&sv.PhoneNumberOrders, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListPhoneNumbers struct { -} - -func (*awsRestjson1_deserializeOpListPhoneNumbers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListPhoneNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListPhoneNumbers(response, &metadata) - } - output := &ListPhoneNumbersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListPhoneNumbersOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListPhoneNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListPhoneNumbersOutput(v **ListPhoneNumbersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListPhoneNumbersOutput - if *v == nil { - sv = &ListPhoneNumbersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "PhoneNumbers": - if err := awsRestjson1_deserializeDocumentPhoneNumberList(&sv.PhoneNumbers, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListProxySessions struct { -} - -func (*awsRestjson1_deserializeOpListProxySessions) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListProxySessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProxySessions(response, &metadata) - } - output := &ListProxySessionsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListProxySessionsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListProxySessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListProxySessionsOutput(v **ListProxySessionsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListProxySessionsOutput - if *v == nil { - sv = &ListProxySessionsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextTokenString to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "ProxySessions": - if err := awsRestjson1_deserializeDocumentProxySessions(&sv.ProxySessions, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListRoomMemberships struct { -} - -func (*awsRestjson1_deserializeOpListRoomMemberships) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListRoomMemberships) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListRoomMemberships(response, &metadata) - } - output := &ListRoomMembershipsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListRoomMembershipsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListRoomMemberships(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListRoomMembershipsOutput(v **ListRoomMembershipsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListRoomMembershipsOutput - if *v == nil { - sv = &ListRoomMembershipsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "RoomMemberships": - if err := awsRestjson1_deserializeDocumentRoomMembershipList(&sv.RoomMemberships, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListRooms struct { -} - -func (*awsRestjson1_deserializeOpListRooms) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListRooms) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListRooms(response, &metadata) - } - output := &ListRoomsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListRoomsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListRooms(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListRoomsOutput(v **ListRoomsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListRoomsOutput - if *v == nil { - sv = &ListRoomsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "Rooms": - if err := awsRestjson1_deserializeDocumentRoomList(&sv.Rooms, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListSipMediaApplications struct { -} - -func (*awsRestjson1_deserializeOpListSipMediaApplications) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListSipMediaApplications) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSipMediaApplications(response, &metadata) - } - output := &ListSipMediaApplicationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListSipMediaApplicationsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListSipMediaApplications(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListSipMediaApplicationsOutput(v **ListSipMediaApplicationsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListSipMediaApplicationsOutput - if *v == nil { - sv = &ListSipMediaApplicationsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextTokenString to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "SipMediaApplications": - if err := awsRestjson1_deserializeDocumentSipMediaApplicationList(&sv.SipMediaApplications, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListSipRules struct { -} - -func (*awsRestjson1_deserializeOpListSipRules) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListSipRules) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSipRules(response, &metadata) - } - output := &ListSipRulesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListSipRulesOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListSipRules(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListSipRulesOutput(v **ListSipRulesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListSipRulesOutput - if *v == nil { - sv = &ListSipRulesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NextTokenString to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "SipRules": - if err := awsRestjson1_deserializeDocumentSipRuleList(&sv.SipRules, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListSupportedPhoneNumberCountries struct { -} - -func (*awsRestjson1_deserializeOpListSupportedPhoneNumberCountries) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListSupportedPhoneNumberCountries) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSupportedPhoneNumberCountries(response, &metadata) - } - output := &ListSupportedPhoneNumberCountriesOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListSupportedPhoneNumberCountriesOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListSupportedPhoneNumberCountries(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListSupportedPhoneNumberCountriesOutput(v **ListSupportedPhoneNumberCountriesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListSupportedPhoneNumberCountriesOutput - if *v == nil { - sv = &ListSupportedPhoneNumberCountriesOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumberCountries": - if err := awsRestjson1_deserializeDocumentPhoneNumberCountriesList(&sv.PhoneNumberCountries, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListTagsForResource struct { -} - -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) - } - output := &ListTagsForResourceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListTagsForResourceOutput - if *v == nil { - sv = &ListTagsForResourceOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Tags": - if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListUsers struct { -} - -func (*awsRestjson1_deserializeOpListUsers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListUsers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListUsers(response, &metadata) - } - output := &ListUsersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListUsersOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListUsers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListUsersOutput(v **ListUsersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListUsersOutput - if *v == nil { - sv = &ListUsersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "Users": - if err := awsRestjson1_deserializeDocumentUserList(&sv.Users, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListVoiceConnectorGroups struct { -} - -func (*awsRestjson1_deserializeOpListVoiceConnectorGroups) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListVoiceConnectorGroups) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListVoiceConnectorGroups(response, &metadata) - } - output := &ListVoiceConnectorGroupsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListVoiceConnectorGroupsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListVoiceConnectorGroups(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListVoiceConnectorGroupsOutput(v **ListVoiceConnectorGroupsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListVoiceConnectorGroupsOutput - if *v == nil { - sv = &ListVoiceConnectorGroupsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "VoiceConnectorGroups": - if err := awsRestjson1_deserializeDocumentVoiceConnectorGroupList(&sv.VoiceConnectorGroups, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListVoiceConnectors struct { -} - -func (*awsRestjson1_deserializeOpListVoiceConnectors) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListVoiceConnectors) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListVoiceConnectors(response, &metadata) - } - output := &ListVoiceConnectorsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListVoiceConnectorsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListVoiceConnectors(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListVoiceConnectorsOutput(v **ListVoiceConnectorsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListVoiceConnectorsOutput - if *v == nil { - sv = &ListVoiceConnectorsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "VoiceConnectors": - if err := awsRestjson1_deserializeDocumentVoiceConnectorList(&sv.VoiceConnectors, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpListVoiceConnectorTerminationCredentials struct { -} - -func (*awsRestjson1_deserializeOpListVoiceConnectorTerminationCredentials) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpListVoiceConnectorTerminationCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListVoiceConnectorTerminationCredentials(response, &metadata) - } - output := &ListVoiceConnectorTerminationCredentialsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentListVoiceConnectorTerminationCredentialsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorListVoiceConnectorTerminationCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentListVoiceConnectorTerminationCredentialsOutput(v **ListVoiceConnectorTerminationCredentialsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListVoiceConnectorTerminationCredentialsOutput - if *v == nil { - sv = &ListVoiceConnectorTerminationCredentialsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Usernames": - if err := awsRestjson1_deserializeDocumentSensitiveStringList(&sv.Usernames, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpLogoutUser struct { -} - -func (*awsRestjson1_deserializeOpLogoutUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpLogoutUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorLogoutUser(response, &metadata) - } - output := &LogoutUserOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorLogoutUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpPutAppInstanceRetentionSettings struct { -} - -func (*awsRestjson1_deserializeOpPutAppInstanceRetentionSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutAppInstanceRetentionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutAppInstanceRetentionSettings(response, &metadata) - } - output := &PutAppInstanceRetentionSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutAppInstanceRetentionSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutAppInstanceRetentionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutAppInstanceRetentionSettingsOutput(v **PutAppInstanceRetentionSettingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutAppInstanceRetentionSettingsOutput - if *v == nil { - sv = &PutAppInstanceRetentionSettingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceRetentionSettings": - if err := awsRestjson1_deserializeDocumentAppInstanceRetentionSettings(&sv.AppInstanceRetentionSettings, value); err != nil { - return err - } - - case "InitiateDeletionTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.InitiateDeletionTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutAppInstanceStreamingConfigurations struct { -} - -func (*awsRestjson1_deserializeOpPutAppInstanceStreamingConfigurations) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutAppInstanceStreamingConfigurations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutAppInstanceStreamingConfigurations(response, &metadata) - } - output := &PutAppInstanceStreamingConfigurationsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutAppInstanceStreamingConfigurationsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutAppInstanceStreamingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutAppInstanceStreamingConfigurationsOutput(v **PutAppInstanceStreamingConfigurationsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutAppInstanceStreamingConfigurationsOutput - if *v == nil { - sv = &PutAppInstanceStreamingConfigurationsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceStreamingConfigurations": - if err := awsRestjson1_deserializeDocumentAppInstanceStreamingConfigurationList(&sv.AppInstanceStreamingConfigurations, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutEventsConfiguration struct { -} - -func (*awsRestjson1_deserializeOpPutEventsConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutEventsConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutEventsConfiguration(response, &metadata) - } - output := &PutEventsConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutEventsConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutEventsConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutEventsConfigurationOutput(v **PutEventsConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutEventsConfigurationOutput - if *v == nil { - sv = &PutEventsConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EventsConfiguration": - if err := awsRestjson1_deserializeDocumentEventsConfiguration(&sv.EventsConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutRetentionSettings struct { -} - -func (*awsRestjson1_deserializeOpPutRetentionSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutRetentionSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutRetentionSettings(response, &metadata) - } - output := &PutRetentionSettingsOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutRetentionSettingsOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutRetentionSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutRetentionSettingsOutput(v **PutRetentionSettingsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutRetentionSettingsOutput - if *v == nil { - sv = &PutRetentionSettingsOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "InitiateDeletionTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.InitiateDeletionTimestamp = ptr.Time(t) - } - - case "RetentionSettings": - if err := awsRestjson1_deserializeDocumentRetentionSettings(&sv.RetentionSettings, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutSipMediaApplicationLoggingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpPutSipMediaApplicationLoggingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutSipMediaApplicationLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutSipMediaApplicationLoggingConfiguration(response, &metadata) - } - output := &PutSipMediaApplicationLoggingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutSipMediaApplicationLoggingConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutSipMediaApplicationLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutSipMediaApplicationLoggingConfigurationOutput(v **PutSipMediaApplicationLoggingConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutSipMediaApplicationLoggingConfigurationOutput - if *v == nil { - sv = &PutSipMediaApplicationLoggingConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "SipMediaApplicationLoggingConfiguration": - if err := awsRestjson1_deserializeDocumentSipMediaApplicationLoggingConfiguration(&sv.SipMediaApplicationLoggingConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutVoiceConnectorEmergencyCallingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpPutVoiceConnectorEmergencyCallingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutVoiceConnectorEmergencyCallingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutVoiceConnectorEmergencyCallingConfiguration(response, &metadata) - } - output := &PutVoiceConnectorEmergencyCallingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutVoiceConnectorEmergencyCallingConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutVoiceConnectorEmergencyCallingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutVoiceConnectorEmergencyCallingConfigurationOutput(v **PutVoiceConnectorEmergencyCallingConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutVoiceConnectorEmergencyCallingConfigurationOutput - if *v == nil { - sv = &PutVoiceConnectorEmergencyCallingConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EmergencyCallingConfiguration": - if err := awsRestjson1_deserializeDocumentEmergencyCallingConfiguration(&sv.EmergencyCallingConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutVoiceConnectorLoggingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpPutVoiceConnectorLoggingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutVoiceConnectorLoggingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutVoiceConnectorLoggingConfiguration(response, &metadata) - } - output := &PutVoiceConnectorLoggingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutVoiceConnectorLoggingConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutVoiceConnectorLoggingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutVoiceConnectorLoggingConfigurationOutput(v **PutVoiceConnectorLoggingConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutVoiceConnectorLoggingConfigurationOutput - if *v == nil { - sv = &PutVoiceConnectorLoggingConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "LoggingConfiguration": - if err := awsRestjson1_deserializeDocumentLoggingConfiguration(&sv.LoggingConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutVoiceConnectorOrigination struct { -} - -func (*awsRestjson1_deserializeOpPutVoiceConnectorOrigination) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutVoiceConnectorOrigination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutVoiceConnectorOrigination(response, &metadata) - } - output := &PutVoiceConnectorOriginationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutVoiceConnectorOriginationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutVoiceConnectorOrigination(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutVoiceConnectorOriginationOutput(v **PutVoiceConnectorOriginationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutVoiceConnectorOriginationOutput - if *v == nil { - sv = &PutVoiceConnectorOriginationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Origination": - if err := awsRestjson1_deserializeDocumentOrigination(&sv.Origination, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutVoiceConnectorProxy struct { -} - -func (*awsRestjson1_deserializeOpPutVoiceConnectorProxy) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutVoiceConnectorProxy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutVoiceConnectorProxy(response, &metadata) - } - output := &PutVoiceConnectorProxyOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutVoiceConnectorProxyOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutVoiceConnectorProxy(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutVoiceConnectorProxyOutput(v **PutVoiceConnectorProxyOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutVoiceConnectorProxyOutput - if *v == nil { - sv = &PutVoiceConnectorProxyOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Proxy": - if err := awsRestjson1_deserializeDocumentProxy(&sv.Proxy, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutVoiceConnectorStreamingConfiguration struct { -} - -func (*awsRestjson1_deserializeOpPutVoiceConnectorStreamingConfiguration) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutVoiceConnectorStreamingConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutVoiceConnectorStreamingConfiguration(response, &metadata) - } - output := &PutVoiceConnectorStreamingConfigurationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutVoiceConnectorStreamingConfigurationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutVoiceConnectorStreamingConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutVoiceConnectorStreamingConfigurationOutput(v **PutVoiceConnectorStreamingConfigurationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutVoiceConnectorStreamingConfigurationOutput - if *v == nil { - sv = &PutVoiceConnectorStreamingConfigurationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "StreamingConfiguration": - if err := awsRestjson1_deserializeDocumentStreamingConfiguration(&sv.StreamingConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutVoiceConnectorTermination struct { -} - -func (*awsRestjson1_deserializeOpPutVoiceConnectorTermination) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutVoiceConnectorTermination) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutVoiceConnectorTermination(response, &metadata) - } - output := &PutVoiceConnectorTerminationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentPutVoiceConnectorTerminationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutVoiceConnectorTermination(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentPutVoiceConnectorTerminationOutput(v **PutVoiceConnectorTerminationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *PutVoiceConnectorTerminationOutput - if *v == nil { - sv = &PutVoiceConnectorTerminationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Termination": - if err := awsRestjson1_deserializeDocumentTermination(&sv.Termination, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpPutVoiceConnectorTerminationCredentials struct { -} - -func (*awsRestjson1_deserializeOpPutVoiceConnectorTerminationCredentials) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpPutVoiceConnectorTerminationCredentials) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutVoiceConnectorTerminationCredentials(response, &metadata) - } - output := &PutVoiceConnectorTerminationCredentialsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorPutVoiceConnectorTerminationCredentials(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpRedactChannelMessage struct { -} - -func (*awsRestjson1_deserializeOpRedactChannelMessage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpRedactChannelMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRedactChannelMessage(response, &metadata) - } - output := &RedactChannelMessageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentRedactChannelMessageOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorRedactChannelMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentRedactChannelMessageOutput(v **RedactChannelMessageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *RedactChannelMessageOutput - if *v == nil { - sv = &RedactChannelMessageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "MessageId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) - } - sv.MessageId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpRedactConversationMessage struct { -} - -func (*awsRestjson1_deserializeOpRedactConversationMessage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpRedactConversationMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRedactConversationMessage(response, &metadata) - } - output := &RedactConversationMessageOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorRedactConversationMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpRedactRoomMessage struct { -} - -func (*awsRestjson1_deserializeOpRedactRoomMessage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpRedactRoomMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRedactRoomMessage(response, &metadata) - } - output := &RedactRoomMessageOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorRedactRoomMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpRegenerateSecurityToken struct { -} - -func (*awsRestjson1_deserializeOpRegenerateSecurityToken) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpRegenerateSecurityToken) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRegenerateSecurityToken(response, &metadata) - } - output := &RegenerateSecurityTokenOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentRegenerateSecurityTokenOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorRegenerateSecurityToken(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentRegenerateSecurityTokenOutput(v **RegenerateSecurityTokenOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *RegenerateSecurityTokenOutput - if *v == nil { - sv = &RegenerateSecurityTokenOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Bot": - if err := awsRestjson1_deserializeDocumentBot(&sv.Bot, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpResetPersonalPIN struct { -} - -func (*awsRestjson1_deserializeOpResetPersonalPIN) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpResetPersonalPIN) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorResetPersonalPIN(response, &metadata) - } - output := &ResetPersonalPINOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentResetPersonalPINOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorResetPersonalPIN(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentResetPersonalPINOutput(v **ResetPersonalPINOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ResetPersonalPINOutput - if *v == nil { - sv = &ResetPersonalPINOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpRestorePhoneNumber struct { -} - -func (*awsRestjson1_deserializeOpRestorePhoneNumber) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpRestorePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRestorePhoneNumber(response, &metadata) - } - output := &RestorePhoneNumberOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentRestorePhoneNumberOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorRestorePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentRestorePhoneNumberOutput(v **RestorePhoneNumberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *RestorePhoneNumberOutput - if *v == nil { - sv = &RestorePhoneNumberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumber": - if err := awsRestjson1_deserializeDocumentPhoneNumber(&sv.PhoneNumber, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpSearchAvailablePhoneNumbers struct { -} - -func (*awsRestjson1_deserializeOpSearchAvailablePhoneNumbers) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpSearchAvailablePhoneNumbers) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSearchAvailablePhoneNumbers(response, &metadata) - } - output := &SearchAvailablePhoneNumbersOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentSearchAvailablePhoneNumbersOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorSearchAvailablePhoneNumbers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentSearchAvailablePhoneNumbersOutput(v **SearchAvailablePhoneNumbersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *SearchAvailablePhoneNumbersOutput - if *v == nil { - sv = &SearchAvailablePhoneNumbersOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "E164PhoneNumbers": - if err := awsRestjson1_deserializeDocumentE164PhoneNumberList(&sv.E164PhoneNumbers, value); err != nil { - return err - } - - case "NextToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpSendChannelMessage struct { -} - -func (*awsRestjson1_deserializeOpSendChannelMessage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpSendChannelMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorSendChannelMessage(response, &metadata) - } - output := &SendChannelMessageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentSendChannelMessageOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorSendChannelMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentSendChannelMessageOutput(v **SendChannelMessageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *SendChannelMessageOutput - if *v == nil { - sv = &SendChannelMessageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "MessageId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) - } - sv.MessageId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpStartMeetingTranscription struct { -} - -func (*awsRestjson1_deserializeOpStartMeetingTranscription) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStartMeetingTranscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartMeetingTranscription(response, &metadata) - } - output := &StartMeetingTranscriptionOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStartMeetingTranscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpStopMeetingTranscription struct { -} - -func (*awsRestjson1_deserializeOpStopMeetingTranscription) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpStopMeetingTranscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopMeetingTranscription(response, &metadata) - } - output := &StopMeetingTranscriptionOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorStopMeetingTranscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - case strings.EqualFold("UnprocessableEntityException", errorCode): - return awsRestjson1_deserializeErrorUnprocessableEntityException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpTagAttendee struct { -} - -func (*awsRestjson1_deserializeOpTagAttendee) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpTagAttendee) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagAttendee(response, &metadata) - } - output := &TagAttendeeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorTagAttendee(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpTagMeeting struct { -} - -func (*awsRestjson1_deserializeOpTagMeeting) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpTagMeeting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagMeeting(response, &metadata) - } - output := &TagMeetingOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorTagMeeting(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpTagResource struct { -} - -func (*awsRestjson1_deserializeOpTagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) - } - output := &TagResourceOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUntagAttendee struct { -} - -func (*awsRestjson1_deserializeOpUntagAttendee) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUntagAttendee) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagAttendee(response, &metadata) - } - output := &UntagAttendeeOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUntagAttendee(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUntagMeeting struct { -} - -func (*awsRestjson1_deserializeOpUntagMeeting) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUntagMeeting) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagMeeting(response, &metadata) - } - output := &UntagMeetingOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUntagMeeting(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUntagResource struct { -} - -func (*awsRestjson1_deserializeOpUntagResource) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) - } - output := &UntagResourceOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUpdateAccount struct { -} - -func (*awsRestjson1_deserializeOpUpdateAccount) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateAccount) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccount(response, &metadata) - } - output := &UpdateAccountOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateAccountOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateAccount(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateAccountOutput(v **UpdateAccountOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateAccountOutput - if *v == nil { - sv = &UpdateAccountOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Account": - if err := awsRestjson1_deserializeDocumentAccount(&sv.Account, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateAccountSettings struct { -} - -func (*awsRestjson1_deserializeOpUpdateAccountSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateAccountSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAccountSettings(response, &metadata) - } - output := &UpdateAccountSettingsOutput{} - out.Result = output - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateAccountSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUpdateAppInstance struct { -} - -func (*awsRestjson1_deserializeOpUpdateAppInstance) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateAppInstance) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppInstance(response, &metadata) - } - output := &UpdateAppInstanceOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateAppInstanceOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateAppInstance(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateAppInstanceOutput(v **UpdateAppInstanceOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateAppInstanceOutput - if *v == nil { - sv = &UpdateAppInstanceOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateAppInstanceUser struct { -} - -func (*awsRestjson1_deserializeOpUpdateAppInstanceUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateAppInstanceUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppInstanceUser(response, &metadata) - } - output := &UpdateAppInstanceUserOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateAppInstanceUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateAppInstanceUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateAppInstanceUserOutput(v **UpdateAppInstanceUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateAppInstanceUserOutput - if *v == nil { - sv = &UpdateAppInstanceUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceUserArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceUserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateBot struct { -} - -func (*awsRestjson1_deserializeOpUpdateBot) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateBot) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateBot(response, &metadata) - } - output := &UpdateBotOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateBotOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateBot(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateBotOutput(v **UpdateBotOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateBotOutput - if *v == nil { - sv = &UpdateBotOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Bot": - if err := awsRestjson1_deserializeDocumentBot(&sv.Bot, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateChannel struct { -} - -func (*awsRestjson1_deserializeOpUpdateChannel) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateChannel) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannel(response, &metadata) - } - output := &UpdateChannelOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateChannelOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateChannel(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateChannelOutput(v **UpdateChannelOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateChannelOutput - if *v == nil { - sv = &UpdateChannelOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateChannelMessage struct { -} - -func (*awsRestjson1_deserializeOpUpdateChannelMessage) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateChannelMessage) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannelMessage(response, &metadata) - } - output := &UpdateChannelMessageOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateChannelMessageOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateChannelMessage(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateChannelMessageOutput(v **UpdateChannelMessageOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateChannelMessageOutput - if *v == nil { - sv = &UpdateChannelMessageOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "MessageId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) - } - sv.MessageId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateChannelReadMarker struct { -} - -func (*awsRestjson1_deserializeOpUpdateChannelReadMarker) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateChannelReadMarker) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateChannelReadMarker(response, &metadata) - } - output := &UpdateChannelReadMarkerOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateChannelReadMarkerOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateChannelReadMarker(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateChannelReadMarkerOutput(v **UpdateChannelReadMarkerOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateChannelReadMarkerOutput - if *v == nil { - sv = &UpdateChannelReadMarkerOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateGlobalSettings struct { -} - -func (*awsRestjson1_deserializeOpUpdateGlobalSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateGlobalSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateGlobalSettings(response, &metadata) - } - output := &UpdateGlobalSettingsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateGlobalSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUpdatePhoneNumber struct { -} - -func (*awsRestjson1_deserializeOpUpdatePhoneNumber) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdatePhoneNumber) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response, &metadata) - } - output := &UpdatePhoneNumberOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdatePhoneNumber(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdatePhoneNumberOutput(v **UpdatePhoneNumberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdatePhoneNumberOutput - if *v == nil { - sv = &UpdatePhoneNumberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumber": - if err := awsRestjson1_deserializeDocumentPhoneNumber(&sv.PhoneNumber, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdatePhoneNumberSettings struct { -} - -func (*awsRestjson1_deserializeOpUpdatePhoneNumberSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdatePhoneNumberSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdatePhoneNumberSettings(response, &metadata) - } - output := &UpdatePhoneNumberSettingsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdatePhoneNumberSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUpdateProxySession struct { -} - -func (*awsRestjson1_deserializeOpUpdateProxySession) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateProxySession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateProxySession(response, &metadata) - } - output := &UpdateProxySessionOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateProxySessionOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateProxySession(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateProxySessionOutput(v **UpdateProxySessionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateProxySessionOutput - if *v == nil { - sv = &UpdateProxySessionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ProxySession": - if err := awsRestjson1_deserializeDocumentProxySession(&sv.ProxySession, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateRoom struct { -} - -func (*awsRestjson1_deserializeOpUpdateRoom) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateRoom) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoom(response, &metadata) - } - output := &UpdateRoomOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateRoomOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateRoom(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateRoomOutput(v **UpdateRoomOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateRoomOutput - if *v == nil { - sv = &UpdateRoomOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Room": - if err := awsRestjson1_deserializeDocumentRoom(&sv.Room, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateRoomMembership struct { -} - -func (*awsRestjson1_deserializeOpUpdateRoomMembership) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateRoomMembership) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateRoomMembership(response, &metadata) - } - output := &UpdateRoomMembershipOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateRoomMembershipOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateRoomMembership(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateRoomMembershipOutput(v **UpdateRoomMembershipOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateRoomMembershipOutput - if *v == nil { - sv = &UpdateRoomMembershipOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "RoomMembership": - if err := awsRestjson1_deserializeDocumentRoomMembership(&sv.RoomMembership, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateSipMediaApplication struct { -} - -func (*awsRestjson1_deserializeOpUpdateSipMediaApplication) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateSipMediaApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSipMediaApplication(response, &metadata) - } - output := &UpdateSipMediaApplicationOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateSipMediaApplicationOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateSipMediaApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateSipMediaApplicationOutput(v **UpdateSipMediaApplicationOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateSipMediaApplicationOutput - if *v == nil { - sv = &UpdateSipMediaApplicationOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "SipMediaApplication": - if err := awsRestjson1_deserializeDocumentSipMediaApplication(&sv.SipMediaApplication, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateSipMediaApplicationCall struct { -} - -func (*awsRestjson1_deserializeOpUpdateSipMediaApplicationCall) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateSipMediaApplicationCall) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSipMediaApplicationCall(response, &metadata) - } - output := &UpdateSipMediaApplicationCallOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateSipMediaApplicationCallOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateSipMediaApplicationCall(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateSipMediaApplicationCallOutput(v **UpdateSipMediaApplicationCallOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateSipMediaApplicationCallOutput - if *v == nil { - sv = &UpdateSipMediaApplicationCallOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "SipMediaApplicationCall": - if err := awsRestjson1_deserializeDocumentSipMediaApplicationCall(&sv.SipMediaApplicationCall, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateSipRule struct { -} - -func (*awsRestjson1_deserializeOpUpdateSipRule) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateSipRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSipRule(response, &metadata) - } - output := &UpdateSipRuleOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateSipRuleOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateSipRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ResourceLimitExceededException", errorCode): - return awsRestjson1_deserializeErrorResourceLimitExceededException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateSipRuleOutput(v **UpdateSipRuleOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateSipRuleOutput - if *v == nil { - sv = &UpdateSipRuleOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "SipRule": - if err := awsRestjson1_deserializeDocumentSipRule(&sv.SipRule, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateUser struct { -} - -func (*awsRestjson1_deserializeOpUpdateUser) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateUser) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUser(response, &metadata) - } - output := &UpdateUserOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateUserOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateUser(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateUserOutput(v **UpdateUserOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateUserOutput - if *v == nil { - sv = &UpdateUserOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "User": - if err := awsRestjson1_deserializeDocumentUser(&sv.User, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateUserSettings struct { -} - -func (*awsRestjson1_deserializeOpUpdateUserSettings) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateUserSettings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateUserSettings(response, &metadata) - } - output := &UpdateUserSettingsOutput{} - out.Result = output - - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateUserSettings(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsRestjson1_deserializeOpUpdateVoiceConnector struct { -} - -func (*awsRestjson1_deserializeOpUpdateVoiceConnector) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateVoiceConnector) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateVoiceConnector(response, &metadata) - } - output := &UpdateVoiceConnectorOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateVoiceConnectorOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateVoiceConnector(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateVoiceConnectorOutput(v **UpdateVoiceConnectorOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateVoiceConnectorOutput - if *v == nil { - sv = &UpdateVoiceConnectorOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "VoiceConnector": - if err := awsRestjson1_deserializeDocumentVoiceConnector(&sv.VoiceConnector, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateVoiceConnectorGroup struct { -} - -func (*awsRestjson1_deserializeOpUpdateVoiceConnectorGroup) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUpdateVoiceConnectorGroup) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateVoiceConnectorGroup(response, &metadata) - } - output := &UpdateVoiceConnectorGroupOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentUpdateVoiceConnectorGroupOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorUpdateVoiceConnectorGroup(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentUpdateVoiceConnectorGroupOutput(v **UpdateVoiceConnectorGroupOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateVoiceConnectorGroupOutput - if *v == nil { - sv = &UpdateVoiceConnectorGroupOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "VoiceConnectorGroup": - if err := awsRestjson1_deserializeDocumentVoiceConnectorGroup(&sv.VoiceConnectorGroup, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpValidateE911Address struct { -} - -func (*awsRestjson1_deserializeOpValidateE911Address) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpValidateE911Address) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( - out middleware.DeserializeOutput, metadata middleware.Metadata, err error, -) { - out, metadata, err = next.HandleDeserialize(ctx, in) - if err != nil { - return out, metadata, err - } - - _, span := tracing.StartSpan(ctx, "OperationDeserializer") - endTimer := startMetricTimer(ctx, "client.call.deserialization_duration") - defer endTimer() - defer span.End() - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } - - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorValidateE911Address(response, &metadata) - } - output := &ValidateE911AddressOutput{} - out.Result = output - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(response.Body, ringBuffer) - - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return out, metadata, err - } - - err = awsRestjson1_deserializeOpDocumentValidateE911AddressOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), - } - } - - span.End() - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorValidateE911Address(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) - } - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message - } - - switch { - case strings.EqualFold("BadRequestException", errorCode): - return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceFailureException", errorCode): - return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) - - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("ThrottledClientException", errorCode): - return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) - - case strings.EqualFold("UnauthorizedClientException", errorCode): - return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsRestjson1_deserializeOpDocumentValidateE911AddressOutput(v **ValidateE911AddressOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ValidateE911AddressOutput - if *v == nil { - sv = &ValidateE911AddressOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Address": - if err := awsRestjson1_deserializeDocumentAddress(&sv.Address, value); err != nil { - return err - } - - case "AddressExternalId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AddressExternalId = ptr.String(jtv) - } - - case "CandidateAddressList": - if err := awsRestjson1_deserializeDocumentCandidateAddressList(&sv.CandidateAddressList, value); err != nil { - return err - } - - case "ValidationResult": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected ValidationResult to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ValidationResult = int32(i64) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.BadRequestException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentBadRequestException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ConflictException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ForbiddenException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentForbiddenException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.NotFoundException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentNotFoundException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorResourceLimitExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceLimitExceededException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentResourceLimitExceededException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorServiceFailureException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceFailureException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentServiceFailureException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceUnavailableException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorThrottledClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottledClientException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentThrottledClientException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorUnauthorizedClientException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UnauthorizedClientException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentUnauthorizedClientException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorUnprocessableEntityException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UnprocessableEntityException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentUnprocessableEntityException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AccessDeniedException - if *v == nil { - sv = &types.AccessDeniedException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.Code = types.ErrorCode(jtv) - } - - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAccount(v **types.Account, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Account - if *v == nil { - sv = &types.Account{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AccountId = ptr.String(jtv) - } - - case "AccountStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccountStatus to be of type string, got %T instead", value) - } - sv.AccountStatus = types.AccountStatus(jtv) - } - - case "AccountType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AccountType to be of type string, got %T instead", value) - } - sv.AccountType = types.AccountType(jtv) - } - - case "AwsAccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AwsAccountId = ptr.String(jtv) - } - - case "CreatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(t) - } - - case "DefaultLicense": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected License to be of type string, got %T instead", value) - } - sv.DefaultLicense = types.License(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "SigninDelegateGroups": - if err := awsRestjson1_deserializeDocumentSigninDelegateGroupList(&sv.SigninDelegateGroups, value); err != nil { - return err - } - - case "SupportedLicenses": - if err := awsRestjson1_deserializeDocumentLicenseList(&sv.SupportedLicenses, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAccountList(v *[]types.Account, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Account - if *v == nil { - cv = []types.Account{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Account - destAddr := &col - if err := awsRestjson1_deserializeDocumentAccount(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAccountSettings(v **types.AccountSettings, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AccountSettings - if *v == nil { - sv = &types.AccountSettings{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "DisableRemoteControl": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.DisableRemoteControl = ptr.Bool(jtv) - } - - case "EnableDialOut": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.EnableDialOut = ptr.Bool(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAddress(v **types.Address, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Address - if *v == nil { - sv = &types.Address{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "city": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.City = ptr.String(jtv) - } - - case "country": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.Country = ptr.String(jtv) - } - - case "postalCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.PostalCode = ptr.String(jtv) - } - - case "postalCodePlus4": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.PostalCodePlus4 = ptr.String(jtv) - } - - case "postDirectional": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.PostDirectional = ptr.String(jtv) - } - - case "preDirectional": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.PreDirectional = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.State = ptr.String(jtv) - } - - case "streetName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.StreetName = ptr.String(jtv) - } - - case "streetNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.StreetNumber = ptr.String(jtv) - } - - case "streetSuffix": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.StreetSuffix = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAlexaForBusinessMetadata(v **types.AlexaForBusinessMetadata, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AlexaForBusinessMetadata - if *v == nil { - sv = &types.AlexaForBusinessMetadata{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AlexaForBusinessRoomArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.AlexaForBusinessRoomArn = ptr.String(jtv) - } - - case "IsAlexaForBusinessEnabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IsAlexaForBusinessEnabled = ptr.Bool(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstance(v **types.AppInstance, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstance - if *v == nil { - sv = &types.AppInstance{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceArn = ptr.String(jtv) - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastUpdatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Metadata": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) - } - sv.Metadata = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceAdmin(v **types.AppInstanceAdmin, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstanceAdmin - if *v == nil { - sv = &types.AppInstanceAdmin{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Admin": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Admin, value); err != nil { - return err - } - - case "AppInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceArn = ptr.String(jtv) - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceAdminList(v *[]types.AppInstanceAdminSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.AppInstanceAdminSummary - if *v == nil { - cv = []types.AppInstanceAdminSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.AppInstanceAdminSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentAppInstanceAdminSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceAdminSummary(v **types.AppInstanceAdminSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstanceAdminSummary - if *v == nil { - sv = &types.AppInstanceAdminSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Admin": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Admin, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceList(v *[]types.AppInstanceSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.AppInstanceSummary - if *v == nil { - cv = []types.AppInstanceSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.AppInstanceSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentAppInstanceSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceRetentionSettings(v **types.AppInstanceRetentionSettings, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstanceRetentionSettings - if *v == nil { - sv = &types.AppInstanceRetentionSettings{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelRetentionSettings": - if err := awsRestjson1_deserializeDocumentChannelRetentionSettings(&sv.ChannelRetentionSettings, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceStreamingConfiguration(v **types.AppInstanceStreamingConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstanceStreamingConfiguration - if *v == nil { - sv = &types.AppInstanceStreamingConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceDataType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AppInstanceDataType to be of type string, got %T instead", value) - } - sv.AppInstanceDataType = types.AppInstanceDataType(jtv) - } - - case "ResourceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.ResourceArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceStreamingConfigurationList(v *[]types.AppInstanceStreamingConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.AppInstanceStreamingConfiguration - if *v == nil { - cv = []types.AppInstanceStreamingConfiguration{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.AppInstanceStreamingConfiguration - destAddr := &col - if err := awsRestjson1_deserializeDocumentAppInstanceStreamingConfiguration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceSummary(v **types.AppInstanceSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstanceSummary - if *v == nil { - sv = &types.AppInstanceSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceArn = ptr.String(jtv) - } - - case "Metadata": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) - } - sv.Metadata = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceUser(v **types.AppInstanceUser, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstanceUser - if *v == nil { - sv = &types.AppInstanceUser{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceUserArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceUserArn = ptr.String(jtv) - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastUpdatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Metadata": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) - } - sv.Metadata = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceUserList(v *[]types.AppInstanceUserSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.AppInstanceUserSummary - if *v == nil { - cv = []types.AppInstanceUserSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.AppInstanceUserSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentAppInstanceUserSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceUserMembershipSummary(v **types.AppInstanceUserMembershipSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstanceUserMembershipSummary - if *v == nil { - sv = &types.AppInstanceUserMembershipSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ReadMarkerTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ReadMarkerTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelMembershipType to be of type string, got %T instead", value) - } - sv.Type = types.ChannelMembershipType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAppInstanceUserSummary(v **types.AppInstanceUserSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AppInstanceUserSummary - if *v == nil { - sv = &types.AppInstanceUserSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceUserArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.AppInstanceUserArn = ptr.String(jtv) - } - - case "Metadata": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) - } - sv.Metadata = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentArtifactsConfiguration(v **types.ArtifactsConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ArtifactsConfiguration - if *v == nil { - sv = &types.ArtifactsConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Audio": - if err := awsRestjson1_deserializeDocumentAudioArtifactsConfiguration(&sv.Audio, value); err != nil { - return err - } - - case "Content": - if err := awsRestjson1_deserializeDocumentContentArtifactsConfiguration(&sv.Content, value); err != nil { - return err - } - - case "Video": - if err := awsRestjson1_deserializeDocumentVideoArtifactsConfiguration(&sv.Video, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAttendee(v **types.Attendee, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Attendee - if *v == nil { - sv = &types.Attendee{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AttendeeId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) - } - sv.AttendeeId = ptr.String(jtv) - } - - case "ExternalUserId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExternalUserIdType to be of type string, got %T instead", value) - } - sv.ExternalUserId = ptr.String(jtv) - } - - case "JoinToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected JoinTokenString to be of type string, got %T instead", value) - } - sv.JoinToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentAttendeeIdList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAttendeeList(v *[]types.Attendee, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Attendee - if *v == nil { - cv = []types.Attendee{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Attendee - destAddr := &col - if err := awsRestjson1_deserializeDocumentAttendee(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentAudioArtifactsConfiguration(v **types.AudioArtifactsConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.AudioArtifactsConfiguration - if *v == nil { - sv = &types.AudioArtifactsConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "MuxType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AudioMuxType to be of type string, got %T instead", value) - } - sv.MuxType = types.AudioMuxType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.BadRequestException - if *v == nil { - sv = &types.BadRequestException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.Code = types.ErrorCode(jtv) - } - - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentBatchChannelMemberships(v **types.BatchChannelMemberships, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.BatchChannelMemberships - if *v == nil { - sv = &types.BatchChannelMemberships{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "InvitedBy": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.InvitedBy, value); err != nil { - return err - } - - case "Members": - if err := awsRestjson1_deserializeDocumentMembers(&sv.Members, value); err != nil { - return err - } - - case "Type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelMembershipType to be of type string, got %T instead", value) - } - sv.Type = types.ChannelMembershipType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentBatchCreateAttendeeErrorList(v *[]types.CreateAttendeeError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.CreateAttendeeError - if *v == nil { - cv = []types.CreateAttendeeError{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.CreateAttendeeError - destAddr := &col - if err := awsRestjson1_deserializeDocumentCreateAttendeeError(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentBatchCreateChannelMembershipError(v **types.BatchCreateChannelMembershipError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.BatchCreateChannelMembershipError - if *v == nil { - sv = &types.BatchCreateChannelMembershipError{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ErrorCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.ErrorCode = types.ErrorCode(jtv) - } - - case "ErrorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } - - case "MemberArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.MemberArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentBatchCreateChannelMembershipErrors(v *[]types.BatchCreateChannelMembershipError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.BatchCreateChannelMembershipError - if *v == nil { - cv = []types.BatchCreateChannelMembershipError{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.BatchCreateChannelMembershipError - destAddr := &col - if err := awsRestjson1_deserializeDocumentBatchCreateChannelMembershipError(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentBot(v **types.Bot, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Bot - if *v == nil { - sv = &types.Bot{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "BotEmail": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.BotEmail = ptr.String(jtv) - } - - case "BotId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.BotId = ptr.String(jtv) - } - - case "BotType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BotType to be of type string, got %T instead", value) - } - sv.BotType = types.BotType(jtv) - } - - case "CreatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(t) - } - - case "Disabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.Disabled = ptr.Bool(jtv) - } - - case "DisplayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "SecurityToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.SecurityToken = ptr.String(jtv) - } - - case "UpdatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedTimestamp = ptr.Time(t) - } - - case "UserId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UserId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentBotList(v *[]types.Bot, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Bot - if *v == nil { - cv = []types.Bot{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Bot - destAddr := &col - if err := awsRestjson1_deserializeDocumentBot(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentBusinessCallingSettings(v **types.BusinessCallingSettings, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.BusinessCallingSettings - if *v == nil { - sv = &types.BusinessCallingSettings{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "CdrBucket": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.CdrBucket = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentCallingRegionList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CallingRegion to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentCandidateAddress(v **types.CandidateAddress, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.CandidateAddress - if *v == nil { - sv = &types.CandidateAddress{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "city": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.City = ptr.String(jtv) - } - - case "country": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.Country = ptr.String(jtv) - } - - case "postalCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.PostalCode = ptr.String(jtv) - } - - case "postalCodePlus4": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.PostalCodePlus4 = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.State = ptr.String(jtv) - } - - case "streetInfo": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.StreetInfo = ptr.String(jtv) - } - - case "streetNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveNonEmptyString to be of type string, got %T instead", value) - } - sv.StreetNumber = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentCandidateAddressList(v *[]types.CandidateAddress, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.CandidateAddress - if *v == nil { - cv = []types.CandidateAddress{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.CandidateAddress - destAddr := &col - if err := awsRestjson1_deserializeDocumentCandidateAddress(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentCapabilityList(v *[]types.Capability, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Capability - if *v == nil { - cv = []types.Capability{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Capability - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Capability to be of type string, got %T instead", value) - } - col = types.Capability(jtv) - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentChannel(v **types.Channel, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Channel - if *v == nil { - sv = &types.Channel{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "CreatedBy": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.CreatedBy, value); err != nil { - return err - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastMessageTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastMessageTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastUpdatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Metadata": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) - } - sv.Metadata = ptr.String(jtv) - } - - case "Mode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelMode to be of type string, got %T instead", value) - } - sv.Mode = types.ChannelMode(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "Privacy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelPrivacy to be of type string, got %T instead", value) - } - sv.Privacy = types.ChannelPrivacy(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelBan(v **types.ChannelBan, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelBan - if *v == nil { - sv = &types.ChannelBan{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "CreatedBy": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.CreatedBy, value); err != nil { - return err - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Member": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelBanSummary(v **types.ChannelBanSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelBanSummary - if *v == nil { - sv = &types.ChannelBanSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Member": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelBanSummaryList(v *[]types.ChannelBanSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ChannelBanSummary - if *v == nil { - cv = []types.ChannelBanSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ChannelBanSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentChannelBanSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentChannelMembership(v **types.ChannelMembership, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelMembership - if *v == nil { - sv = &types.ChannelMembership{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "InvitedBy": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.InvitedBy, value); err != nil { - return err - } - - case "LastUpdatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Member": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { - return err - } - - case "Type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelMembershipType to be of type string, got %T instead", value) - } - sv.Type = types.ChannelMembershipType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummary(v **types.ChannelMembershipForAppInstanceUserSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelMembershipForAppInstanceUserSummary - if *v == nil { - sv = &types.ChannelMembershipForAppInstanceUserSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AppInstanceUserMembershipSummary": - if err := awsRestjson1_deserializeDocumentAppInstanceUserMembershipSummary(&sv.AppInstanceUserMembershipSummary, value); err != nil { - return err - } - - case "ChannelSummary": - if err := awsRestjson1_deserializeDocumentChannelSummary(&sv.ChannelSummary, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummaryList(v *[]types.ChannelMembershipForAppInstanceUserSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ChannelMembershipForAppInstanceUserSummary - if *v == nil { - cv = []types.ChannelMembershipForAppInstanceUserSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ChannelMembershipForAppInstanceUserSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentChannelMembershipForAppInstanceUserSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentChannelMembershipSummary(v **types.ChannelMembershipSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelMembershipSummary - if *v == nil { - sv = &types.ChannelMembershipSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Member": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Member, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelMembershipSummaryList(v *[]types.ChannelMembershipSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ChannelMembershipSummary - if *v == nil { - cv = []types.ChannelMembershipSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ChannelMembershipSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentChannelMembershipSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentChannelMessage(v **types.ChannelMessage, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelMessage - if *v == nil { - sv = &types.ChannelMessage{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "Content": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Content to be of type string, got %T instead", value) - } - sv.Content = ptr.String(jtv) - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastEditedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastEditedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastUpdatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "MessageId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) - } - sv.MessageId = ptr.String(jtv) - } - - case "Metadata": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) - } - sv.Metadata = ptr.String(jtv) - } - - case "Persistence": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelMessagePersistenceType to be of type string, got %T instead", value) - } - sv.Persistence = types.ChannelMessagePersistenceType(jtv) - } - - case "Redacted": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NonNullableBoolean to be of type *bool, got %T instead", value) - } - sv.Redacted = jtv - } - - case "Sender": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Sender, value); err != nil { - return err - } - - case "Type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelMessageType to be of type string, got %T instead", value) - } - sv.Type = types.ChannelMessageType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelMessageSummary(v **types.ChannelMessageSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelMessageSummary - if *v == nil { - sv = &types.ChannelMessageSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Content": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Content to be of type string, got %T instead", value) - } - sv.Content = ptr.String(jtv) - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastEditedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastEditedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "LastUpdatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastUpdatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "MessageId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MessageId to be of type string, got %T instead", value) - } - sv.MessageId = ptr.String(jtv) - } - - case "Metadata": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) - } - sv.Metadata = ptr.String(jtv) - } - - case "Redacted": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NonNullableBoolean to be of type *bool, got %T instead", value) - } - sv.Redacted = jtv - } - - case "Sender": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Sender, value); err != nil { - return err - } - - case "Type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelMessageType to be of type string, got %T instead", value) - } - sv.Type = types.ChannelMessageType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelMessageSummaryList(v *[]types.ChannelMessageSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ChannelMessageSummary - if *v == nil { - cv = []types.ChannelMessageSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ChannelMessageSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentChannelMessageSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummary(v **types.ChannelModeratedByAppInstanceUserSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelModeratedByAppInstanceUserSummary - if *v == nil { - sv = &types.ChannelModeratedByAppInstanceUserSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelSummary": - if err := awsRestjson1_deserializeDocumentChannelSummary(&sv.ChannelSummary, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummaryList(v *[]types.ChannelModeratedByAppInstanceUserSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ChannelModeratedByAppInstanceUserSummary - if *v == nil { - cv = []types.ChannelModeratedByAppInstanceUserSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ChannelModeratedByAppInstanceUserSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentChannelModeratedByAppInstanceUserSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentChannelModerator(v **types.ChannelModerator, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelModerator - if *v == nil { - sv = &types.ChannelModerator{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "CreatedBy": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.CreatedBy, value); err != nil { - return err - } - - case "CreatedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Moderator": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Moderator, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelModeratorSummary(v **types.ChannelModeratorSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelModeratorSummary - if *v == nil { - sv = &types.ChannelModeratorSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Moderator": - if err := awsRestjson1_deserializeDocumentIdentity(&sv.Moderator, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelModeratorSummaryList(v *[]types.ChannelModeratorSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ChannelModeratorSummary - if *v == nil { - cv = []types.ChannelModeratorSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ChannelModeratorSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentChannelModeratorSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentChannelRetentionSettings(v **types.ChannelRetentionSettings, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelRetentionSettings - if *v == nil { - sv = &types.ChannelRetentionSettings{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "RetentionDays": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected RetentionDays to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.RetentionDays = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelSummary(v **types.ChannelSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChannelSummary - if *v == nil { - sv = &types.ChannelSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChannelArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.ChannelArn = ptr.String(jtv) - } - - case "LastMessageTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastMessageTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected Timestamp to be a JSON Number, got %T instead", value) - - } - } - - case "Metadata": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Metadata to be of type string, got %T instead", value) - } - sv.Metadata = ptr.String(jtv) - } - - case "Mode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelMode to be of type string, got %T instead", value) - } - sv.Mode = types.ChannelMode(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "Privacy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChannelPrivacy to be of type string, got %T instead", value) - } - sv.Privacy = types.ChannelPrivacy(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentChannelSummaryList(v *[]types.ChannelSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.ChannelSummary - if *v == nil { - cv = []types.ChannelSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ChannelSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentChannelSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentChimeSdkMeetingConfiguration(v **types.ChimeSdkMeetingConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ChimeSdkMeetingConfiguration - if *v == nil { - sv = &types.ChimeSdkMeetingConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ArtifactsConfiguration": - if err := awsRestjson1_deserializeDocumentArtifactsConfiguration(&sv.ArtifactsConfiguration, value); err != nil { - return err - } - - case "SourceConfiguration": - if err := awsRestjson1_deserializeDocumentSourceConfiguration(&sv.SourceConfiguration, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ConflictException - if *v == nil { - sv = &types.ConflictException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.Code = types.ErrorCode(jtv) - } - - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentContentArtifactsConfiguration(v **types.ContentArtifactsConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ContentArtifactsConfiguration - if *v == nil { - sv = &types.ContentArtifactsConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "MuxType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ContentMuxType to be of type string, got %T instead", value) - } - sv.MuxType = types.ContentMuxType(jtv) - } - - case "State": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ArtifactsState to be of type string, got %T instead", value) - } - sv.State = types.ArtifactsState(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentConversationRetentionSettings(v **types.ConversationRetentionSettings, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ConversationRetentionSettings - if *v == nil { - sv = &types.ConversationRetentionSettings{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "RetentionDays": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected RetentionDays to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.RetentionDays = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentCreateAttendeeError(v **types.CreateAttendeeError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.CreateAttendeeError - if *v == nil { - sv = &types.CreateAttendeeError{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ErrorCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ErrorCode = ptr.String(jtv) - } - - case "ErrorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } - - case "ExternalUserId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExternalUserIdType to be of type string, got %T instead", value) - } - sv.ExternalUserId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentDNISEmergencyCallingConfiguration(v **types.DNISEmergencyCallingConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.DNISEmergencyCallingConfiguration - if *v == nil { - sv = &types.DNISEmergencyCallingConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "CallingCountry": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Alpha2CountryCode to be of type string, got %T instead", value) - } - sv.CallingCountry = ptr.String(jtv) - } - - case "EmergencyPhoneNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) - } - sv.EmergencyPhoneNumber = ptr.String(jtv) - } - - case "TestPhoneNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) - } - sv.TestPhoneNumber = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentDNISEmergencyCallingConfigurationList(v *[]types.DNISEmergencyCallingConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.DNISEmergencyCallingConfiguration - if *v == nil { - cv = []types.DNISEmergencyCallingConfiguration{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.DNISEmergencyCallingConfiguration - destAddr := &col - if err := awsRestjson1_deserializeDocumentDNISEmergencyCallingConfiguration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentE164PhoneNumberList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentEmergencyCallingConfiguration(v **types.EmergencyCallingConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.EmergencyCallingConfiguration - if *v == nil { - sv = &types.EmergencyCallingConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "DNIS": - if err := awsRestjson1_deserializeDocumentDNISEmergencyCallingConfigurationList(&sv.DNIS, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentEventsConfiguration(v **types.EventsConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.EventsConfiguration - if *v == nil { - sv = &types.EventsConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "BotId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.BotId = ptr.String(jtv) - } - - case "LambdaFunctionArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.LambdaFunctionArn = ptr.String(jtv) - } - - case "OutboundEventsHTTPSEndpoint": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.OutboundEventsHTTPSEndpoint = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentExternalUserIdList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } - - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExternalUserIdType to be of type string, got %T instead", value) - } - col = jtv - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.ForbiddenException - if *v == nil { - sv = &types.ForbiddenException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.Code = types.ErrorCode(jtv) - } - - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentGeoMatchParams(v **types.GeoMatchParams, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.GeoMatchParams - if *v == nil { - sv = &types.GeoMatchParams{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AreaCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AreaCode to be of type string, got %T instead", value) - } - sv.AreaCode = ptr.String(jtv) - } - - case "Country": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Country to be of type string, got %T instead", value) - } - sv.Country = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentIdentity(v **types.Identity, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Identity - if *v == nil { - sv = &types.Identity{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInvite(v **types.Invite, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Invite - if *v == nil { - sv = &types.Invite{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EmailAddress": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) - } - sv.EmailAddress = ptr.String(jtv) - } - - case "EmailStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmailStatus to be of type string, got %T instead", value) - } - sv.EmailStatus = types.EmailStatus(jtv) - } - - case "InviteId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.InviteId = ptr.String(jtv) - } - - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InviteStatus to be of type string, got %T instead", value) - } - sv.Status = types.InviteStatus(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentInviteList(v *[]types.Invite, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Invite - if *v == nil { - cv = []types.Invite{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Invite - destAddr := &col - if err := awsRestjson1_deserializeDocumentInvite(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentLicenseList(v *[]types.License, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.License - if *v == nil { - cv = []types.License{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.License - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected License to be of type string, got %T instead", value) - } - col = types.License(jtv) - } - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentLoggingConfiguration(v **types.LoggingConfiguration, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.LoggingConfiguration - if *v == nil { - sv = &types.LoggingConfiguration{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "EnableMediaMetricLogs": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.EnableMediaMetricLogs = ptr.Bool(jtv) - } - - case "EnableSIPLogs": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.EnableSIPLogs = ptr.Bool(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentMediaCapturePipeline(v **types.MediaCapturePipeline, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.MediaCapturePipeline - if *v == nil { - sv = &types.MediaCapturePipeline{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ChimeSdkMeetingConfiguration": - if err := awsRestjson1_deserializeDocumentChimeSdkMeetingConfiguration(&sv.ChimeSdkMeetingConfiguration, value); err != nil { - return err - } - - case "CreatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(t) - } - - case "MediaPipelineId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) - } - sv.MediaPipelineId = ptr.String(jtv) - } - - case "SinkArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.SinkArn = ptr.String(jtv) - } - - case "SinkType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MediaPipelineSinkType to be of type string, got %T instead", value) - } - sv.SinkType = types.MediaPipelineSinkType(jtv) - } - - case "SourceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.SourceArn = ptr.String(jtv) - } - - case "SourceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MediaPipelineSourceType to be of type string, got %T instead", value) - } - sv.SourceType = types.MediaPipelineSourceType(jtv) - } - - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MediaPipelineStatus to be of type string, got %T instead", value) - } - sv.Status = types.MediaPipelineStatus(jtv) - } - - case "UpdatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedTimestamp = ptr.Time(t) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentMediaCapturePipelineList(v *[]types.MediaCapturePipeline, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.MediaCapturePipeline - if *v == nil { - cv = []types.MediaCapturePipeline{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.MediaCapturePipeline - destAddr := &col - if err := awsRestjson1_deserializeDocumentMediaCapturePipeline(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentMediaPlacement(v **types.MediaPlacement, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.MediaPlacement - if *v == nil { - sv = &types.MediaPlacement{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AudioFallbackUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UriType to be of type string, got %T instead", value) - } - sv.AudioFallbackUrl = ptr.String(jtv) - } - - case "AudioHostUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UriType to be of type string, got %T instead", value) - } - sv.AudioHostUrl = ptr.String(jtv) - } - - case "EventIngestionUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UriType to be of type string, got %T instead", value) - } - sv.EventIngestionUrl = ptr.String(jtv) - } - - case "ScreenDataUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UriType to be of type string, got %T instead", value) - } - sv.ScreenDataUrl = ptr.String(jtv) - } - - case "ScreenSharingUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UriType to be of type string, got %T instead", value) - } - sv.ScreenSharingUrl = ptr.String(jtv) - } - - case "ScreenViewingUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UriType to be of type string, got %T instead", value) - } - sv.ScreenViewingUrl = ptr.String(jtv) - } - - case "SignalingUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UriType to be of type string, got %T instead", value) - } - sv.SignalingUrl = ptr.String(jtv) - } - - case "TurnControlUrl": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UriType to be of type string, got %T instead", value) - } - sv.TurnControlUrl = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentMeeting(v **types.Meeting, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Meeting - if *v == nil { - sv = &types.Meeting{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ExternalMeetingId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ExternalMeetingIdType to be of type string, got %T instead", value) - } - sv.ExternalMeetingId = ptr.String(jtv) - } - - case "MediaPlacement": - if err := awsRestjson1_deserializeDocumentMediaPlacement(&sv.MediaPlacement, value); err != nil { - return err - } - - case "MediaRegion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.MediaRegion = ptr.String(jtv) - } - - case "MeetingId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) - } - sv.MeetingId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentMeetingList(v *[]types.Meeting, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Meeting - if *v == nil { - cv = []types.Meeting{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Meeting - destAddr := &col - if err := awsRestjson1_deserializeDocumentMeeting(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentMember(v **types.Member, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Member - if *v == nil { - sv = &types.Member{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.AccountId = ptr.String(jtv) - } - - case "Email": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.Email = ptr.String(jtv) - } - - case "FullName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.FullName = ptr.String(jtv) - } - - case "MemberId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.MemberId = ptr.String(jtv) - } - - case "MemberType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected MemberType to be of type string, got %T instead", value) - } - sv.MemberType = types.MemberType(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentMemberError(v **types.MemberError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.MemberError - if *v == nil { - sv = &types.MemberError{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ErrorCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.ErrorCode = types.ErrorCode(jtv) - } - - case "ErrorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } - - case "MemberId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.MemberId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentMemberErrorList(v *[]types.MemberError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.MemberError - if *v == nil { - cv = []types.MemberError{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.MemberError - destAddr := &col - if err := awsRestjson1_deserializeDocumentMemberError(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentMembers(v *[]types.Identity, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Identity - if *v == nil { - cv = []types.Identity{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Identity - destAddr := &col - if err := awsRestjson1_deserializeDocumentIdentity(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentMessagingSessionEndpoint(v **types.MessagingSessionEndpoint, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.MessagingSessionEndpoint - if *v == nil { - sv = &types.MessagingSessionEndpoint{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Url": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UrlType to be of type string, got %T instead", value) - } - sv.Url = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.NotFoundException - if *v == nil { - sv = &types.NotFoundException{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.Code = types.ErrorCode(jtv) - } - - case "message", "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentOrderedPhoneNumber(v **types.OrderedPhoneNumber, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.OrderedPhoneNumber - if *v == nil { - sv = &types.OrderedPhoneNumber{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "E164PhoneNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) - } - sv.E164PhoneNumber = ptr.String(jtv) - } - - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OrderedPhoneNumberStatus to be of type string, got %T instead", value) - } - sv.Status = types.OrderedPhoneNumberStatus(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentOrderedPhoneNumberList(v *[]types.OrderedPhoneNumber, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.OrderedPhoneNumber - if *v == nil { - cv = []types.OrderedPhoneNumber{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.OrderedPhoneNumber - destAddr := &col - if err := awsRestjson1_deserializeDocumentOrderedPhoneNumber(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentOrigination(v **types.Origination, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Origination - if *v == nil { - sv = &types.Origination{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Disabled": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.Disabled = ptr.Bool(jtv) - } - - case "Routes": - if err := awsRestjson1_deserializeDocumentOriginationRouteList(&sv.Routes, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentOriginationRoute(v **types.OriginationRoute, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.OriginationRoute - if *v == nil { - sv = &types.OriginationRoute{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Host": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Host = ptr.String(jtv) - } - - case "Port": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Port to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Port = ptr.Int32(int32(i64)) - } - - case "Priority": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected OriginationRoutePriority to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Priority = ptr.Int32(int32(i64)) - } - - case "Protocol": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OriginationRouteProtocol to be of type string, got %T instead", value) - } - sv.Protocol = types.OriginationRouteProtocol(jtv) - } - - case "Weight": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected OriginationRouteWeight to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Weight = ptr.Int32(int32(i64)) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentOriginationRouteList(v *[]types.OriginationRoute, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.OriginationRoute - if *v == nil { - cv = []types.OriginationRoute{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.OriginationRoute - destAddr := &col - if err := awsRestjson1_deserializeDocumentOriginationRoute(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentParticipant(v **types.Participant, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.Participant - if *v == nil { - sv = &types.Participant{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "PhoneNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) - } - sv.PhoneNumber = ptr.String(jtv) - } - - case "ProxyPhoneNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) - } - sv.ProxyPhoneNumber = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentParticipants(v *[]types.Participant, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.Participant - if *v == nil { - cv = []types.Participant{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Participant - destAddr := &col - if err := awsRestjson1_deserializeDocumentParticipant(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentPhoneNumber(v **types.PhoneNumber, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.PhoneNumber - if *v == nil { - sv = &types.PhoneNumber{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Associations": - if err := awsRestjson1_deserializeDocumentPhoneNumberAssociationList(&sv.Associations, value); err != nil { - return err - } - - case "CallingName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CallingName to be of type string, got %T instead", value) - } - sv.CallingName = ptr.String(jtv) - } - - case "CallingNameStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected CallingNameStatus to be of type string, got %T instead", value) - } - sv.CallingNameStatus = types.CallingNameStatus(jtv) - } - - case "Capabilities": - if err := awsRestjson1_deserializeDocumentPhoneNumberCapabilities(&sv.Capabilities, value); err != nil { - return err - } - - case "Country": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Alpha2CountryCode to be of type string, got %T instead", value) - } - sv.Country = ptr.String(jtv) - } - - case "CreatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(t) - } - - case "DeletionTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.DeletionTimestamp = ptr.Time(t) - } - - case "E164PhoneNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) - } - sv.E164PhoneNumber = ptr.String(jtv) - } - - case "PhoneNumberId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.PhoneNumberId = ptr.String(jtv) - } - - case "ProductType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PhoneNumberProductType to be of type string, got %T instead", value) - } - sv.ProductType = types.PhoneNumberProductType(jtv) - } - - case "Status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PhoneNumberStatus to be of type string, got %T instead", value) - } - sv.Status = types.PhoneNumberStatus(jtv) - } - - case "Type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PhoneNumberType to be of type string, got %T instead", value) - } - sv.Type = types.PhoneNumberType(jtv) - } - - case "UpdatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.UpdatedTimestamp = ptr.Time(t) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentPhoneNumberAssociation(v **types.PhoneNumberAssociation, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.PhoneNumberAssociation - if *v == nil { - sv = &types.PhoneNumberAssociation{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "AssociatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.AssociatedTimestamp = ptr.Time(t) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PhoneNumberAssociationName to be of type string, got %T instead", value) - } - sv.Name = types.PhoneNumberAssociationName(jtv) - } - - case "Value": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Value = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentPhoneNumberAssociationList(v *[]types.PhoneNumberAssociation, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.PhoneNumberAssociation - if *v == nil { - cv = []types.PhoneNumberAssociation{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.PhoneNumberAssociation - destAddr := &col - if err := awsRestjson1_deserializeDocumentPhoneNumberAssociation(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentPhoneNumberCapabilities(v **types.PhoneNumberCapabilities, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.PhoneNumberCapabilities - if *v == nil { - sv = &types.PhoneNumberCapabilities{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "InboundCall": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.InboundCall = ptr.Bool(jtv) - } - - case "InboundMMS": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.InboundMMS = ptr.Bool(jtv) - } - - case "InboundSMS": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.InboundSMS = ptr.Bool(jtv) - } - - case "OutboundCall": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.OutboundCall = ptr.Bool(jtv) - } - - case "OutboundMMS": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.OutboundMMS = ptr.Bool(jtv) - } - - case "OutboundSMS": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) - } - sv.OutboundSMS = ptr.Bool(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentPhoneNumberCountriesList(v *[]types.PhoneNumberCountry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.PhoneNumberCountry - if *v == nil { - cv = []types.PhoneNumberCountry{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.PhoneNumberCountry - destAddr := &col - if err := awsRestjson1_deserializeDocumentPhoneNumberCountry(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentPhoneNumberCountry(v **types.PhoneNumberCountry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.PhoneNumberCountry - if *v == nil { - sv = &types.PhoneNumberCountry{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "CountryCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Alpha2CountryCode to be of type string, got %T instead", value) - } - sv.CountryCode = ptr.String(jtv) - } - - case "SupportedPhoneNumberTypes": - if err := awsRestjson1_deserializeDocumentPhoneNumberTypeList(&sv.SupportedPhoneNumberTypes, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentPhoneNumberError(v **types.PhoneNumberError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.PhoneNumberError - if *v == nil { - sv = &types.PhoneNumberError{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "ErrorCode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.ErrorCode = types.ErrorCode(jtv) - } - - case "ErrorMessage": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ErrorMessage = ptr.String(jtv) - } - - case "PhoneNumberId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.PhoneNumberId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentPhoneNumberErrorList(v *[]types.PhoneNumberError, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil + return err } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + err := awsRestjson1_deserializeDocumentUnprocessableEntityException(&output, shape) - var cv []types.PhoneNumberError - if *v == nil { - cv = []types.PhoneNumberError{} - } else { - cv = *v + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err } - for _, value := range shape { - var col types.PhoneNumberError - destAddr := &col - if err := awsRestjson1_deserializeDocumentPhoneNumberError(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + errorBody.Seek(0, io.SeekStart) - } - *v = cv - return nil + return output } -func awsRestjson1_deserializeDocumentPhoneNumberList(v *[]types.PhoneNumber, value interface{}) error { +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36016,33 +10137,48 @@ func awsRestjson1_deserializeDocumentPhoneNumberList(v *[]types.PhoneNumber, val return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PhoneNumber + var sv *types.AccessDeniedException if *v == nil { - cv = []types.PhoneNumber{} + sv = &types.AccessDeniedException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.PhoneNumber - destAddr := &col - if err := awsRestjson1_deserializeDocumentPhoneNumber(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentPhoneNumberOrder(v **types.PhoneNumberOrder, value interface{}) error { +func awsRestjson1_deserializeDocumentAccount(v **types.Account, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36055,61 +10191,52 @@ func awsRestjson1_deserializeDocumentPhoneNumberOrder(v **types.PhoneNumberOrder return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.PhoneNumberOrder + var sv *types.Account if *v == nil { - sv = &types.PhoneNumberOrder{} + sv = &types.Account{} } else { sv = *v } for key, value := range shape { switch key { - case "CreatedTimestamp": + case "AccountId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CreatedTimestamp = ptr.Time(t) - } - - case "OrderedPhoneNumbers": - if err := awsRestjson1_deserializeDocumentOrderedPhoneNumberList(&sv.OrderedPhoneNumbers, value); err != nil { - return err + sv.AccountId = ptr.String(jtv) } - case "PhoneNumberOrderId": + case "AccountStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) + return fmt.Errorf("expected AccountStatus to be of type string, got %T instead", value) } - sv.PhoneNumberOrderId = ptr.String(jtv) + sv.AccountStatus = types.AccountStatus(jtv) } - case "ProductType": + case "AccountType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PhoneNumberProductType to be of type string, got %T instead", value) + return fmt.Errorf("expected AccountType to be of type string, got %T instead", value) } - sv.ProductType = types.PhoneNumberProductType(jtv) + sv.AccountType = types.AccountType(jtv) } - case "Status": + case "AwsAccountId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PhoneNumberOrderStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Status = types.PhoneNumberOrderStatus(jtv) + sv.AwsAccountId = ptr.String(jtv) } - case "UpdatedTimestamp": + case "CreatedTimestamp": if value != nil { jtv, ok := value.(string) if !ok { @@ -36119,7 +10246,35 @@ func awsRestjson1_deserializeDocumentPhoneNumberOrder(v **types.PhoneNumberOrder if err != nil { return err } - sv.UpdatedTimestamp = ptr.Time(t) + sv.CreatedTimestamp = ptr.Time(t) + } + + case "DefaultLicense": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected License to be of type string, got %T instead", value) + } + sv.DefaultLicense = types.License(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "SigninDelegateGroups": + if err := awsRestjson1_deserializeDocumentSigninDelegateGroupList(&sv.SigninDelegateGroups, value); err != nil { + return err + } + + case "SupportedLicenses": + if err := awsRestjson1_deserializeDocumentLicenseList(&sv.SupportedLicenses, value); err != nil { + return err } default: @@ -36131,7 +10286,7 @@ func awsRestjson1_deserializeDocumentPhoneNumberOrder(v **types.PhoneNumberOrder return nil } -func awsRestjson1_deserializeDocumentPhoneNumberOrderList(v *[]types.PhoneNumberOrder, value interface{}) error { +func awsRestjson1_deserializeDocumentAccountList(v *[]types.Account, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36144,17 +10299,17 @@ func awsRestjson1_deserializeDocumentPhoneNumberOrderList(v *[]types.PhoneNumber return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PhoneNumberOrder + var cv []types.Account if *v == nil { - cv = []types.PhoneNumberOrder{} + cv = []types.Account{} } else { cv = *v } for _, value := range shape { - var col types.PhoneNumberOrder + var col types.Account destAddr := &col - if err := awsRestjson1_deserializeDocumentPhoneNumberOrder(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentAccount(&destAddr, value); err != nil { return err } col = *destAddr @@ -36165,7 +10320,7 @@ func awsRestjson1_deserializeDocumentPhoneNumberOrderList(v *[]types.PhoneNumber return nil } -func awsRestjson1_deserializeDocumentPhoneNumberTypeList(v *[]types.PhoneNumberType, value interface{}) error { +func awsRestjson1_deserializeDocumentAccountSettings(v **types.AccountSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36173,35 +10328,48 @@ func awsRestjson1_deserializeDocumentPhoneNumberTypeList(v *[]types.PhoneNumberT return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.PhoneNumberType + var sv *types.AccountSettings if *v == nil { - cv = []types.PhoneNumberType{} + sv = &types.AccountSettings{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.PhoneNumberType - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected PhoneNumberType to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "DisableRemoteControl": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.DisableRemoteControl = ptr.Bool(jtv) + } + + case "EnableDialOut": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnableDialOut = ptr.Bool(jtv) } - col = types.PhoneNumberType(jtv) - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentProxy(v **types.Proxy, value interface{}) error { +func awsRestjson1_deserializeDocumentAlexaForBusinessMetadata(v **types.AlexaForBusinessMetadata, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36214,49 +10382,80 @@ func awsRestjson1_deserializeDocumentProxy(v **types.Proxy, value interface{}) e return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Proxy + var sv *types.AlexaForBusinessMetadata if *v == nil { - sv = &types.Proxy{} + sv = &types.AlexaForBusinessMetadata{} } else { sv = *v } for key, value := range shape { switch key { - case "DefaultSessionExpiryMinutes": + case "AlexaForBusinessRoomArn": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.AlexaForBusinessRoomArn = ptr.String(jtv) + } + + case "IsAlexaForBusinessEnabled": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.DefaultSessionExpiryMinutes = ptr.Int32(int32(i64)) + sv.IsAlexaForBusinessEnabled = ptr.Bool(jtv) } - case "Disabled": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.BadRequestException + if *v == nil { + sv = &types.BadRequestException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Code": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) } - sv.Disabled = ptr.Bool(jtv) + sv.Code = types.ErrorCode(jtv) } - case "FallBackPhoneNumber": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.FallBackPhoneNumber = ptr.String(jtv) - } - - case "PhoneNumberCountries": - if err := awsRestjson1_deserializeDocumentStringList(&sv.PhoneNumberCountries, value); err != nil { - return err + sv.Message = ptr.String(jtv) } default: @@ -36268,7 +10467,7 @@ func awsRestjson1_deserializeDocumentProxy(v **types.Proxy, value interface{}) e return nil } -func awsRestjson1_deserializeDocumentProxySession(v **types.ProxySession, value interface{}) error { +func awsRestjson1_deserializeDocumentBot(v **types.Bot, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36281,112 +10480,80 @@ func awsRestjson1_deserializeDocumentProxySession(v **types.ProxySession, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ProxySession + var sv *types.Bot if *v == nil { - sv = &types.ProxySession{} + sv = &types.Bot{} } else { sv = *v } for key, value := range shape { switch key { - case "Capabilities": - if err := awsRestjson1_deserializeDocumentCapabilityList(&sv.Capabilities, value); err != nil { - return err - } - - case "CreatedTimestamp": + case "BotEmail": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) } - sv.CreatedTimestamp = ptr.Time(t) + sv.BotEmail = ptr.String(jtv) } - case "EndedTimestamp": + case "BotId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.EndedTimestamp = ptr.Time(t) - } - - case "ExpiryMinutes": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ExpiryMinutes = ptr.Int32(int32(i64)) + sv.BotId = ptr.String(jtv) } - case "GeoMatchLevel": + case "BotType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GeoMatchLevel to be of type string, got %T instead", value) + return fmt.Errorf("expected BotType to be of type string, got %T instead", value) } - sv.GeoMatchLevel = types.GeoMatchLevel(jtv) - } - - case "GeoMatchParams": - if err := awsRestjson1_deserializeDocumentGeoMatchParams(&sv.GeoMatchParams, value); err != nil { - return err + sv.BotType = types.BotType(jtv) } - case "Name": + case "CreatedTimestamp": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String128 to be of type string, got %T instead", value) + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(t) } - case "NumberSelectionBehavior": + case "Disabled": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected NumberSelectionBehavior to be of type string, got %T instead", value) + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.NumberSelectionBehavior = types.NumberSelectionBehavior(jtv) - } - - case "Participants": - if err := awsRestjson1_deserializeDocumentParticipants(&sv.Participants, value); err != nil { - return err + sv.Disabled = ptr.Bool(jtv) } - case "ProxySessionId": + case "DisplayName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString128 to be of type string, got %T instead", value) + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) } - sv.ProxySessionId = ptr.String(jtv) + sv.DisplayName = ptr.String(jtv) } - case "Status": + case "SecurityToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ProxySessionStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) } - sv.Status = types.ProxySessionStatus(jtv) + sv.SecurityToken = ptr.String(jtv) } case "UpdatedTimestamp": @@ -36402,13 +10569,13 @@ func awsRestjson1_deserializeDocumentProxySession(v **types.ProxySession, value sv.UpdatedTimestamp = ptr.Time(t) } - case "VoiceConnectorId": + case "UserId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString128 to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.VoiceConnectorId = ptr.String(jtv) + sv.UserId = ptr.String(jtv) } default: @@ -36420,7 +10587,7 @@ func awsRestjson1_deserializeDocumentProxySession(v **types.ProxySession, value return nil } -func awsRestjson1_deserializeDocumentProxySessions(v *[]types.ProxySession, value interface{}) error { +func awsRestjson1_deserializeDocumentBotList(v *[]types.Bot, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36433,17 +10600,17 @@ func awsRestjson1_deserializeDocumentProxySessions(v *[]types.ProxySession, valu return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ProxySession + var cv []types.Bot if *v == nil { - cv = []types.ProxySession{} + cv = []types.Bot{} } else { cv = *v } for _, value := range shape { - var col types.ProxySession + var col types.Bot destAddr := &col - if err := awsRestjson1_deserializeDocumentProxySession(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentBot(&destAddr, value); err != nil { return err } col = *destAddr @@ -36454,7 +10621,7 @@ func awsRestjson1_deserializeDocumentProxySessions(v *[]types.ProxySession, valu return nil } -func awsRestjson1_deserializeDocumentResourceLimitExceededException(v **types.ResourceLimitExceededException, value interface{}) error { +func awsRestjson1_deserializeDocumentBusinessCallingSettings(v **types.BusinessCallingSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36467,9 +10634,49 @@ func awsRestjson1_deserializeDocumentResourceLimitExceededException(v **types.Re return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ResourceLimitExceededException + var sv *types.BusinessCallingSettings if *v == nil { - sv = &types.ResourceLimitExceededException{} + sv = &types.BusinessCallingSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "CdrBucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CdrBucket = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} } else { sv = *v } @@ -36503,7 +10710,7 @@ func awsRestjson1_deserializeDocumentResourceLimitExceededException(v **types.Re return nil } -func awsRestjson1_deserializeDocumentRetentionSettings(v **types.RetentionSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentConversationRetentionSettings(v **types.ConversationRetentionSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36516,23 +10723,26 @@ func awsRestjson1_deserializeDocumentRetentionSettings(v **types.RetentionSettin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RetentionSettings + var sv *types.ConversationRetentionSettings if *v == nil { - sv = &types.RetentionSettings{} + sv = &types.ConversationRetentionSettings{} } else { sv = *v } for key, value := range shape { switch key { - case "ConversationRetentionSettings": - if err := awsRestjson1_deserializeDocumentConversationRetentionSettings(&sv.ConversationRetentionSettings, value); err != nil { - return err - } - - case "RoomRetentionSettings": - if err := awsRestjson1_deserializeDocumentRoomRetentionSettings(&sv.RoomRetentionSettings, value); err != nil { - return err + case "RetentionDays": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected RetentionDays to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RetentionDays = ptr.Int32(int32(i64)) } default: @@ -36544,7 +10754,43 @@ func awsRestjson1_deserializeDocumentRetentionSettings(v **types.RetentionSettin return nil } -func awsRestjson1_deserializeDocumentRoom(v **types.Room, value interface{}) error { +func awsRestjson1_deserializeDocumentE164PhoneNumberList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentEventsConfiguration(v **types.EventsConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36557,75 +10803,40 @@ func awsRestjson1_deserializeDocumentRoom(v **types.Room, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Room + var sv *types.EventsConfiguration if *v == nil { - sv = &types.Room{} + sv = &types.EventsConfiguration{} } else { sv = *v } for key, value := range shape { switch key { - case "AccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.AccountId = ptr.String(jtv) - } - - case "CreatedBy": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.CreatedBy = ptr.String(jtv) - } - - case "CreatedTimestamp": + case "BotId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CreatedTimestamp = ptr.Time(t) + sv.BotId = ptr.String(jtv) } - case "Name": + case "LambdaFunctionArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) - } - - case "RoomId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.RoomId = ptr.String(jtv) + sv.LambdaFunctionArn = ptr.String(jtv) } - case "UpdatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + case "OutboundEventsHTTPSEndpoint": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) } - sv.UpdatedTimestamp = ptr.Time(t) + sv.OutboundEventsHTTPSEndpoint = ptr.String(jtv) } default: @@ -36637,7 +10848,7 @@ func awsRestjson1_deserializeDocumentRoom(v **types.Room, value interface{}) err return nil } -func awsRestjson1_deserializeDocumentRoomList(v *[]types.Room, value interface{}) error { +func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36645,33 +10856,48 @@ func awsRestjson1_deserializeDocumentRoomList(v *[]types.Room, value interface{} return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Room + var sv *types.ForbiddenException if *v == nil { - cv = []types.Room{} + sv = &types.ForbiddenException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Room - destAddr := &col - if err := awsRestjson1_deserializeDocumentRoom(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentRoomMembership(v **types.RoomMembership, value interface{}) error { +func awsRestjson1_deserializeDocumentInvite(v **types.Invite, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36684,58 +10910,49 @@ func awsRestjson1_deserializeDocumentRoomMembership(v **types.RoomMembership, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RoomMembership + var sv *types.Invite if *v == nil { - sv = &types.RoomMembership{} + sv = &types.Invite{} } else { sv = *v } for key, value := range shape { switch key { - case "InvitedBy": + case "EmailAddress": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } - sv.InvitedBy = ptr.String(jtv) - } - - case "Member": - if err := awsRestjson1_deserializeDocumentMember(&sv.Member, value); err != nil { - return err + sv.EmailAddress = ptr.String(jtv) } - case "Role": + case "EmailStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RoomMembershipRole to be of type string, got %T instead", value) + return fmt.Errorf("expected EmailStatus to be of type string, got %T instead", value) } - sv.Role = types.RoomMembershipRole(jtv) + sv.EmailStatus = types.EmailStatus(jtv) } - case "RoomId": + case "InviteId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RoomId = ptr.String(jtv) + sv.InviteId = ptr.String(jtv) } - case "UpdatedTimestamp": + case "Status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected InviteStatus to be of type string, got %T instead", value) } - sv.UpdatedTimestamp = ptr.Time(t) + sv.Status = types.InviteStatus(jtv) } default: @@ -36747,7 +10964,7 @@ func awsRestjson1_deserializeDocumentRoomMembership(v **types.RoomMembership, va return nil } -func awsRestjson1_deserializeDocumentRoomMembershipList(v *[]types.RoomMembership, value interface{}) error { +func awsRestjson1_deserializeDocumentInviteList(v *[]types.Invite, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36760,17 +10977,17 @@ func awsRestjson1_deserializeDocumentRoomMembershipList(v *[]types.RoomMembershi return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.RoomMembership + var cv []types.Invite if *v == nil { - cv = []types.RoomMembership{} + cv = []types.Invite{} } else { cv = *v } for _, value := range shape { - var col types.RoomMembership + var col types.Invite destAddr := &col - if err := awsRestjson1_deserializeDocumentRoomMembership(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentInvite(&destAddr, value); err != nil { return err } col = *destAddr @@ -36781,7 +10998,7 @@ func awsRestjson1_deserializeDocumentRoomMembershipList(v *[]types.RoomMembershi return nil } -func awsRestjson1_deserializeDocumentRoomRetentionSettings(v **types.RoomRetentionSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentLicenseList(v *[]types.License, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36789,43 +11006,35 @@ func awsRestjson1_deserializeDocumentRoomRetentionSettings(v **types.RoomRetenti return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.RoomRetentionSettings + var cv []types.License if *v == nil { - sv = &types.RoomRetentionSettings{} + cv = []types.License{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "RetentionDays": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected RetentionDays to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.RetentionDays = ptr.Int32(int32(i64)) + for _, value := range shape { + var col types.License + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected License to be of type string, got %T instead", value) } - - default: - _, _ = key, value - + col = types.License(jtv) } + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentSelectedVideoStreams(v **types.SelectedVideoStreams, value interface{}) error { +func awsRestjson1_deserializeDocumentMember(v **types.Member, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36838,71 +11047,70 @@ func awsRestjson1_deserializeDocumentSelectedVideoStreams(v **types.SelectedVide return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SelectedVideoStreams + var sv *types.Member if *v == nil { - sv = &types.SelectedVideoStreams{} + sv = &types.Member{} } else { sv = *v } for key, value := range shape { switch key { - case "AttendeeIds": - if err := awsRestjson1_deserializeDocumentAttendeeIdList(&sv.AttendeeIds, value); err != nil { - return err + case "AccountId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.AccountId = ptr.String(jtv) } - case "ExternalUserIds": - if err := awsRestjson1_deserializeDocumentExternalUserIdList(&sv.ExternalUserIds, value); err != nil { - return err + case "Email": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.Email = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} + case "FullName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.FullName = ptr.String(jtv) + } -func awsRestjson1_deserializeDocumentSensitiveStringList(v *[]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "MemberId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.MemberId = ptr.String(jtv) + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "MemberType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MemberType to be of type string, got %T instead", value) + } + sv.MemberType = types.MemberType(jtv) + } - var cv []string - if *v == nil { - cv = []string{} - } else { - cv = *v - } + default: + _, _ = key, value - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - col = jtv } - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentServiceFailureException(v **types.ServiceFailureException, value interface{}) error { +func awsRestjson1_deserializeDocumentMemberError(v **types.MemberError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36915,43 +11123,86 @@ func awsRestjson1_deserializeDocumentServiceFailureException(v **types.ServiceFa return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceFailureException + var sv *types.MemberError if *v == nil { - sv = &types.ServiceFailureException{} + sv = &types.MemberError{} } else { sv = *v } for key, value := range shape { switch key { - case "Code": + case "ErrorCode": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) } - sv.Code = types.ErrorCode(jtv) + sv.ErrorCode = types.ErrorCode(jtv) } - case "message", "Message": + case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.ErrorMessage = ptr.String(jtv) + } + + case "MemberId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.MemberId = ptr.String(jtv) } - default: - _, _ = key, value + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentMemberErrorList(v *[]types.MemberError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.MemberError + if *v == nil { + cv = []types.MemberError{} + } else { + cv = *v + } + for _, value := range shape { + var col types.MemberError + destAddr := &col + if err := awsRestjson1_deserializeDocumentMemberError(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { +func awsRestjson1_deserializeDocumentNotFoundException(v **types.NotFoundException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -36964,9 +11215,9 @@ func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.Servi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ServiceUnavailableException + var sv *types.NotFoundException if *v == nil { - sv = &types.ServiceUnavailableException{} + sv = &types.NotFoundException{} } else { sv = *v } @@ -37000,7 +11251,7 @@ func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.Servi return nil } -func awsRestjson1_deserializeDocumentSigninDelegateGroup(v **types.SigninDelegateGroup, value interface{}) error { +func awsRestjson1_deserializeDocumentOrderedPhoneNumber(v **types.OrderedPhoneNumber, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37013,22 +11264,31 @@ func awsRestjson1_deserializeDocumentSigninDelegateGroup(v **types.SigninDelegat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SigninDelegateGroup + var sv *types.OrderedPhoneNumber if *v == nil { - sv = &types.SigninDelegateGroup{} + sv = &types.OrderedPhoneNumber{} } else { sv = *v } for key, value := range shape { switch key { - case "GroupName": + case "E164PhoneNumber": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) } - sv.GroupName = ptr.String(jtv) + sv.E164PhoneNumber = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OrderedPhoneNumberStatus to be of type string, got %T instead", value) + } + sv.Status = types.OrderedPhoneNumberStatus(jtv) } default: @@ -37040,7 +11300,7 @@ func awsRestjson1_deserializeDocumentSigninDelegateGroup(v **types.SigninDelegat return nil } -func awsRestjson1_deserializeDocumentSigninDelegateGroupList(v *[]types.SigninDelegateGroup, value interface{}) error { +func awsRestjson1_deserializeDocumentOrderedPhoneNumberList(v *[]types.OrderedPhoneNumber, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37053,17 +11313,17 @@ func awsRestjson1_deserializeDocumentSigninDelegateGroupList(v *[]types.SigninDe return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.SigninDelegateGroup + var cv []types.OrderedPhoneNumber if *v == nil { - cv = []types.SigninDelegateGroup{} + cv = []types.OrderedPhoneNumber{} } else { cv = *v } for _, value := range shape { - var col types.SigninDelegateGroup + var col types.OrderedPhoneNumber destAddr := &col - if err := awsRestjson1_deserializeDocumentSigninDelegateGroup(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentOrderedPhoneNumber(&destAddr, value); err != nil { return err } col = *destAddr @@ -37074,7 +11334,7 @@ func awsRestjson1_deserializeDocumentSigninDelegateGroupList(v *[]types.SigninDe return nil } -func awsRestjson1_deserializeDocumentSipMediaApplication(v **types.SipMediaApplication, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumber(v **types.PhoneNumber, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37087,22 +11347,50 @@ func awsRestjson1_deserializeDocumentSipMediaApplication(v **types.SipMediaAppli return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SipMediaApplication + var sv *types.PhoneNumber if *v == nil { - sv = &types.SipMediaApplication{} + sv = &types.PhoneNumber{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsRegion": + case "Associations": + if err := awsRestjson1_deserializeDocumentPhoneNumberAssociationList(&sv.Associations, value); err != nil { + return err + } + + case "CallingName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected CallingName to be of type string, got %T instead", value) + } + sv.CallingName = ptr.String(jtv) + } + + case "CallingNameStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CallingNameStatus to be of type string, got %T instead", value) + } + sv.CallingNameStatus = types.CallingNameStatus(jtv) + } + + case "Capabilities": + if err := awsRestjson1_deserializeDocumentPhoneNumberCapabilities(&sv.Capabilities, value); err != nil { + return err + } + + case "Country": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Alpha2CountryCode to be of type string, got %T instead", value) } - sv.AwsRegion = ptr.String(jtv) + sv.Country = ptr.String(jtv) } case "CreatedTimestamp": @@ -37118,27 +11406,62 @@ func awsRestjson1_deserializeDocumentSipMediaApplication(v **types.SipMediaAppli sv.CreatedTimestamp = ptr.Time(t) } - case "Endpoints": - if err := awsRestjson1_deserializeDocumentSipMediaApplicationEndpointList(&sv.Endpoints, value); err != nil { - return err + case "DeletionTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.DeletionTimestamp = ptr.Time(t) } - case "Name": + case "E164PhoneNumber": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SipMediaApplicationName to be of type string, got %T instead", value) + return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.E164PhoneNumber = ptr.String(jtv) } - case "SipMediaApplicationId": + case "PhoneNumberId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.PhoneNumberId = ptr.String(jtv) + } + + case "ProductType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumberProductType to be of type string, got %T instead", value) + } + sv.ProductType = types.PhoneNumberProductType(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumberStatus to be of type string, got %T instead", value) + } + sv.Status = types.PhoneNumberStatus(jtv) + } + + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumberType to be of type string, got %T instead", value) } - sv.SipMediaApplicationId = ptr.String(jtv) + sv.Type = types.PhoneNumberType(jtv) } case "UpdatedTimestamp": @@ -37163,7 +11486,7 @@ func awsRestjson1_deserializeDocumentSipMediaApplication(v **types.SipMediaAppli return nil } -func awsRestjson1_deserializeDocumentSipMediaApplicationCall(v **types.SipMediaApplicationCall, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberAssociation(v **types.PhoneNumberAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37176,142 +11499,56 @@ func awsRestjson1_deserializeDocumentSipMediaApplicationCall(v **types.SipMediaA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SipMediaApplicationCall + var sv *types.PhoneNumberAssociation if *v == nil { - sv = &types.SipMediaApplicationCall{} + sv = &types.PhoneNumberAssociation{} } else { sv = *v } for key, value := range shape { switch key { - case "TransactionId": + case "AssociatedTimestamp": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) } - sv.TransactionId = ptr.String(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.AssociatedTimestamp = ptr.Time(t) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentSipMediaApplicationEndpoint(v **types.SipMediaApplicationEndpoint, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.SipMediaApplicationEndpoint - if *v == nil { - sv = &types.SipMediaApplicationEndpoint{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "LambdaArn": + case "Name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FunctionArn to be of type string, got %T instead", value) + return fmt.Errorf("expected PhoneNumberAssociationName to be of type string, got %T instead", value) } - sv.LambdaArn = ptr.String(jtv) + sv.Name = types.PhoneNumberAssociationName(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentSipMediaApplicationEndpointList(v *[]types.SipMediaApplicationEndpoint, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.SipMediaApplicationEndpoint - if *v == nil { - cv = []types.SipMediaApplicationEndpoint{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.SipMediaApplicationEndpoint - destAddr := &col - if err := awsRestjson1_deserializeDocumentSipMediaApplicationEndpoint(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentSipMediaApplicationList(v *[]types.SipMediaApplication, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var cv []types.SipMediaApplication - if *v == nil { - cv = []types.SipMediaApplication{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.SipMediaApplication - destAddr := &col - if err := awsRestjson1_deserializeDocumentSipMediaApplication(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + case "Value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentSipMediaApplicationLoggingConfiguration(v **types.SipMediaApplicationLoggingConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberAssociationList(v *[]types.PhoneNumberAssociation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37319,39 +11556,33 @@ func awsRestjson1_deserializeDocumentSipMediaApplicationLoggingConfiguration(v * return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SipMediaApplicationLoggingConfiguration + var cv []types.PhoneNumberAssociation if *v == nil { - sv = &types.SipMediaApplicationLoggingConfiguration{} + cv = []types.PhoneNumberAssociation{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "EnableSipMediaApplicationMessageLogs": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.EnableSipMediaApplicationMessageLogs = ptr.Bool(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.PhoneNumberAssociation + destAddr := &col + if err := awsRestjson1_deserializeDocumentPhoneNumberAssociation(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentSipRule(v **types.SipRule, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberCapabilities(v **types.PhoneNumberCapabilities, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37364,89 +11595,67 @@ func awsRestjson1_deserializeDocumentSipRule(v **types.SipRule, value interface{ return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SipRule + var sv *types.PhoneNumberCapabilities if *v == nil { - sv = &types.SipRule{} + sv = &types.PhoneNumberCapabilities{} } else { sv = *v } for key, value := range shape { switch key { - case "CreatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(t) - } - - case "Disabled": + case "InboundCall": if value != nil { jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.Disabled = ptr.Bool(jtv) + sv.InboundCall = ptr.Bool(jtv) } - case "Name": + case "InboundMMS": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected SipRuleName to be of type string, got %T instead", value) + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.InboundMMS = ptr.Bool(jtv) } - case "SipRuleId": + case "InboundSMS": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.SipRuleId = ptr.String(jtv) - } - - case "TargetApplications": - if err := awsRestjson1_deserializeDocumentSipRuleTargetApplicationList(&sv.TargetApplications, value); err != nil { - return err + sv.InboundSMS = ptr.Bool(jtv) } - case "TriggerType": + case "OutboundCall": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected SipRuleTriggerType to be of type string, got %T instead", value) + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.TriggerType = types.SipRuleTriggerType(jtv) + sv.OutboundCall = ptr.Bool(jtv) } - case "TriggerValue": + case "OutboundMMS": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.TriggerValue = ptr.String(jtv) + sv.OutboundMMS = ptr.Bool(jtv) } - case "UpdatedTimestamp": + case "OutboundSMS": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected NullableBoolean to be of type *bool, got %T instead", value) } - sv.UpdatedTimestamp = ptr.Time(t) + sv.OutboundSMS = ptr.Bool(jtv) } default: @@ -37458,7 +11667,7 @@ func awsRestjson1_deserializeDocumentSipRule(v **types.SipRule, value interface{ return nil } -func awsRestjson1_deserializeDocumentSipRuleList(v *[]types.SipRule, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberCountriesList(v *[]types.PhoneNumberCountry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37471,17 +11680,17 @@ func awsRestjson1_deserializeDocumentSipRuleList(v *[]types.SipRule, value inter return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.SipRule + var cv []types.PhoneNumberCountry if *v == nil { - cv = []types.SipRule{} + cv = []types.PhoneNumberCountry{} } else { cv = *v } for _, value := range shape { - var col types.SipRule + var col types.PhoneNumberCountry destAddr := &col - if err := awsRestjson1_deserializeDocumentSipRule(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentPhoneNumberCountry(&destAddr, value); err != nil { return err } col = *destAddr @@ -37492,7 +11701,7 @@ func awsRestjson1_deserializeDocumentSipRuleList(v *[]types.SipRule, value inter return nil } -func awsRestjson1_deserializeDocumentSipRuleTargetApplication(v **types.SipRuleTargetApplication, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberCountry(v **types.PhoneNumberCountry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37505,44 +11714,85 @@ func awsRestjson1_deserializeDocumentSipRuleTargetApplication(v **types.SipRuleT return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SipRuleTargetApplication + var sv *types.PhoneNumberCountry if *v == nil { - sv = &types.SipRuleTargetApplication{} + sv = &types.PhoneNumberCountry{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsRegion": + case "CountryCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Alpha2CountryCode to be of type string, got %T instead", value) } - sv.AwsRegion = ptr.String(jtv) + sv.CountryCode = ptr.String(jtv) + } + + case "SupportedPhoneNumberTypes": + if err := awsRestjson1_deserializeDocumentPhoneNumberTypeList(&sv.SupportedPhoneNumberTypes, value); err != nil { + return err } - case "Priority": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentPhoneNumberError(v **types.PhoneNumberError, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.PhoneNumberError + if *v == nil { + sv = &types.PhoneNumberError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ErrorCode": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SipApplicationPriority to be json.Number, got %T instead", value) + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.ErrorCode = types.ErrorCode(jtv) + } + + case "ErrorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Priority = ptr.Int32(int32(i64)) + sv.ErrorMessage = ptr.String(jtv) } - case "SipMediaApplicationId": + case "PhoneNumberId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.SipMediaApplicationId = ptr.String(jtv) + sv.PhoneNumberId = ptr.String(jtv) } default: @@ -37554,7 +11804,7 @@ func awsRestjson1_deserializeDocumentSipRuleTargetApplication(v **types.SipRuleT return nil } -func awsRestjson1_deserializeDocumentSipRuleTargetApplicationList(v *[]types.SipRuleTargetApplication, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberErrorList(v *[]types.PhoneNumberError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37567,17 +11817,17 @@ func awsRestjson1_deserializeDocumentSipRuleTargetApplicationList(v *[]types.Sip return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.SipRuleTargetApplication + var cv []types.PhoneNumberError if *v == nil { - cv = []types.SipRuleTargetApplication{} + cv = []types.PhoneNumberError{} } else { cv = *v } for _, value := range shape { - var col types.SipRuleTargetApplication + var col types.PhoneNumberError destAddr := &col - if err := awsRestjson1_deserializeDocumentSipRuleTargetApplication(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentPhoneNumberError(&destAddr, value); err != nil { return err } col = *destAddr @@ -37588,7 +11838,7 @@ func awsRestjson1_deserializeDocumentSipRuleTargetApplicationList(v *[]types.Sip return nil } -func awsRestjson1_deserializeDocumentSourceConfiguration(v **types.SourceConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberList(v *[]types.PhoneNumber, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37596,35 +11846,33 @@ func awsRestjson1_deserializeDocumentSourceConfiguration(v **types.SourceConfigu return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.SourceConfiguration + var cv []types.PhoneNumber if *v == nil { - sv = &types.SourceConfiguration{} + cv = []types.PhoneNumber{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "SelectedVideoStreams": - if err := awsRestjson1_deserializeDocumentSelectedVideoStreams(&sv.SelectedVideoStreams, value); err != nil { - return err - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.PhoneNumber + destAddr := &col + if err := awsRestjson1_deserializeDocumentPhoneNumber(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentStreamingConfiguration(v **types.StreamingConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberOrder(v **types.PhoneNumberOrder, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37637,80 +11885,71 @@ func awsRestjson1_deserializeDocumentStreamingConfiguration(v **types.StreamingC return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.StreamingConfiguration + var sv *types.PhoneNumberOrder if *v == nil { - sv = &types.StreamingConfiguration{} + sv = &types.PhoneNumberOrder{} } else { sv = *v } for key, value := range shape { switch key { - case "DataRetentionInHours": + case "CreatedTimestamp": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DataRetentionInHours to be json.Number, got %T instead", value) + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) } - i64, err := jtv.Int64() + t, err := smithytime.ParseDateTime(jtv) if err != nil { return err } - sv.DataRetentionInHours = ptr.Int32(int32(i64)) + sv.CreatedTimestamp = ptr.Time(t) } - case "Disabled": + case "OrderedPhoneNumbers": + if err := awsRestjson1_deserializeDocumentOrderedPhoneNumberList(&sv.OrderedPhoneNumbers, value); err != nil { + return err + } + + case "PhoneNumberOrderId": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected GuidString to be of type string, got %T instead", value) } - sv.Disabled = ptr.Bool(jtv) + sv.PhoneNumberOrderId = ptr.String(jtv) } - case "StreamingNotificationTargets": - if err := awsRestjson1_deserializeDocumentStreamingNotificationTargetList(&sv.StreamingNotificationTargets, value); err != nil { - return err + case "ProductType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumberProductType to be of type string, got %T instead", value) + } + sv.ProductType = types.PhoneNumberProductType(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentStreamingNotificationTarget(v **types.StreamingNotificationTarget, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.StreamingNotificationTarget - if *v == nil { - sv = &types.StreamingNotificationTarget{} - } else { - sv = *v - } + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PhoneNumberOrderStatus to be of type string, got %T instead", value) + } + sv.Status = types.PhoneNumberOrderStatus(jtv) + } - for key, value := range shape { - switch key { - case "NotificationTarget": + case "UpdatedTimestamp": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NotificationTarget to be of type string, got %T instead", value) + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err } - sv.NotificationTarget = types.NotificationTarget(jtv) + sv.UpdatedTimestamp = ptr.Time(t) } default: @@ -37722,7 +11961,7 @@ func awsRestjson1_deserializeDocumentStreamingNotificationTarget(v **types.Strea return nil } -func awsRestjson1_deserializeDocumentStreamingNotificationTargetList(v *[]types.StreamingNotificationTarget, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberOrderList(v *[]types.PhoneNumberOrder, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37735,17 +11974,17 @@ func awsRestjson1_deserializeDocumentStreamingNotificationTargetList(v *[]types. return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.StreamingNotificationTarget + var cv []types.PhoneNumberOrder if *v == nil { - cv = []types.StreamingNotificationTarget{} + cv = []types.PhoneNumberOrder{} } else { cv = *v } for _, value := range shape { - var col types.StreamingNotificationTarget + var col types.PhoneNumberOrder destAddr := &col - if err := awsRestjson1_deserializeDocumentStreamingNotificationTarget(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentPhoneNumberOrder(&destAddr, value); err != nil { return err } col = *destAddr @@ -37756,7 +11995,7 @@ func awsRestjson1_deserializeDocumentStreamingNotificationTargetList(v *[]types. return nil } -func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentPhoneNumberTypeList(v *[]types.PhoneNumberType, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37769,21 +12008,21 @@ func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.PhoneNumberType if *v == nil { - cv = []string{} + cv = []types.PhoneNumberType{} } else { cv = *v } for _, value := range shape { - var col string + var col types.PhoneNumberType if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected PhoneNumberType to be of type string, got %T instead", value) } - col = jtv + col = types.PhoneNumberType(jtv) } cv = append(cv, col) @@ -37792,7 +12031,7 @@ func awsRestjson1_deserializeDocumentStringList(v *[]string, value interface{}) return nil } -func awsRestjson1_deserializeDocumentTag(v **types.Tag, value interface{}) error { +func awsRestjson1_deserializeDocumentResourceLimitExceededException(v **types.ResourceLimitExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37805,31 +12044,31 @@ func awsRestjson1_deserializeDocumentTag(v **types.Tag, value interface{}) error return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Tag + var sv *types.ResourceLimitExceededException if *v == nil { - sv = &types.Tag{} + sv = &types.ResourceLimitExceededException{} } else { sv = *v } for key, value := range shape { switch key { - case "Key": + case "Code": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) } - sv.Key = ptr.String(jtv) + sv.Code = types.ErrorCode(jtv) } - case "Value": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Value = ptr.String(jtv) + sv.Message = ptr.String(jtv) } default: @@ -37841,7 +12080,7 @@ func awsRestjson1_deserializeDocumentTag(v **types.Tag, value interface{}) error return nil } -func awsRestjson1_deserializeDocumentTagList(v *[]types.Tag, value interface{}) error { +func awsRestjson1_deserializeDocumentRetentionSettings(v **types.RetentionSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37849,33 +12088,40 @@ func awsRestjson1_deserializeDocumentTagList(v *[]types.Tag, value interface{}) return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Tag + var sv *types.RetentionSettings if *v == nil { - cv = []types.Tag{} + sv = &types.RetentionSettings{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Tag - destAddr := &col - if err := awsRestjson1_deserializeDocumentTag(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "ConversationRetentionSettings": + if err := awsRestjson1_deserializeDocumentConversationRetentionSettings(&sv.ConversationRetentionSettings, value); err != nil { + return err + } + + case "RoomRetentionSettings": + if err := awsRestjson1_deserializeDocumentRoomRetentionSettings(&sv.RoomRetentionSettings, value); err != nil { + return err + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentTelephonySettings(v **types.TelephonySettings, value interface{}) error { +func awsRestjson1_deserializeDocumentRoom(v **types.Room, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37888,40 +12134,75 @@ func awsRestjson1_deserializeDocumentTelephonySettings(v **types.TelephonySettin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TelephonySettings + var sv *types.Room if *v == nil { - sv = &types.TelephonySettings{} + sv = &types.Room{} } else { sv = *v } for key, value := range shape { switch key { - case "InboundCalling": + case "AccountId": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.InboundCalling = ptr.Bool(jtv) + sv.AccountId = ptr.String(jtv) } - case "OutboundCalling": + case "CreatedBy": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.OutboundCalling = ptr.Bool(jtv) + sv.CreatedBy = ptr.String(jtv) } - case "SMS": + case "CreatedTimestamp": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) } - sv.SMS = ptr.Bool(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedTimestamp = ptr.Time(t) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "RoomId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.RoomId = ptr.String(jtv) + } + + case "UpdatedTimestamp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdatedTimestamp = ptr.Time(t) } default: @@ -37933,7 +12214,41 @@ func awsRestjson1_deserializeDocumentTelephonySettings(v **types.TelephonySettin return nil } -func awsRestjson1_deserializeDocumentTermination(v **types.Termination, value interface{}) error { +func awsRestjson1_deserializeDocumentRoomList(v *[]types.Room, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.Room + if *v == nil { + cv = []types.Room{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Room + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoom(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoomMembership(v **types.RoomMembership, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -37946,54 +12261,58 @@ func awsRestjson1_deserializeDocumentTermination(v **types.Termination, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Termination + var sv *types.RoomMembership if *v == nil { - sv = &types.Termination{} + sv = &types.RoomMembership{} } else { sv = *v } for key, value := range shape { switch key { - case "CallingRegions": - if err := awsRestjson1_deserializeDocumentCallingRegionList(&sv.CallingRegions, value); err != nil { - return err + case "InvitedBy": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.InvitedBy = ptr.String(jtv) } - case "CidrAllowedList": - if err := awsRestjson1_deserializeDocumentStringList(&sv.CidrAllowedList, value); err != nil { + case "Member": + if err := awsRestjson1_deserializeDocumentMember(&sv.Member, value); err != nil { return err } - case "CpsLimit": + case "Role": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CpsLimit to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected RoomMembershipRole to be of type string, got %T instead", value) } - sv.CpsLimit = ptr.Int32(int32(i64)) + sv.Role = types.RoomMembershipRole(jtv) } - case "DefaultPhoneNumber": + case "RoomId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected E164PhoneNumber to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.DefaultPhoneNumber = ptr.String(jtv) + sv.RoomId = ptr.String(jtv) } - case "Disabled": + case "UpdatedTimestamp": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) } - sv.Disabled = ptr.Bool(jtv) + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.UpdatedTimestamp = ptr.Time(t) } default: @@ -38005,7 +12324,41 @@ func awsRestjson1_deserializeDocumentTermination(v **types.Termination, value in return nil } -func awsRestjson1_deserializeDocumentTerminationHealth(v **types.TerminationHealth, value interface{}) error { +func awsRestjson1_deserializeDocumentRoomMembershipList(v *[]types.RoomMembership, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []types.RoomMembership + if *v == nil { + cv = []types.RoomMembership{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.RoomMembership + destAddr := &col + if err := awsRestjson1_deserializeDocumentRoomMembership(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentRoomRetentionSettings(v **types.RoomRetentionSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38018,35 +12371,26 @@ func awsRestjson1_deserializeDocumentTerminationHealth(v **types.TerminationHeal return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.TerminationHealth + var sv *types.RoomRetentionSettings if *v == nil { - sv = &types.TerminationHealth{} + sv = &types.RoomRetentionSettings{} } else { sv = *v } for key, value := range shape { switch key { - case "Source": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Source = ptr.String(jtv) - } - - case "Timestamp": + case "RetentionDays": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) + return fmt.Errorf("expected RetentionDays to be json.Number, got %T instead", value) } - t, err := smithytime.ParseDateTime(jtv) + i64, err := jtv.Int64() if err != nil { return err } - sv.Timestamp = ptr.Time(t) + sv.RetentionDays = ptr.Int32(int32(i64)) } default: @@ -38058,7 +12402,7 @@ func awsRestjson1_deserializeDocumentTerminationHealth(v **types.TerminationHeal return nil } -func awsRestjson1_deserializeDocumentThrottledClientException(v **types.ThrottledClientException, value interface{}) error { +func awsRestjson1_deserializeDocumentServiceFailureException(v **types.ServiceFailureException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38071,9 +12415,9 @@ func awsRestjson1_deserializeDocumentThrottledClientException(v **types.Throttle return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ThrottledClientException + var sv *types.ServiceFailureException if *v == nil { - sv = &types.ThrottledClientException{} + sv = &types.ServiceFailureException{} } else { sv = *v } @@ -38107,7 +12451,7 @@ func awsRestjson1_deserializeDocumentThrottledClientException(v **types.Throttle return nil } -func awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.UnauthorizedClientException, value interface{}) error { +func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.ServiceUnavailableException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38120,9 +12464,9 @@ func awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.Unaut return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnauthorizedClientException + var sv *types.ServiceUnavailableException if *v == nil { - sv = &types.UnauthorizedClientException{} + sv = &types.ServiceUnavailableException{} } else { sv = *v } @@ -38156,7 +12500,7 @@ func awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.Unaut return nil } -func awsRestjson1_deserializeDocumentUnprocessableEntityException(v **types.UnprocessableEntityException, value interface{}) error { +func awsRestjson1_deserializeDocumentSigninDelegateGroup(v **types.SigninDelegateGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38169,31 +12513,22 @@ func awsRestjson1_deserializeDocumentUnprocessableEntityException(v **types.Unpr return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UnprocessableEntityException + var sv *types.SigninDelegateGroup if *v == nil { - sv = &types.UnprocessableEntityException{} + sv = &types.SigninDelegateGroup{} } else { sv = *v } for key, value := range shape { switch key { - case "Code": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) - } - sv.Code = types.ErrorCode(jtv) - } - - case "message", "Message": + case "GroupName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.GroupName = ptr.String(jtv) } default: @@ -38205,7 +12540,7 @@ func awsRestjson1_deserializeDocumentUnprocessableEntityException(v **types.Unpr return nil } -func awsRestjson1_deserializeDocumentUser(v **types.User, value interface{}) error { +func awsRestjson1_deserializeDocumentSigninDelegateGroupList(v *[]types.SigninDelegateGroup, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38213,151 +12548,33 @@ func awsRestjson1_deserializeDocumentUser(v **types.User, value interface{}) err return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.User + var cv []types.SigninDelegateGroup if *v == nil { - sv = &types.User{} + cv = []types.SigninDelegateGroup{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "AccountId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.AccountId = ptr.String(jtv) - } - - case "AlexaForBusinessMetadata": - if err := awsRestjson1_deserializeDocumentAlexaForBusinessMetadata(&sv.AlexaForBusinessMetadata, value); err != nil { - return err - } - - case "DisplayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "InvitedOn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.InvitedOn = ptr.Time(t) - } - - case "LicenseType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected License to be of type string, got %T instead", value) - } - sv.LicenseType = types.License(jtv) - } - - case "PersonalPIN": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.PersonalPIN = ptr.String(jtv) - } - - case "PrimaryEmail": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) - } - sv.PrimaryEmail = ptr.String(jtv) - } - - case "PrimaryProvisionedNumber": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) - } - sv.PrimaryProvisionedNumber = ptr.String(jtv) - } - - case "RegisteredOn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.RegisteredOn = ptr.Time(t) - } - - case "UserId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UserId = ptr.String(jtv) - } - - case "UserInvitationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InviteStatus to be of type string, got %T instead", value) - } - sv.UserInvitationStatus = types.InviteStatus(jtv) - } - - case "UserRegistrationStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected RegistrationStatus to be of type string, got %T instead", value) - } - sv.UserRegistrationStatus = types.RegistrationStatus(jtv) - } - - case "UserType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserType to be of type string, got %T instead", value) - } - sv.UserType = types.UserType(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.SigninDelegateGroup + destAddr := &col + if err := awsRestjson1_deserializeDocumentSigninDelegateGroup(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentUserError(v **types.UserError, value interface{}) error { +func awsRestjson1_deserializeDocumentTelephonySettings(v **types.TelephonySettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38370,40 +12587,40 @@ func awsRestjson1_deserializeDocumentUserError(v **types.UserError, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserError + var sv *types.TelephonySettings if *v == nil { - sv = &types.UserError{} + sv = &types.TelephonySettings{} } else { sv = *v } for key, value := range shape { switch key { - case "ErrorCode": + case "InboundCalling": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.ErrorCode = types.ErrorCode(jtv) + sv.InboundCalling = ptr.Bool(jtv) } - case "ErrorMessage": + case "OutboundCalling": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.OutboundCalling = ptr.Bool(jtv) } - case "UserId": + case "SMS": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.UserId = ptr.String(jtv) + sv.SMS = ptr.Bool(jtv) } default: @@ -38415,7 +12632,7 @@ func awsRestjson1_deserializeDocumentUserError(v **types.UserError, value interf return nil } -func awsRestjson1_deserializeDocumentUserErrorList(v *[]types.UserError, value interface{}) error { +func awsRestjson1_deserializeDocumentThrottledClientException(v **types.ThrottledClientException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38423,67 +12640,48 @@ func awsRestjson1_deserializeDocumentUserErrorList(v *[]types.UserError, value i return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.UserError + var sv *types.ThrottledClientException if *v == nil { - cv = []types.UserError{} + sv = &types.ThrottledClientException{} } else { - cv = *v - } - - for _, value := range shape { - var col types.UserError - destAddr := &col - if err := awsRestjson1_deserializeDocumentUserError(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - + sv = *v } - *v = cv - return nil -} -func awsRestjson1_deserializeDocumentUserList(v *[]types.User, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + for key, value := range shape { + switch key { + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(jtv) + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } - var cv []types.User - if *v == nil { - cv = []types.User{} - } else { - cv = *v - } + default: + _, _ = key, value - for _, value := range shape { - var col types.User - destAddr := &col - if err := awsRestjson1_deserializeDocumentUser(&destAddr, value); err != nil { - return err } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentUserSettings(v **types.UserSettings, value interface{}) error { +func awsRestjson1_deserializeDocumentUnauthorizedClientException(v **types.UnauthorizedClientException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38496,18 +12694,31 @@ func awsRestjson1_deserializeDocumentUserSettings(v **types.UserSettings, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.UserSettings + var sv *types.UnauthorizedClientException if *v == nil { - sv = &types.UserSettings{} + sv = &types.UnauthorizedClientException{} } else { sv = *v } for key, value := range shape { switch key { - case "Telephony": - if err := awsRestjson1_deserializeDocumentTelephonySettings(&sv.Telephony, value); err != nil { - return err + case "Code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) + } + sv.Code = types.ErrorCode(jtv) + } + + case "message", "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) } default: @@ -38519,7 +12730,7 @@ func awsRestjson1_deserializeDocumentUserSettings(v **types.UserSettings, value return nil } -func awsRestjson1_deserializeDocumentVideoArtifactsConfiguration(v **types.VideoArtifactsConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentUnprocessableEntityException(v **types.UnprocessableEntityException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38532,31 +12743,31 @@ func awsRestjson1_deserializeDocumentVideoArtifactsConfiguration(v **types.Video return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.VideoArtifactsConfiguration + var sv *types.UnprocessableEntityException if *v == nil { - sv = &types.VideoArtifactsConfiguration{} + sv = &types.UnprocessableEntityException{} } else { sv = *v } for key, value := range shape { switch key { - case "MuxType": + case "Code": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VideoMuxType to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) } - sv.MuxType = types.VideoMuxType(jtv) + sv.Code = types.ErrorCode(jtv) } - case "State": + case "message", "Message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ArtifactsState to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.State = types.ArtifactsState(jtv) + sv.Message = ptr.String(jtv) } default: @@ -38568,7 +12779,7 @@ func awsRestjson1_deserializeDocumentVideoArtifactsConfiguration(v **types.Video return nil } -func awsRestjson1_deserializeDocumentVoiceConnector(v **types.VoiceConnector, value interface{}) error { +func awsRestjson1_deserializeDocumentUser(v **types.User, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38581,25 +12792,39 @@ func awsRestjson1_deserializeDocumentVoiceConnector(v **types.VoiceConnector, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.VoiceConnector + var sv *types.User if *v == nil { - sv = &types.VoiceConnector{} + sv = &types.User{} } else { sv = *v } for key, value := range shape { switch key { - case "AwsRegion": + case "AccountId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VoiceConnectorAwsRegion to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.AwsRegion = types.VoiceConnectorAwsRegion(jtv) + sv.AccountId = ptr.String(jtv) } - case "CreatedTimestamp": + case "AlexaForBusinessMetadata": + if err := awsRestjson1_deserializeDocumentAlexaForBusinessMetadata(&sv.AlexaForBusinessMetadata, value); err != nil { + return err + } + + case "DisplayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "InvitedOn": if value != nil { jtv, ok := value.(string) if !ok { @@ -38609,37 +12834,46 @@ func awsRestjson1_deserializeDocumentVoiceConnector(v **types.VoiceConnector, va if err != nil { return err } - sv.CreatedTimestamp = ptr.Time(t) + sv.InvitedOn = ptr.Time(t) } - case "Name": + case "LicenseType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VoiceConnectorName to be of type string, got %T instead", value) + return fmt.Errorf("expected License to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.LicenseType = types.License(jtv) } - case "OutboundHostName": + case "PersonalPIN": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.OutboundHostName = ptr.String(jtv) + sv.PersonalPIN = ptr.String(jtv) } - case "RequireEncryption": + case "PrimaryEmail": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected EmailAddress to be of type string, got %T instead", value) } - sv.RequireEncryption = ptr.Bool(jtv) + sv.PrimaryEmail = ptr.String(jtv) } - case "UpdatedTimestamp": + case "PrimaryProvisionedNumber": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SensitiveString to be of type string, got %T instead", value) + } + sv.PrimaryProvisionedNumber = ptr.String(jtv) + } + + case "RegisteredOn": if value != nil { jtv, ok := value.(string) if !ok { @@ -38649,25 +12883,43 @@ func awsRestjson1_deserializeDocumentVoiceConnector(v **types.VoiceConnector, va if err != nil { return err } - sv.UpdatedTimestamp = ptr.Time(t) + sv.RegisteredOn = ptr.Time(t) } - case "VoiceConnectorArn": + case "UserId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.UserId = ptr.String(jtv) + } + + case "UserInvitationStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InviteStatus to be of type string, got %T instead", value) } - sv.VoiceConnectorArn = ptr.String(jtv) + sv.UserInvitationStatus = types.InviteStatus(jtv) } - case "VoiceConnectorId": + case "UserRegistrationStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected RegistrationStatus to be of type string, got %T instead", value) + } + sv.UserRegistrationStatus = types.RegistrationStatus(jtv) + } + + case "UserType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected UserType to be of type string, got %T instead", value) } - sv.VoiceConnectorId = ptr.String(jtv) + sv.UserType = types.UserType(jtv) } default: @@ -38679,7 +12931,7 @@ func awsRestjson1_deserializeDocumentVoiceConnector(v **types.VoiceConnector, va return nil } -func awsRestjson1_deserializeDocumentVoiceConnectorGroup(v **types.VoiceConnectorGroup, value interface{}) error { +func awsRestjson1_deserializeDocumentUserError(v **types.UserError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38692,71 +12944,40 @@ func awsRestjson1_deserializeDocumentVoiceConnectorGroup(v **types.VoiceConnecto return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.VoiceConnectorGroup + var sv *types.UserError if *v == nil { - sv = &types.VoiceConnectorGroup{} + sv = &types.UserError{} } else { sv = *v } for key, value := range shape { switch key { - case "CreatedTimestamp": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(t) - } - - case "Name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected VoiceConnectorGroupName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "UpdatedTimestamp": + case "ErrorCode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Iso8601Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err + return fmt.Errorf("expected ErrorCode to be of type string, got %T instead", value) } - sv.UpdatedTimestamp = ptr.Time(t) + sv.ErrorCode = types.ErrorCode(jtv) } - case "VoiceConnectorGroupArn": + case "ErrorMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.VoiceConnectorGroupArn = ptr.String(jtv) + sv.ErrorMessage = ptr.String(jtv) } - case "VoiceConnectorGroupId": + case "UserId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) } - sv.VoiceConnectorGroupId = ptr.String(jtv) - } - - case "VoiceConnectorItems": - if err := awsRestjson1_deserializeDocumentVoiceConnectorItemList(&sv.VoiceConnectorItems, value); err != nil { - return err + sv.UserId = ptr.String(jtv) } default: @@ -38768,7 +12989,7 @@ func awsRestjson1_deserializeDocumentVoiceConnectorGroup(v **types.VoiceConnecto return nil } -func awsRestjson1_deserializeDocumentVoiceConnectorGroupList(v *[]types.VoiceConnectorGroup, value interface{}) error { +func awsRestjson1_deserializeDocumentUserErrorList(v *[]types.UserError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38781,17 +13002,17 @@ func awsRestjson1_deserializeDocumentVoiceConnectorGroupList(v *[]types.VoiceCon return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.VoiceConnectorGroup + var cv []types.UserError if *v == nil { - cv = []types.VoiceConnectorGroup{} + cv = []types.UserError{} } else { cv = *v } for _, value := range shape { - var col types.VoiceConnectorGroup + var col types.UserError destAddr := &col - if err := awsRestjson1_deserializeDocumentVoiceConnectorGroup(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentUserError(&destAddr, value); err != nil { return err } col = *destAddr @@ -38802,60 +13023,7 @@ func awsRestjson1_deserializeDocumentVoiceConnectorGroupList(v *[]types.VoiceCon return nil } -func awsRestjson1_deserializeDocumentVoiceConnectorItem(v **types.VoiceConnectorItem, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *types.VoiceConnectorItem - if *v == nil { - sv = &types.VoiceConnectorItem{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "Priority": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected VoiceConnectorItemPriority to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Priority = ptr.Int32(int32(i64)) - } - - case "VoiceConnectorId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) - } - sv.VoiceConnectorId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentVoiceConnectorItemList(v *[]types.VoiceConnectorItem, value interface{}) error { +func awsRestjson1_deserializeDocumentUserList(v *[]types.User, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38868,17 +13036,17 @@ func awsRestjson1_deserializeDocumentVoiceConnectorItemList(v *[]types.VoiceConn return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.VoiceConnectorItem + var cv []types.User if *v == nil { - cv = []types.VoiceConnectorItem{} + cv = []types.User{} } else { cv = *v } for _, value := range shape { - var col types.VoiceConnectorItem + var col types.User destAddr := &col - if err := awsRestjson1_deserializeDocumentVoiceConnectorItem(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentUser(&destAddr, value); err != nil { return err } col = *destAddr @@ -38889,7 +13057,7 @@ func awsRestjson1_deserializeDocumentVoiceConnectorItemList(v *[]types.VoiceConn return nil } -func awsRestjson1_deserializeDocumentVoiceConnectorList(v *[]types.VoiceConnector, value interface{}) error { +func awsRestjson1_deserializeDocumentUserSettings(v **types.UserSettings, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -38897,29 +13065,31 @@ func awsRestjson1_deserializeDocumentVoiceConnectorList(v *[]types.VoiceConnecto return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.VoiceConnector + var sv *types.UserSettings if *v == nil { - cv = []types.VoiceConnector{} + sv = &types.UserSettings{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.VoiceConnector - destAddr := &col - if err := awsRestjson1_deserializeDocumentVoiceConnector(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "Telephony": + if err := awsRestjson1_deserializeDocumentTelephonySettings(&sv.Telephony, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } diff --git a/service/chime/endpoints.go b/service/chime/endpoints.go index 7d87571d3ed..3d2926b8255 100644 --- a/service/chime/endpoints.go +++ b/service/chime/endpoints.go @@ -420,7 +420,7 @@ func (r *resolver) ResolveEndpoint( } } if _UseFIPS == true { - if true == _PartitionResult.SupportsFIPS { + if _PartitionResult.SupportsFIPS == true { uriString := func() string { var out strings.Builder out.WriteString("https://chime-fips.") diff --git a/service/chime/generated.json b/service/chime/generated.json index fdf9387eb18..18a1413ecb1 100644 --- a/service/chime/generated.json +++ b/service/chime/generated.json @@ -9,11 +9,7 @@ "api_client.go", "api_client_test.go", "api_op_AssociatePhoneNumberWithUser.go", - "api_op_AssociatePhoneNumbersWithVoiceConnector.go", - "api_op_AssociatePhoneNumbersWithVoiceConnectorGroup.go", "api_op_AssociateSigninDelegateGroupsWithAccount.go", - "api_op_BatchCreateAttendee.go", - "api_op_BatchCreateChannelMembership.go", "api_op_BatchCreateRoomMembership.go", "api_op_BatchDeletePhoneNumber.go", "api_op_BatchSuspendUser.go", @@ -21,184 +17,59 @@ "api_op_BatchUpdatePhoneNumber.go", "api_op_BatchUpdateUser.go", "api_op_CreateAccount.go", - "api_op_CreateAppInstance.go", - "api_op_CreateAppInstanceAdmin.go", - "api_op_CreateAppInstanceUser.go", - "api_op_CreateAttendee.go", "api_op_CreateBot.go", - "api_op_CreateChannel.go", - "api_op_CreateChannelBan.go", - "api_op_CreateChannelMembership.go", - "api_op_CreateChannelModerator.go", - "api_op_CreateMediaCapturePipeline.go", - "api_op_CreateMeeting.go", "api_op_CreateMeetingDialOut.go", - "api_op_CreateMeetingWithAttendees.go", "api_op_CreatePhoneNumberOrder.go", - "api_op_CreateProxySession.go", "api_op_CreateRoom.go", "api_op_CreateRoomMembership.go", - "api_op_CreateSipMediaApplication.go", - "api_op_CreateSipMediaApplicationCall.go", - "api_op_CreateSipRule.go", "api_op_CreateUser.go", - "api_op_CreateVoiceConnector.go", - "api_op_CreateVoiceConnectorGroup.go", "api_op_DeleteAccount.go", - "api_op_DeleteAppInstance.go", - "api_op_DeleteAppInstanceAdmin.go", - "api_op_DeleteAppInstanceStreamingConfigurations.go", - "api_op_DeleteAppInstanceUser.go", - "api_op_DeleteAttendee.go", - "api_op_DeleteChannel.go", - "api_op_DeleteChannelBan.go", - "api_op_DeleteChannelMembership.go", - "api_op_DeleteChannelMessage.go", - "api_op_DeleteChannelModerator.go", "api_op_DeleteEventsConfiguration.go", - "api_op_DeleteMediaCapturePipeline.go", - "api_op_DeleteMeeting.go", "api_op_DeletePhoneNumber.go", - "api_op_DeleteProxySession.go", "api_op_DeleteRoom.go", "api_op_DeleteRoomMembership.go", - "api_op_DeleteSipMediaApplication.go", - "api_op_DeleteSipRule.go", - "api_op_DeleteVoiceConnector.go", - "api_op_DeleteVoiceConnectorEmergencyCallingConfiguration.go", - "api_op_DeleteVoiceConnectorGroup.go", - "api_op_DeleteVoiceConnectorOrigination.go", - "api_op_DeleteVoiceConnectorProxy.go", - "api_op_DeleteVoiceConnectorStreamingConfiguration.go", - "api_op_DeleteVoiceConnectorTermination.go", - "api_op_DeleteVoiceConnectorTerminationCredentials.go", - "api_op_DescribeAppInstance.go", - "api_op_DescribeAppInstanceAdmin.go", - "api_op_DescribeAppInstanceUser.go", - "api_op_DescribeChannel.go", - "api_op_DescribeChannelBan.go", - "api_op_DescribeChannelMembership.go", - "api_op_DescribeChannelMembershipForAppInstanceUser.go", - "api_op_DescribeChannelModeratedByAppInstanceUser.go", - "api_op_DescribeChannelModerator.go", "api_op_DisassociatePhoneNumberFromUser.go", - "api_op_DisassociatePhoneNumbersFromVoiceConnector.go", - "api_op_DisassociatePhoneNumbersFromVoiceConnectorGroup.go", "api_op_DisassociateSigninDelegateGroupsFromAccount.go", "api_op_GetAccount.go", "api_op_GetAccountSettings.go", - "api_op_GetAppInstanceRetentionSettings.go", - "api_op_GetAppInstanceStreamingConfigurations.go", - "api_op_GetAttendee.go", "api_op_GetBot.go", - "api_op_GetChannelMessage.go", "api_op_GetEventsConfiguration.go", "api_op_GetGlobalSettings.go", - "api_op_GetMediaCapturePipeline.go", - "api_op_GetMeeting.go", - "api_op_GetMessagingSessionEndpoint.go", "api_op_GetPhoneNumber.go", "api_op_GetPhoneNumberOrder.go", "api_op_GetPhoneNumberSettings.go", - "api_op_GetProxySession.go", "api_op_GetRetentionSettings.go", "api_op_GetRoom.go", - "api_op_GetSipMediaApplication.go", - "api_op_GetSipMediaApplicationLoggingConfiguration.go", - "api_op_GetSipRule.go", "api_op_GetUser.go", "api_op_GetUserSettings.go", - "api_op_GetVoiceConnector.go", - "api_op_GetVoiceConnectorEmergencyCallingConfiguration.go", - "api_op_GetVoiceConnectorGroup.go", - "api_op_GetVoiceConnectorLoggingConfiguration.go", - "api_op_GetVoiceConnectorOrigination.go", - "api_op_GetVoiceConnectorProxy.go", - "api_op_GetVoiceConnectorStreamingConfiguration.go", - "api_op_GetVoiceConnectorTermination.go", - "api_op_GetVoiceConnectorTerminationHealth.go", "api_op_InviteUsers.go", "api_op_ListAccounts.go", - "api_op_ListAppInstanceAdmins.go", - "api_op_ListAppInstanceUsers.go", - "api_op_ListAppInstances.go", - "api_op_ListAttendeeTags.go", - "api_op_ListAttendees.go", "api_op_ListBots.go", - "api_op_ListChannelBans.go", - "api_op_ListChannelMemberships.go", - "api_op_ListChannelMembershipsForAppInstanceUser.go", - "api_op_ListChannelMessages.go", - "api_op_ListChannelModerators.go", - "api_op_ListChannels.go", - "api_op_ListChannelsModeratedByAppInstanceUser.go", - "api_op_ListMediaCapturePipelines.go", - "api_op_ListMeetingTags.go", - "api_op_ListMeetings.go", "api_op_ListPhoneNumberOrders.go", "api_op_ListPhoneNumbers.go", - "api_op_ListProxySessions.go", "api_op_ListRoomMemberships.go", "api_op_ListRooms.go", - "api_op_ListSipMediaApplications.go", - "api_op_ListSipRules.go", "api_op_ListSupportedPhoneNumberCountries.go", - "api_op_ListTagsForResource.go", "api_op_ListUsers.go", - "api_op_ListVoiceConnectorGroups.go", - "api_op_ListVoiceConnectorTerminationCredentials.go", - "api_op_ListVoiceConnectors.go", "api_op_LogoutUser.go", - "api_op_PutAppInstanceRetentionSettings.go", - "api_op_PutAppInstanceStreamingConfigurations.go", "api_op_PutEventsConfiguration.go", "api_op_PutRetentionSettings.go", - "api_op_PutSipMediaApplicationLoggingConfiguration.go", - "api_op_PutVoiceConnectorEmergencyCallingConfiguration.go", - "api_op_PutVoiceConnectorLoggingConfiguration.go", - "api_op_PutVoiceConnectorOrigination.go", - "api_op_PutVoiceConnectorProxy.go", - "api_op_PutVoiceConnectorStreamingConfiguration.go", - "api_op_PutVoiceConnectorTermination.go", - "api_op_PutVoiceConnectorTerminationCredentials.go", - "api_op_RedactChannelMessage.go", "api_op_RedactConversationMessage.go", "api_op_RedactRoomMessage.go", "api_op_RegenerateSecurityToken.go", "api_op_ResetPersonalPIN.go", "api_op_RestorePhoneNumber.go", "api_op_SearchAvailablePhoneNumbers.go", - "api_op_SendChannelMessage.go", - "api_op_StartMeetingTranscription.go", - "api_op_StopMeetingTranscription.go", - "api_op_TagAttendee.go", - "api_op_TagMeeting.go", - "api_op_TagResource.go", - "api_op_UntagAttendee.go", - "api_op_UntagMeeting.go", - "api_op_UntagResource.go", "api_op_UpdateAccount.go", "api_op_UpdateAccountSettings.go", - "api_op_UpdateAppInstance.go", - "api_op_UpdateAppInstanceUser.go", "api_op_UpdateBot.go", - "api_op_UpdateChannel.go", - "api_op_UpdateChannelMessage.go", - "api_op_UpdateChannelReadMarker.go", "api_op_UpdateGlobalSettings.go", "api_op_UpdatePhoneNumber.go", "api_op_UpdatePhoneNumberSettings.go", - "api_op_UpdateProxySession.go", "api_op_UpdateRoom.go", "api_op_UpdateRoomMembership.go", - "api_op_UpdateSipMediaApplication.go", - "api_op_UpdateSipMediaApplicationCall.go", - "api_op_UpdateSipRule.go", "api_op_UpdateUser.go", "api_op_UpdateUserSettings.go", - "api_op_UpdateVoiceConnector.go", - "api_op_UpdateVoiceConnectorGroup.go", - "api_op_ValidateE911Address.go", "auth.go", "deserializers.go", "doc.go", diff --git a/service/chime/serializers.go b/service/chime/serializers.go index 40527e26d4c..e8d58cb6aa7 100644 --- a/service/chime/serializers.go +++ b/service/chime/serializers.go @@ -11,19 +11,18 @@ import ( "github.com/aws/smithy-go/encoding/httpbinding" smithyjson "github.com/aws/smithy-go/encoding/json" "github.com/aws/smithy-go/middleware" - smithytime "github.com/aws/smithy-go/time" "github.com/aws/smithy-go/tracing" smithyhttp "github.com/aws/smithy-go/transport/http" ) -type awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnector struct { +type awsRestjson1_serializeOpAssociatePhoneNumberWithUser struct { } -func (*awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnector) ID() string { +func (*awsRestjson1_serializeOpAssociatePhoneNumberWithUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpAssociatePhoneNumberWithUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -35,13 +34,13 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnector) Handle return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*AssociatePhoneNumbersWithVoiceConnectorInput) + input, ok := in.Parameters.(*AssociatePhoneNumberWithUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}?operation=associate-phone-numbers") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}?operation=associate-phone-number") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -57,14 +56,14 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnector) Handle return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumbersWithVoiceConnectorInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumberWithUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentAssociatePhoneNumbersWithVoiceConnectorInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentAssociatePhoneNumberWithUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -81,16 +80,25 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnector) Handle span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumbersWithVoiceConnectorInput(v *AssociatePhoneNumbersWithVoiceConnectorInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumberWithUserInput(v *AssociatePhoneNumberWithUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.UserId == nil || len(*v.UserId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { + if v.UserId != nil { + if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { return err } } @@ -98,33 +106,26 @@ func awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumbersWithVoiceConnector return nil } -func awsRestjson1_serializeOpDocumentAssociatePhoneNumbersWithVoiceConnectorInput(v *AssociatePhoneNumbersWithVoiceConnectorInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentAssociatePhoneNumberWithUserInput(v *AssociatePhoneNumberWithUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.E164PhoneNumbers != nil { - ok := object.Key("E164PhoneNumbers") - if err := awsRestjson1_serializeDocumentE164PhoneNumberList(v.E164PhoneNumbers, ok); err != nil { - return err - } - } - - if v.ForceAssociate != nil { - ok := object.Key("ForceAssociate") - ok.Boolean(*v.ForceAssociate) + if v.E164PhoneNumber != nil { + ok := object.Key("E164PhoneNumber") + ok.String(*v.E164PhoneNumber) } return nil } -type awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnectorGroup struct { +type awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount struct { } -func (*awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnectorGroup) ID() string { +func (*awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnectorGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -136,13 +137,13 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnectorGroup) H return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*AssociatePhoneNumbersWithVoiceConnectorGroupInput) + input, ok := in.Parameters.(*AssociateSigninDelegateGroupsWithAccountInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connector-groups/{VoiceConnectorGroupId}?operation=associate-phone-numbers") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}?operation=associate-signin-delegate-groups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -158,14 +159,14 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnectorGroup) H return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumbersWithVoiceConnectorGroupInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsAssociateSigninDelegateGroupsWithAccountInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentAssociatePhoneNumbersWithVoiceConnectorGroupInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentAssociateSigninDelegateGroupsWithAccountInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -182,16 +183,16 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumbersWithVoiceConnectorGroup) H span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumbersWithVoiceConnectorGroupInput(v *AssociatePhoneNumbersWithVoiceConnectorGroupInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsAssociateSigninDelegateGroupsWithAccountInput(v *AssociateSigninDelegateGroupsWithAccountInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorGroupId == nil || len(*v.VoiceConnectorGroupId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorGroupId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.VoiceConnectorGroupId != nil { - if err := encoder.SetURI("VoiceConnectorGroupId").String(*v.VoiceConnectorGroupId); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } @@ -199,33 +200,28 @@ func awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumbersWithVoiceConnector return nil } -func awsRestjson1_serializeOpDocumentAssociatePhoneNumbersWithVoiceConnectorGroupInput(v *AssociatePhoneNumbersWithVoiceConnectorGroupInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentAssociateSigninDelegateGroupsWithAccountInput(v *AssociateSigninDelegateGroupsWithAccountInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.E164PhoneNumbers != nil { - ok := object.Key("E164PhoneNumbers") - if err := awsRestjson1_serializeDocumentE164PhoneNumberList(v.E164PhoneNumbers, ok); err != nil { + if v.SigninDelegateGroups != nil { + ok := object.Key("SigninDelegateGroups") + if err := awsRestjson1_serializeDocumentSigninDelegateGroupList(v.SigninDelegateGroups, ok); err != nil { return err } } - if v.ForceAssociate != nil { - ok := object.Key("ForceAssociate") - ok.Boolean(*v.ForceAssociate) - } - return nil } -type awsRestjson1_serializeOpAssociatePhoneNumberWithUser struct { +type awsRestjson1_serializeOpBatchCreateRoomMembership struct { } -func (*awsRestjson1_serializeOpAssociatePhoneNumberWithUser) ID() string { +func (*awsRestjson1_serializeOpBatchCreateRoomMembership) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpAssociatePhoneNumberWithUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpBatchCreateRoomMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -237,13 +233,13 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumberWithUser) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*AssociatePhoneNumberWithUserInput) + input, ok := in.Parameters.(*BatchCreateRoomMembershipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}?operation=associate-phone-number") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships?operation=batch-create") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -259,14 +255,14 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumberWithUser) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumberWithUserInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsBatchCreateRoomMembershipInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentAssociatePhoneNumberWithUserInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentBatchCreateRoomMembershipInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -283,7 +279,7 @@ func (m *awsRestjson1_serializeOpAssociatePhoneNumberWithUser) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumberWithUserInput(v *AssociatePhoneNumberWithUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsBatchCreateRoomMembershipInput(v *BatchCreateRoomMembershipInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -297,11 +293,11 @@ func awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumberWithUserInput(v *As } } - if v.UserId == nil || len(*v.UserId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} } - if v.UserId != nil { - if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { return err } } @@ -309,26 +305,28 @@ func awsRestjson1_serializeOpHttpBindingsAssociatePhoneNumberWithUserInput(v *As return nil } -func awsRestjson1_serializeOpDocumentAssociatePhoneNumberWithUserInput(v *AssociatePhoneNumberWithUserInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentBatchCreateRoomMembershipInput(v *BatchCreateRoomMembershipInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.E164PhoneNumber != nil { - ok := object.Key("E164PhoneNumber") - ok.String(*v.E164PhoneNumber) + if v.MembershipItemList != nil { + ok := object.Key("MembershipItemList") + if err := awsRestjson1_serializeDocumentMembershipItemList(v.MembershipItemList, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount struct { +type awsRestjson1_serializeOpBatchDeletePhoneNumber struct { } -func (*awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount) ID() string { +func (*awsRestjson1_serializeOpBatchDeletePhoneNumber) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpBatchDeletePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -340,13 +338,13 @@ func (m *awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*AssociateSigninDelegateGroupsWithAccountInput) + input, ok := in.Parameters.(*BatchDeletePhoneNumberInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}?operation=associate-signin-delegate-groups") + opPath, opQuery := httpbinding.SplitURI("/phone-numbers?operation=batch-delete") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -362,14 +360,10 @@ func (m *awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount) Handl return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsAssociateSigninDelegateGroupsWithAccountInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentAssociateSigninDelegateGroupsWithAccountInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentBatchDeletePhoneNumberInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -386,30 +380,21 @@ func (m *awsRestjson1_serializeOpAssociateSigninDelegateGroupsWithAccount) Handl span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsAssociateSigninDelegateGroupsWithAccountInput(v *AssociateSigninDelegateGroupsWithAccountInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsBatchDeletePhoneNumberInput(v *BatchDeletePhoneNumberInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - return nil } -func awsRestjson1_serializeOpDocumentAssociateSigninDelegateGroupsWithAccountInput(v *AssociateSigninDelegateGroupsWithAccountInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentBatchDeletePhoneNumberInput(v *BatchDeletePhoneNumberInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.SigninDelegateGroups != nil { - ok := object.Key("SigninDelegateGroups") - if err := awsRestjson1_serializeDocumentSigninDelegateGroupList(v.SigninDelegateGroups, ok); err != nil { + if v.PhoneNumberIds != nil { + ok := object.Key("PhoneNumberIds") + if err := awsRestjson1_serializeDocumentNonEmptyStringList(v.PhoneNumberIds, ok); err != nil { return err } } @@ -417,14 +402,14 @@ func awsRestjson1_serializeOpDocumentAssociateSigninDelegateGroupsWithAccountInp return nil } -type awsRestjson1_serializeOpBatchCreateAttendee struct { +type awsRestjson1_serializeOpBatchSuspendUser struct { } -func (*awsRestjson1_serializeOpBatchCreateAttendee) ID() string { +func (*awsRestjson1_serializeOpBatchSuspendUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpBatchCreateAttendee) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpBatchSuspendUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -436,13 +421,13 @@ func (m *awsRestjson1_serializeOpBatchCreateAttendee) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*BatchCreateAttendeeInput) + input, ok := in.Parameters.(*BatchSuspendUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/attendees?operation=batch-create") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users?operation=suspend") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -458,14 +443,14 @@ func (m *awsRestjson1_serializeOpBatchCreateAttendee) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsBatchCreateAttendeeInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsBatchSuspendUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchCreateAttendeeInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentBatchSuspendUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -482,16 +467,16 @@ func (m *awsRestjson1_serializeOpBatchCreateAttendee) HandleSerialize(ctx contex span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsBatchCreateAttendeeInput(v *BatchCreateAttendeeInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsBatchSuspendUserInput(v *BatchSuspendUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } @@ -499,13 +484,13 @@ func awsRestjson1_serializeOpHttpBindingsBatchCreateAttendeeInput(v *BatchCreate return nil } -func awsRestjson1_serializeOpDocumentBatchCreateAttendeeInput(v *BatchCreateAttendeeInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentBatchSuspendUserInput(v *BatchSuspendUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Attendees != nil { - ok := object.Key("Attendees") - if err := awsRestjson1_serializeDocumentCreateAttendeeRequestItemList(v.Attendees, ok); err != nil { + if v.UserIdList != nil { + ok := object.Key("UserIdList") + if err := awsRestjson1_serializeDocumentUserIdList(v.UserIdList, ok); err != nil { return err } } @@ -513,14 +498,14 @@ func awsRestjson1_serializeOpDocumentBatchCreateAttendeeInput(v *BatchCreateAtte return nil } -type awsRestjson1_serializeOpBatchCreateChannelMembership struct { +type awsRestjson1_serializeOpBatchUnsuspendUser struct { } -func (*awsRestjson1_serializeOpBatchCreateChannelMembership) ID() string { +func (*awsRestjson1_serializeOpBatchUnsuspendUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpBatchCreateChannelMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpBatchUnsuspendUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -532,13 +517,13 @@ func (m *awsRestjson1_serializeOpBatchCreateChannelMembership) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*BatchCreateChannelMembershipInput) + input, ok := in.Parameters.(*BatchUnsuspendUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships?operation=batch-create") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users?operation=unsuspend") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -554,14 +539,14 @@ func (m *awsRestjson1_serializeOpBatchCreateChannelMembership) HandleSerialize(c return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsBatchCreateChannelMembershipInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsBatchUnsuspendUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchCreateChannelMembershipInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentBatchUnsuspendUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -578,55 +563,45 @@ func (m *awsRestjson1_serializeOpBatchCreateChannelMembership) HandleSerialize(c span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsBatchCreateChannelMembershipInput(v *BatchCreateChannelMembershipInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsBatchUnsuspendUserInput(v *BatchUnsuspendUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - return nil } -func awsRestjson1_serializeOpDocumentBatchCreateChannelMembershipInput(v *BatchCreateChannelMembershipInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentBatchUnsuspendUserInput(v *BatchUnsuspendUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.MemberArns != nil { - ok := object.Key("MemberArns") - if err := awsRestjson1_serializeDocumentMemberArns(v.MemberArns, ok); err != nil { + if v.UserIdList != nil { + ok := object.Key("UserIdList") + if err := awsRestjson1_serializeDocumentUserIdList(v.UserIdList, ok); err != nil { return err } } - if len(v.Type) > 0 { - ok := object.Key("Type") - ok.String(string(v.Type)) - } - return nil } -type awsRestjson1_serializeOpBatchCreateRoomMembership struct { +type awsRestjson1_serializeOpBatchUpdatePhoneNumber struct { } -func (*awsRestjson1_serializeOpBatchCreateRoomMembership) ID() string { +func (*awsRestjson1_serializeOpBatchUpdatePhoneNumber) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpBatchCreateRoomMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpBatchUpdatePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -638,13 +613,13 @@ func (m *awsRestjson1_serializeOpBatchCreateRoomMembership) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*BatchCreateRoomMembershipInput) + input, ok := in.Parameters.(*BatchUpdatePhoneNumberInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships?operation=batch-create") + opPath, opQuery := httpbinding.SplitURI("/phone-numbers?operation=batch-update") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -660,14 +635,10 @@ func (m *awsRestjson1_serializeOpBatchCreateRoomMembership) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsBatchCreateRoomMembershipInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchCreateRoomMembershipInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentBatchUpdatePhoneNumberInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -684,39 +655,21 @@ func (m *awsRestjson1_serializeOpBatchCreateRoomMembership) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsBatchCreateRoomMembershipInput(v *BatchCreateRoomMembershipInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsBatchUpdatePhoneNumberInput(v *BatchUpdatePhoneNumberInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} - } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { - return err - } - } - return nil } -func awsRestjson1_serializeOpDocumentBatchCreateRoomMembershipInput(v *BatchCreateRoomMembershipInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentBatchUpdatePhoneNumberInput(v *BatchUpdatePhoneNumberInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.MembershipItemList != nil { - ok := object.Key("MembershipItemList") - if err := awsRestjson1_serializeDocumentMembershipItemList(v.MembershipItemList, ok); err != nil { + if v.UpdatePhoneNumberRequestItems != nil { + ok := object.Key("UpdatePhoneNumberRequestItems") + if err := awsRestjson1_serializeDocumentUpdatePhoneNumberRequestItemList(v.UpdatePhoneNumberRequestItems, ok); err != nil { return err } } @@ -724,14 +677,14 @@ func awsRestjson1_serializeOpDocumentBatchCreateRoomMembershipInput(v *BatchCrea return nil } -type awsRestjson1_serializeOpBatchDeletePhoneNumber struct { +type awsRestjson1_serializeOpBatchUpdateUser struct { } -func (*awsRestjson1_serializeOpBatchDeletePhoneNumber) ID() string { +func (*awsRestjson1_serializeOpBatchUpdateUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpBatchDeletePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpBatchUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -743,13 +696,13 @@ func (m *awsRestjson1_serializeOpBatchDeletePhoneNumber) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*BatchDeletePhoneNumberInput) + input, ok := in.Parameters.(*BatchUpdateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/phone-numbers?operation=batch-delete") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -765,10 +718,14 @@ func (m *awsRestjson1_serializeOpBatchDeletePhoneNumber) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsBatchUpdateUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchDeletePhoneNumberInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentBatchUpdateUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -785,21 +742,30 @@ func (m *awsRestjson1_serializeOpBatchDeletePhoneNumber) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsBatchDeletePhoneNumberInput(v *BatchDeletePhoneNumberInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsBatchUpdateUserInput(v *BatchUpdateUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentBatchDeletePhoneNumberInput(v *BatchDeletePhoneNumberInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentBatchUpdateUserInput(v *BatchUpdateUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.PhoneNumberIds != nil { - ok := object.Key("PhoneNumberIds") - if err := awsRestjson1_serializeDocumentNonEmptyStringList(v.PhoneNumberIds, ok); err != nil { + if v.UpdateUserRequestItems != nil { + ok := object.Key("UpdateUserRequestItems") + if err := awsRestjson1_serializeDocumentUpdateUserRequestItemList(v.UpdateUserRequestItems, ok); err != nil { return err } } @@ -807,14 +773,14 @@ func awsRestjson1_serializeOpDocumentBatchDeletePhoneNumberInput(v *BatchDeleteP return nil } -type awsRestjson1_serializeOpBatchSuspendUser struct { +type awsRestjson1_serializeOpCreateAccount struct { } -func (*awsRestjson1_serializeOpBatchSuspendUser) ID() string { +func (*awsRestjson1_serializeOpCreateAccount) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpBatchSuspendUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -826,13 +792,13 @@ func (m *awsRestjson1_serializeOpBatchSuspendUser) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*BatchSuspendUserInput) + input, ok := in.Parameters.(*CreateAccountInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users?operation=suspend") + opPath, opQuery := httpbinding.SplitURI("/accounts") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -848,14 +814,10 @@ func (m *awsRestjson1_serializeOpBatchSuspendUser) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsBatchSuspendUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchSuspendUserInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateAccountInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -872,45 +834,34 @@ func (m *awsRestjson1_serializeOpBatchSuspendUser) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsBatchSuspendUserInput(v *BatchSuspendUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateAccountInput(v *CreateAccountInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - return nil } -func awsRestjson1_serializeOpDocumentBatchSuspendUserInput(v *BatchSuspendUserInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateAccountInput(v *CreateAccountInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.UserIdList != nil { - ok := object.Key("UserIdList") - if err := awsRestjson1_serializeDocumentUserIdList(v.UserIdList, ok); err != nil { - return err - } + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) } return nil } -type awsRestjson1_serializeOpBatchUnsuspendUser struct { +type awsRestjson1_serializeOpCreateBot struct { } -func (*awsRestjson1_serializeOpBatchUnsuspendUser) ID() string { +func (*awsRestjson1_serializeOpCreateBot) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpBatchUnsuspendUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -922,13 +873,13 @@ func (m *awsRestjson1_serializeOpBatchUnsuspendUser) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*BatchUnsuspendUserInput) + input, ok := in.Parameters.(*CreateBotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users?operation=unsuspend") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -944,14 +895,14 @@ func (m *awsRestjson1_serializeOpBatchUnsuspendUser) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsBatchUnsuspendUserInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreateBotInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchUnsuspendUserInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateBotInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -968,7 +919,7 @@ func (m *awsRestjson1_serializeOpBatchUnsuspendUser) HandleSerialize(ctx context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsBatchUnsuspendUserInput(v *BatchUnsuspendUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateBotInput(v *CreateBotInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -985,28 +936,31 @@ func awsRestjson1_serializeOpHttpBindingsBatchUnsuspendUserInput(v *BatchUnsuspe return nil } -func awsRestjson1_serializeOpDocumentBatchUnsuspendUserInput(v *BatchUnsuspendUserInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateBotInput(v *CreateBotInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.UserIdList != nil { - ok := object.Key("UserIdList") - if err := awsRestjson1_serializeDocumentUserIdList(v.UserIdList, ok); err != nil { - return err - } + if v.DisplayName != nil { + ok := object.Key("DisplayName") + ok.String(*v.DisplayName) + } + + if v.Domain != nil { + ok := object.Key("Domain") + ok.String(*v.Domain) } return nil } -type awsRestjson1_serializeOpBatchUpdatePhoneNumber struct { +type awsRestjson1_serializeOpCreateMeetingDialOut struct { } -func (*awsRestjson1_serializeOpBatchUpdatePhoneNumber) ID() string { +func (*awsRestjson1_serializeOpCreateMeetingDialOut) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpBatchUpdatePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateMeetingDialOut) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1018,13 +972,13 @@ func (m *awsRestjson1_serializeOpBatchUpdatePhoneNumber) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*BatchUpdatePhoneNumberInput) + input, ok := in.Parameters.(*CreateMeetingDialOutInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/phone-numbers?operation=batch-update") + opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/dial-outs") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1040,10 +994,14 @@ func (m *awsRestjson1_serializeOpBatchUpdatePhoneNumber) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsCreateMeetingDialOutInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchUpdatePhoneNumberInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateMeetingDialOutInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1060,36 +1018,53 @@ func (m *awsRestjson1_serializeOpBatchUpdatePhoneNumber) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsBatchUpdatePhoneNumberInput(v *BatchUpdatePhoneNumberInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateMeetingDialOutInput(v *CreateMeetingDialOutInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.MeetingId == nil || len(*v.MeetingId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} + } + if v.MeetingId != nil { + if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentBatchUpdatePhoneNumberInput(v *BatchUpdatePhoneNumberInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateMeetingDialOutInput(v *CreateMeetingDialOutInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.UpdatePhoneNumberRequestItems != nil { - ok := object.Key("UpdatePhoneNumberRequestItems") - if err := awsRestjson1_serializeDocumentUpdatePhoneNumberRequestItemList(v.UpdatePhoneNumberRequestItems, ok); err != nil { - return err - } + if v.FromPhoneNumber != nil { + ok := object.Key("FromPhoneNumber") + ok.String(*v.FromPhoneNumber) + } + + if v.JoinToken != nil { + ok := object.Key("JoinToken") + ok.String(*v.JoinToken) + } + + if v.ToPhoneNumber != nil { + ok := object.Key("ToPhoneNumber") + ok.String(*v.ToPhoneNumber) } return nil } -type awsRestjson1_serializeOpBatchUpdateUser struct { +type awsRestjson1_serializeOpCreatePhoneNumberOrder struct { } -func (*awsRestjson1_serializeOpBatchUpdateUser) ID() string { +func (*awsRestjson1_serializeOpCreatePhoneNumberOrder) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpBatchUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreatePhoneNumberOrder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1101,13 +1076,13 @@ func (m *awsRestjson1_serializeOpBatchUpdateUser) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*BatchUpdateUserInput) + input, ok := in.Parameters.(*CreatePhoneNumberOrderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users") + opPath, opQuery := httpbinding.SplitURI("/phone-number-orders") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1123,14 +1098,10 @@ func (m *awsRestjson1_serializeOpBatchUpdateUser) HandleSerialize(ctx context.Co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsBatchUpdateUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentBatchUpdateUserInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreatePhoneNumberOrderInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1147,45 +1118,41 @@ func (m *awsRestjson1_serializeOpBatchUpdateUser) HandleSerialize(ctx context.Co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsBatchUpdateUserInput(v *BatchUpdateUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreatePhoneNumberOrderInput(v *CreatePhoneNumberOrderInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - return nil } -func awsRestjson1_serializeOpDocumentBatchUpdateUserInput(v *BatchUpdateUserInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreatePhoneNumberOrderInput(v *CreatePhoneNumberOrderInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.UpdateUserRequestItems != nil { - ok := object.Key("UpdateUserRequestItems") - if err := awsRestjson1_serializeDocumentUpdateUserRequestItemList(v.UpdateUserRequestItems, ok); err != nil { + if v.E164PhoneNumbers != nil { + ok := object.Key("E164PhoneNumbers") + if err := awsRestjson1_serializeDocumentE164PhoneNumberList(v.E164PhoneNumbers, ok); err != nil { return err } } + if len(v.ProductType) > 0 { + ok := object.Key("ProductType") + ok.String(string(v.ProductType)) + } + return nil } -type awsRestjson1_serializeOpCreateAccount struct { +type awsRestjson1_serializeOpCreateRoom struct { } -func (*awsRestjson1_serializeOpCreateAccount) ID() string { +func (*awsRestjson1_serializeOpCreateRoom) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateRoom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1197,13 +1164,13 @@ func (m *awsRestjson1_serializeOpCreateAccount) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateAccountInput) + input, ok := in.Parameters.(*CreateRoomInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1219,10 +1186,14 @@ func (m *awsRestjson1_serializeOpCreateAccount) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsCreateRoomInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateAccountInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateRoomInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1239,18 +1210,32 @@ func (m *awsRestjson1_serializeOpCreateAccount) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateAccountInput(v *CreateAccountInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateRoomInput(v *CreateRoomInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentCreateAccountInput(v *CreateAccountInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateRoomInput(v *CreateRoomInput, value smithyjson.Value) error { object := value.Object() defer object.Close() + if v.ClientRequestToken != nil { + ok := object.Key("ClientRequestToken") + ok.String(*v.ClientRequestToken) + } + if v.Name != nil { ok := object.Key("Name") ok.String(*v.Name) @@ -1259,14 +1244,14 @@ func awsRestjson1_serializeOpDocumentCreateAccountInput(v *CreateAccountInput, v return nil } -type awsRestjson1_serializeOpCreateAppInstance struct { +type awsRestjson1_serializeOpCreateRoomMembership struct { } -func (*awsRestjson1_serializeOpCreateAppInstance) ID() string { +func (*awsRestjson1_serializeOpCreateRoomMembership) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateAppInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateRoomMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1278,13 +1263,13 @@ func (m *awsRestjson1_serializeOpCreateAppInstance) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateAppInstanceInput) + input, ok := in.Parameters.(*CreateRoomMembershipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/app-instances") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1300,10 +1285,14 @@ func (m *awsRestjson1_serializeOpCreateAppInstance) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsCreateRoomMembershipInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateAppInstanceInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateRoomMembershipInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1320,51 +1309,57 @@ func (m *awsRestjson1_serializeOpCreateAppInstance) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateAppInstanceInput(v *CreateAppInstanceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateRoomMembershipInput(v *CreateRoomMembershipInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} + } + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentCreateAppInstanceInput(v *CreateAppInstanceInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateRoomMembershipInput(v *CreateRoomMembershipInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.Metadata != nil { - ok := object.Key("Metadata") - ok.String(*v.Metadata) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) + if v.MemberId != nil { + ok := object.Key("MemberId") + ok.String(*v.MemberId) } - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { - return err - } + if len(v.Role) > 0 { + ok := object.Key("Role") + ok.String(string(v.Role)) } return nil } -type awsRestjson1_serializeOpCreateAppInstanceAdmin struct { +type awsRestjson1_serializeOpCreateUser struct { } -func (*awsRestjson1_serializeOpCreateAppInstanceAdmin) ID() string { +func (*awsRestjson1_serializeOpCreateUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateAppInstanceAdmin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1376,13 +1371,13 @@ func (m *awsRestjson1_serializeOpCreateAppInstanceAdmin) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateAppInstanceAdminInput) + input, ok := in.Parameters.(*CreateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/admins") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users?operation=create") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -1398,14 +1393,14 @@ func (m *awsRestjson1_serializeOpCreateAppInstanceAdmin) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateAppInstanceAdminInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsCreateUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateAppInstanceAdminInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentCreateUserInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1422,16 +1417,16 @@ func (m *awsRestjson1_serializeOpCreateAppInstanceAdmin) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateAppInstanceAdminInput(v *CreateAppInstanceAdminInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateUserInput(v *CreateUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } @@ -1439,26 +1434,36 @@ func awsRestjson1_serializeOpHttpBindingsCreateAppInstanceAdminInput(v *CreateAp return nil } -func awsRestjson1_serializeOpDocumentCreateAppInstanceAdminInput(v *CreateAppInstanceAdminInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentCreateUserInput(v *CreateUserInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AppInstanceAdminArn != nil { - ok := object.Key("AppInstanceAdminArn") - ok.String(*v.AppInstanceAdminArn) + if v.Email != nil { + ok := object.Key("Email") + ok.String(*v.Email) + } + + if v.Username != nil { + ok := object.Key("Username") + ok.String(*v.Username) + } + + if len(v.UserType) > 0 { + ok := object.Key("UserType") + ok.String(string(v.UserType)) } return nil } -type awsRestjson1_serializeOpCreateAppInstanceUser struct { +type awsRestjson1_serializeOpDeleteAccount struct { } -func (*awsRestjson1_serializeOpCreateAppInstanceUser) ID() string { +func (*awsRestjson1_serializeOpDeleteAccount) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateAppInstanceUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1470,16 +1475,16 @@ func (m *awsRestjson1_serializeOpCreateAppInstanceUser) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateAppInstanceUserInput) + input, ok := in.Parameters.(*DeleteAccountInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/app-instance-users") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "DELETE" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1492,14 +1497,7 @@ func (m *awsRestjson1_serializeOpCreateAppInstanceUser) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateAppInstanceUserInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteAccountInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1512,46 +1510,16 @@ func (m *awsRestjson1_serializeOpCreateAppInstanceUser) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateAppInstanceUserInput(v *CreateAppInstanceUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteAccountInput(v *DeleteAccountInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateAppInstanceUserInput(v *CreateAppInstanceUserInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AppInstanceArn != nil { - ok := object.Key("AppInstanceArn") - ok.String(*v.AppInstanceArn) - } - - if v.AppInstanceUserId != nil { - ok := object.Key("AppInstanceUserId") - ok.String(*v.AppInstanceUserId) - } - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.Metadata != nil { - ok := object.Key("Metadata") - ok.String(*v.Metadata) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } @@ -1559,14 +1527,14 @@ func awsRestjson1_serializeOpDocumentCreateAppInstanceUserInput(v *CreateAppInst return nil } -type awsRestjson1_serializeOpCreateAttendee struct { +type awsRestjson1_serializeOpDeleteEventsConfiguration struct { } -func (*awsRestjson1_serializeOpCreateAttendee) ID() string { +func (*awsRestjson1_serializeOpDeleteEventsConfiguration) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateAttendee) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteEventsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1578,16 +1546,16 @@ func (m *awsRestjson1_serializeOpCreateAttendee) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateAttendeeInput) + input, ok := in.Parameters.(*DeleteEventsConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/attendees") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}/events-configuration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "DELETE" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1600,18 +1568,7 @@ func (m *awsRestjson1_serializeOpCreateAttendee) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateAttendeeInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateAttendeeInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteEventsConfigurationInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1624,35 +1581,25 @@ func (m *awsRestjson1_serializeOpCreateAttendee) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateAttendeeInput(v *CreateAttendeeInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteEventsConfigurationInput(v *DeleteEventsConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateAttendeeInput(v *CreateAttendeeInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ExternalUserId != nil { - ok := object.Key("ExternalUserId") - ok.String(*v.ExternalUserId) + if v.BotId == nil || len(*v.BotId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentAttendeeTagList(v.Tags, ok); err != nil { + if v.BotId != nil { + if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { return err } } @@ -1660,14 +1607,14 @@ func awsRestjson1_serializeOpDocumentCreateAttendeeInput(v *CreateAttendeeInput, return nil } -type awsRestjson1_serializeOpCreateBot struct { +type awsRestjson1_serializeOpDeletePhoneNumber struct { } -func (*awsRestjson1_serializeOpCreateBot) ID() string { +func (*awsRestjson1_serializeOpDeletePhoneNumber) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeletePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1679,16 +1626,16 @@ func (m *awsRestjson1_serializeOpCreateBot) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateBotInput) + input, ok := in.Parameters.(*DeletePhoneNumberInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots") + opPath, opQuery := httpbinding.SplitURI("/phone-numbers/{PhoneNumberId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "DELETE" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1701,18 +1648,7 @@ func (m *awsRestjson1_serializeOpCreateBot) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateBotInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateBotInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeletePhoneNumberInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1725,16 +1661,16 @@ func (m *awsRestjson1_serializeOpCreateBot) HandleSerialize(ctx context.Context, span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateBotInput(v *CreateBotInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeletePhoneNumberInput(v *DeletePhoneNumberInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + if v.PhoneNumberId == nil || len(*v.PhoneNumberId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PhoneNumberId must not be empty")} } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + if v.PhoneNumberId != nil { + if err := encoder.SetURI("PhoneNumberId").String(*v.PhoneNumberId); err != nil { return err } } @@ -1742,31 +1678,14 @@ func awsRestjson1_serializeOpHttpBindingsCreateBotInput(v *CreateBotInput, encod return nil } -func awsRestjson1_serializeOpDocumentCreateBotInput(v *CreateBotInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DisplayName != nil { - ok := object.Key("DisplayName") - ok.String(*v.DisplayName) - } - - if v.Domain != nil { - ok := object.Key("Domain") - ok.String(*v.Domain) - } - - return nil -} - -type awsRestjson1_serializeOpCreateChannel struct { +type awsRestjson1_serializeOpDeleteRoom struct { } -func (*awsRestjson1_serializeOpCreateChannel) ID() string { +func (*awsRestjson1_serializeOpDeleteRoom) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteRoom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1778,16 +1697,16 @@ func (m *awsRestjson1_serializeOpCreateChannel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateChannelInput) + input, ok := in.Parameters.(*DeleteRoomInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "DELETE" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1800,18 +1719,7 @@ func (m *awsRestjson1_serializeOpCreateChannel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateChannelInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateChannelInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteRoomInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1824,56 +1732,25 @@ func (m *awsRestjson1_serializeOpCreateChannel) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateChannelInput(v *CreateChannelInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteRoomInput(v *DeleteRoomInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AppInstanceArn != nil { - ok := object.Key("AppInstanceArn") - ok.String(*v.AppInstanceArn) - } - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.Metadata != nil { - ok := object.Key("Metadata") - ok.String(*v.Metadata) - } - - if len(v.Mode) > 0 { - ok := object.Key("Mode") - ok.String(string(v.Mode)) + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } } - if len(v.Privacy) > 0 { - ok := object.Key("Privacy") - ok.String(string(v.Privacy)) + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { return err } } @@ -1881,14 +1758,14 @@ func awsRestjson1_serializeOpDocumentCreateChannelInput(v *CreateChannelInput, v return nil } -type awsRestjson1_serializeOpCreateChannelBan struct { +type awsRestjson1_serializeOpDeleteRoomMembership struct { } -func (*awsRestjson1_serializeOpCreateChannelBan) ID() string { +func (*awsRestjson1_serializeOpDeleteRoomMembership) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateChannelBan) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteRoomMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1900,16 +1777,16 @@ func (m *awsRestjson1_serializeOpCreateChannelBan) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateChannelBanInput) + input, ok := in.Parameters.(*DeleteRoomMembershipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/bans") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships/{MemberId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "DELETE" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -1922,18 +1799,7 @@ func (m *awsRestjson1_serializeOpCreateChannelBan) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateChannelBanInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateChannelBanInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteRoomMembershipInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1946,48 +1812,49 @@ func (m *awsRestjson1_serializeOpCreateChannelBan) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateChannelBanInput(v *CreateChannelBanInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteRoomMembershipInput(v *DeleteRoomMembershipInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) + if v.MemberId == nil || len(*v.MemberId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MemberId must not be empty")} + } + if v.MemberId != nil { + if err := encoder.SetURI("MemberId").String(*v.MemberId); err != nil { + return err + } } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateChannelBanInput(v *CreateChannelBanInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.MemberArn != nil { - ok := object.Key("MemberArn") - ok.String(*v.MemberArn) + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} + } + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpCreateChannelMembership struct { +type awsRestjson1_serializeOpDisassociatePhoneNumberFromUser struct { } -func (*awsRestjson1_serializeOpCreateChannelMembership) ID() string { +func (*awsRestjson1_serializeOpDisassociatePhoneNumberFromUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateChannelMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDisassociatePhoneNumberFromUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -1999,13 +1866,13 @@ func (m *awsRestjson1_serializeOpCreateChannelMembership) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateChannelMembershipInput) + input, ok := in.Parameters.(*DisassociatePhoneNumberFromUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}?operation=disassociate-phone-number") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -2021,18 +1888,7 @@ func (m *awsRestjson1_serializeOpCreateChannelMembership) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateChannelMembershipInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateChannelMembershipInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDisassociatePhoneNumberFromUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2045,53 +1901,40 @@ func (m *awsRestjson1_serializeOpCreateChannelMembership) HandleSerialize(ctx co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateChannelMembershipInput(v *CreateChannelMembershipInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDisassociatePhoneNumberFromUserInput(v *DisassociatePhoneNumberFromUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateChannelMembershipInput(v *CreateChannelMembershipInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.MemberArn != nil { - ok := object.Key("MemberArn") - ok.String(*v.MemberArn) + if v.UserId == nil || len(*v.UserId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} } - - if len(v.Type) > 0 { - ok := object.Key("Type") - ok.String(string(v.Type)) + if v.UserId != nil { + if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpCreateChannelModerator struct { +type awsRestjson1_serializeOpDisassociateSigninDelegateGroupsFromAccount struct { } -func (*awsRestjson1_serializeOpCreateChannelModerator) ID() string { +func (*awsRestjson1_serializeOpDisassociateSigninDelegateGroupsFromAccount) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateChannelModerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDisassociateSigninDelegateGroupsFromAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2103,13 +1946,13 @@ func (m *awsRestjson1_serializeOpCreateChannelModerator) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateChannelModeratorInput) + input, ok := in.Parameters.(*DisassociateSigninDelegateGroupsFromAccountInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/moderators") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}?operation=disassociate-signin-delegate-groups") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -2125,14 +1968,14 @@ func (m *awsRestjson1_serializeOpCreateChannelModerator) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateChannelModeratorInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDisassociateSigninDelegateGroupsFromAccountInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateChannelModeratorInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentDisassociateSigninDelegateGroupsFromAccountInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2149,48 +1992,45 @@ func (m *awsRestjson1_serializeOpCreateChannelModerator) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateChannelModeratorInput(v *CreateChannelModeratorInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDisassociateSigninDelegateGroupsFromAccountInput(v *DisassociateSigninDelegateGroupsFromAccountInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - return nil } -func awsRestjson1_serializeOpDocumentCreateChannelModeratorInput(v *CreateChannelModeratorInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentDisassociateSigninDelegateGroupsFromAccountInput(v *DisassociateSigninDelegateGroupsFromAccountInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.ChannelModeratorArn != nil { - ok := object.Key("ChannelModeratorArn") - ok.String(*v.ChannelModeratorArn) + if v.GroupNames != nil { + ok := object.Key("GroupNames") + if err := awsRestjson1_serializeDocumentNonEmptyStringList(v.GroupNames, ok); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpCreateMediaCapturePipeline struct { +type awsRestjson1_serializeOpGetAccount struct { } -func (*awsRestjson1_serializeOpCreateMediaCapturePipeline) ID() string { +func (*awsRestjson1_serializeOpGetAccount) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateMediaCapturePipeline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2202,16 +2042,16 @@ func (m *awsRestjson1_serializeOpCreateMediaCapturePipeline) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateMediaCapturePipelineInput) + input, ok := in.Parameters.(*GetAccountInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/media-capture-pipelines") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2224,14 +2064,7 @@ func (m *awsRestjson1_serializeOpCreateMediaCapturePipeline) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateMediaCapturePipelineInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetAccountInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2244,61 +2077,31 @@ func (m *awsRestjson1_serializeOpCreateMediaCapturePipeline) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateMediaCapturePipelineInput(v *CreateMediaCapturePipelineInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetAccountInput(v *GetAccountInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateMediaCapturePipelineInput(v *CreateMediaCapturePipelineInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ChimeSdkMeetingConfiguration != nil { - ok := object.Key("ChimeSdkMeetingConfiguration") - if err := awsRestjson1_serializeDocumentChimeSdkMeetingConfiguration(v.ChimeSdkMeetingConfiguration, ok); err != nil { + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.SinkArn != nil { - ok := object.Key("SinkArn") - ok.String(*v.SinkArn) - } - - if len(v.SinkType) > 0 { - ok := object.Key("SinkType") - ok.String(string(v.SinkType)) - } - - if v.SourceArn != nil { - ok := object.Key("SourceArn") - ok.String(*v.SourceArn) - } - - if len(v.SourceType) > 0 { - ok := object.Key("SourceType") - ok.String(string(v.SourceType)) - } - return nil } -type awsRestjson1_serializeOpCreateMeeting struct { +type awsRestjson1_serializeOpGetAccountSettings struct { } -func (*awsRestjson1_serializeOpCreateMeeting) ID() string { +func (*awsRestjson1_serializeOpGetAccountSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateMeeting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2310,16 +2113,16 @@ func (m *awsRestjson1_serializeOpCreateMeeting) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateMeetingInput) + input, ok := in.Parameters.(*GetAccountSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/meetings") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2332,14 +2135,7 @@ func (m *awsRestjson1_serializeOpCreateMeeting) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateMeetingInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetAccountSettingsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2352,48 +2148,16 @@ func (m *awsRestjson1_serializeOpCreateMeeting) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateMeetingInput(v *CreateMeetingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetAccountSettingsInput(v *GetAccountSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateMeetingInput(v *CreateMeetingInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.ExternalMeetingId != nil { - ok := object.Key("ExternalMeetingId") - ok.String(*v.ExternalMeetingId) - } - - if v.MediaRegion != nil { - ok := object.Key("MediaRegion") - ok.String(*v.MediaRegion) - } - - if v.MeetingHostId != nil { - ok := object.Key("MeetingHostId") - ok.String(*v.MeetingHostId) - } - - if v.NotificationsConfiguration != nil { - ok := object.Key("NotificationsConfiguration") - if err := awsRestjson1_serializeDocumentMeetingNotificationConfiguration(v.NotificationsConfiguration, ok); err != nil { - return err - } + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentMeetingTagList(v.Tags, ok); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } @@ -2401,14 +2165,14 @@ func awsRestjson1_serializeOpDocumentCreateMeetingInput(v *CreateMeetingInput, v return nil } -type awsRestjson1_serializeOpCreateMeetingDialOut struct { +type awsRestjson1_serializeOpGetBot struct { } -func (*awsRestjson1_serializeOpCreateMeetingDialOut) ID() string { +func (*awsRestjson1_serializeOpGetBot) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateMeetingDialOut) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2420,16 +2184,16 @@ func (m *awsRestjson1_serializeOpCreateMeetingDialOut) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateMeetingDialOutInput) + input, ok := in.Parameters.(*GetBotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/dial-outs") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2442,18 +2206,7 @@ func (m *awsRestjson1_serializeOpCreateMeetingDialOut) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateMeetingDialOutInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateMeetingDialOutInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetBotInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2466,53 +2219,40 @@ func (m *awsRestjson1_serializeOpCreateMeetingDialOut) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateMeetingDialOutInput(v *CreateMeetingDialOutInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetBotInput(v *GetBotInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateMeetingDialOutInput(v *CreateMeetingDialOutInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.FromPhoneNumber != nil { - ok := object.Key("FromPhoneNumber") - ok.String(*v.FromPhoneNumber) - } - - if v.JoinToken != nil { - ok := object.Key("JoinToken") - ok.String(*v.JoinToken) + if v.BotId == nil || len(*v.BotId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} } - - if v.ToPhoneNumber != nil { - ok := object.Key("ToPhoneNumber") - ok.String(*v.ToPhoneNumber) + if v.BotId != nil { + if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpCreateMeetingWithAttendees struct { +type awsRestjson1_serializeOpGetEventsConfiguration struct { } -func (*awsRestjson1_serializeOpCreateMeetingWithAttendees) ID() string { +func (*awsRestjson1_serializeOpGetEventsConfiguration) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateMeetingWithAttendees) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetEventsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2524,16 +2264,16 @@ func (m *awsRestjson1_serializeOpCreateMeetingWithAttendees) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateMeetingWithAttendeesInput) + input, ok := in.Parameters.(*GetEventsConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/meetings?operation=create-attendees") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}/events-configuration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2546,14 +2286,7 @@ func (m *awsRestjson1_serializeOpCreateMeetingWithAttendees) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateMeetingWithAttendeesInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetEventsConfigurationInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2566,55 +2299,25 @@ func (m *awsRestjson1_serializeOpCreateMeetingWithAttendees) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateMeetingWithAttendeesInput(v *CreateMeetingWithAttendeesInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetEventsConfigurationInput(v *GetEventsConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateMeetingWithAttendeesInput(v *CreateMeetingWithAttendeesInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Attendees != nil { - ok := object.Key("Attendees") - if err := awsRestjson1_serializeDocumentCreateMeetingWithAttendeesRequestItemList(v.Attendees, ok); err != nil { - return err - } - } - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.ExternalMeetingId != nil { - ok := object.Key("ExternalMeetingId") - ok.String(*v.ExternalMeetingId) - } - - if v.MediaRegion != nil { - ok := object.Key("MediaRegion") - ok.String(*v.MediaRegion) - } - - if v.MeetingHostId != nil { - ok := object.Key("MeetingHostId") - ok.String(*v.MeetingHostId) + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - - if v.NotificationsConfiguration != nil { - ok := object.Key("NotificationsConfiguration") - if err := awsRestjson1_serializeDocumentMeetingNotificationConfiguration(v.NotificationsConfiguration, ok); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentMeetingTagList(v.Tags, ok); err != nil { + if v.BotId == nil || len(*v.BotId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} + } + if v.BotId != nil { + if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { return err } } @@ -2622,14 +2325,14 @@ func awsRestjson1_serializeOpDocumentCreateMeetingWithAttendeesInput(v *CreateMe return nil } -type awsRestjson1_serializeOpCreatePhoneNumberOrder struct { +type awsRestjson1_serializeOpGetGlobalSettings struct { } -func (*awsRestjson1_serializeOpCreatePhoneNumberOrder) ID() string { +func (*awsRestjson1_serializeOpGetGlobalSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreatePhoneNumberOrder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetGlobalSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2641,16 +2344,16 @@ func (m *awsRestjson1_serializeOpCreatePhoneNumberOrder) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreatePhoneNumberOrderInput) + input, ok := in.Parameters.(*GetGlobalSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/phone-number-orders") + opPath, opQuery := httpbinding.SplitURI("/settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2663,17 +2366,6 @@ func (m *awsRestjson1_serializeOpCreatePhoneNumberOrder) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreatePhoneNumberOrderInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2683,7 +2375,7 @@ func (m *awsRestjson1_serializeOpCreatePhoneNumberOrder) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreatePhoneNumberOrderInput(v *CreatePhoneNumberOrderInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetGlobalSettingsInput(v *GetGlobalSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -2691,33 +2383,14 @@ func awsRestjson1_serializeOpHttpBindingsCreatePhoneNumberOrderInput(v *CreatePh return nil } -func awsRestjson1_serializeOpDocumentCreatePhoneNumberOrderInput(v *CreatePhoneNumberOrderInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.E164PhoneNumbers != nil { - ok := object.Key("E164PhoneNumbers") - if err := awsRestjson1_serializeDocumentE164PhoneNumberList(v.E164PhoneNumbers, ok); err != nil { - return err - } - } - - if len(v.ProductType) > 0 { - ok := object.Key("ProductType") - ok.String(string(v.ProductType)) - } - - return nil -} - -type awsRestjson1_serializeOpCreateProxySession struct { +type awsRestjson1_serializeOpGetPhoneNumber struct { } -func (*awsRestjson1_serializeOpCreateProxySession) ID() string { +func (*awsRestjson1_serializeOpGetPhoneNumber) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateProxySession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetPhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2729,16 +2402,16 @@ func (m *awsRestjson1_serializeOpCreateProxySession) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateProxySessionInput) + input, ok := in.Parameters.(*GetPhoneNumberInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/proxy-sessions") + opPath, opQuery := httpbinding.SplitURI("/phone-numbers/{PhoneNumberId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2751,18 +2424,7 @@ func (m *awsRestjson1_serializeOpCreateProxySession) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateProxySessionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateProxySessionInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetPhoneNumberInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2775,64 +2437,16 @@ func (m *awsRestjson1_serializeOpCreateProxySession) HandleSerialize(ctx context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateProxySessionInput(v *CreateProxySessionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetPhoneNumberInput(v *GetPhoneNumberInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateProxySessionInput(v *CreateProxySessionInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Capabilities != nil { - ok := object.Key("Capabilities") - if err := awsRestjson1_serializeDocumentCapabilityList(v.Capabilities, ok); err != nil { - return err - } - } - - if v.ExpiryMinutes != nil { - ok := object.Key("ExpiryMinutes") - ok.Integer(*v.ExpiryMinutes) - } - - if len(v.GeoMatchLevel) > 0 { - ok := object.Key("GeoMatchLevel") - ok.String(string(v.GeoMatchLevel)) - } - - if v.GeoMatchParams != nil { - ok := object.Key("GeoMatchParams") - if err := awsRestjson1_serializeDocumentGeoMatchParams(v.GeoMatchParams, ok); err != nil { - return err - } - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - if len(v.NumberSelectionBehavior) > 0 { - ok := object.Key("NumberSelectionBehavior") - ok.String(string(v.NumberSelectionBehavior)) + if v.PhoneNumberId == nil || len(*v.PhoneNumberId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PhoneNumberId must not be empty")} } - - if v.ParticipantPhoneNumbers != nil { - ok := object.Key("ParticipantPhoneNumbers") - if err := awsRestjson1_serializeDocumentParticipantPhoneNumberList(v.ParticipantPhoneNumbers, ok); err != nil { + if v.PhoneNumberId != nil { + if err := encoder.SetURI("PhoneNumberId").String(*v.PhoneNumberId); err != nil { return err } } @@ -2840,14 +2454,14 @@ func awsRestjson1_serializeOpDocumentCreateProxySessionInput(v *CreateProxySessi return nil } -type awsRestjson1_serializeOpCreateRoom struct { +type awsRestjson1_serializeOpGetPhoneNumberOrder struct { } -func (*awsRestjson1_serializeOpCreateRoom) ID() string { +func (*awsRestjson1_serializeOpGetPhoneNumberOrder) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateRoom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetPhoneNumberOrder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2859,16 +2473,16 @@ func (m *awsRestjson1_serializeOpCreateRoom) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateRoomInput) + input, ok := in.Parameters.(*GetPhoneNumberOrderInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms") + opPath, opQuery := httpbinding.SplitURI("/phone-number-orders/{PhoneNumberOrderId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2881,18 +2495,7 @@ func (m *awsRestjson1_serializeOpCreateRoom) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateRoomInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateRoomInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetPhoneNumberOrderInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -2905,16 +2508,16 @@ func (m *awsRestjson1_serializeOpCreateRoom) HandleSerialize(ctx context.Context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateRoomInput(v *CreateRoomInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetPhoneNumberOrderInput(v *GetPhoneNumberOrderInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + if v.PhoneNumberOrderId == nil || len(*v.PhoneNumberOrderId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PhoneNumberOrderId must not be empty")} } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + if v.PhoneNumberOrderId != nil { + if err := encoder.SetURI("PhoneNumberOrderId").String(*v.PhoneNumberOrderId); err != nil { return err } } @@ -2922,31 +2525,14 @@ func awsRestjson1_serializeOpHttpBindingsCreateRoomInput(v *CreateRoomInput, enc return nil } -func awsRestjson1_serializeOpDocumentCreateRoomInput(v *CreateRoomInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - return nil -} - -type awsRestjson1_serializeOpCreateRoomMembership struct { +type awsRestjson1_serializeOpGetPhoneNumberSettings struct { } -func (*awsRestjson1_serializeOpCreateRoomMembership) ID() string { +func (*awsRestjson1_serializeOpGetPhoneNumberSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateRoomMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetPhoneNumberSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -2958,16 +2544,16 @@ func (m *awsRestjson1_serializeOpCreateRoomMembership) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateRoomMembershipInput) + input, ok := in.Parameters.(*GetPhoneNumberSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships") + opPath, opQuery := httpbinding.SplitURI("/settings/phone-number") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -2980,21 +2566,6 @@ func (m *awsRestjson1_serializeOpCreateRoomMembership) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateRoomMembershipInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateRoomMembershipInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3004,57 +2575,22 @@ func (m *awsRestjson1_serializeOpCreateRoomMembership) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateRoomMembershipInput(v *CreateRoomMembershipInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetPhoneNumberSettingsInput(v *GetPhoneNumberSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} - } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentCreateRoomMembershipInput(v *CreateRoomMembershipInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.MemberId != nil { - ok := object.Key("MemberId") - ok.String(*v.MemberId) - } - - if len(v.Role) > 0 { - ok := object.Key("Role") - ok.String(string(v.Role)) - } - return nil } -type awsRestjson1_serializeOpCreateSipMediaApplication struct { +type awsRestjson1_serializeOpGetRetentionSettings struct { } -func (*awsRestjson1_serializeOpCreateSipMediaApplication) ID() string { +func (*awsRestjson1_serializeOpGetRetentionSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateSipMediaApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetRetentionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3066,16 +2602,16 @@ func (m *awsRestjson1_serializeOpCreateSipMediaApplication) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateSipMediaApplicationInput) + input, ok := in.Parameters.(*GetRetentionSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/retention-settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3088,14 +2624,7 @@ func (m *awsRestjson1_serializeOpCreateSipMediaApplication) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateSipMediaApplicationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetRetentionSettingsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3108,46 +2637,31 @@ func (m *awsRestjson1_serializeOpCreateSipMediaApplication) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateSipMediaApplicationInput(v *CreateSipMediaApplicationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetRetentionSettingsInput(v *GetRetentionSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateSipMediaApplicationInput(v *CreateSipMediaApplicationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AwsRegion != nil { - ok := object.Key("AwsRegion") - ok.String(*v.AwsRegion) + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - - if v.Endpoints != nil { - ok := object.Key("Endpoints") - if err := awsRestjson1_serializeDocumentSipMediaApplicationEndpointList(v.Endpoints, ok); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - return nil } -type awsRestjson1_serializeOpCreateSipMediaApplicationCall struct { +type awsRestjson1_serializeOpGetRoom struct { } -func (*awsRestjson1_serializeOpCreateSipMediaApplicationCall) ID() string { +func (*awsRestjson1_serializeOpGetRoom) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateSipMediaApplicationCall) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetRoom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3159,16 +2673,16 @@ func (m *awsRestjson1_serializeOpCreateSipMediaApplicationCall) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateSipMediaApplicationCallInput) + input, ok := in.Parameters.(*GetRoomInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications/{SipMediaApplicationId}/calls") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3181,18 +2695,7 @@ func (m *awsRestjson1_serializeOpCreateSipMediaApplicationCall) HandleSerialize( return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateSipMediaApplicationCallInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateSipMediaApplicationCallInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetRoomInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3205,55 +2708,40 @@ func (m *awsRestjson1_serializeOpCreateSipMediaApplicationCall) HandleSerialize( span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateSipMediaApplicationCallInput(v *CreateSipMediaApplicationCallInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetRoomInput(v *GetRoomInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.SipMediaApplicationId == nil || len(*v.SipMediaApplicationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipMediaApplicationId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.SipMediaApplicationId != nil { - if err := encoder.SetURI("SipMediaApplicationId").String(*v.SipMediaApplicationId); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateSipMediaApplicationCallInput(v *CreateSipMediaApplicationCallInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.FromPhoneNumber != nil { - ok := object.Key("FromPhoneNumber") - ok.String(*v.FromPhoneNumber) + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} } - - if v.SipHeaders != nil { - ok := object.Key("SipHeaders") - if err := awsRestjson1_serializeDocumentSipHeadersMap(v.SipHeaders, ok); err != nil { + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { return err } } - if v.ToPhoneNumber != nil { - ok := object.Key("ToPhoneNumber") - ok.String(*v.ToPhoneNumber) - } - return nil } -type awsRestjson1_serializeOpCreateSipRule struct { +type awsRestjson1_serializeOpGetUser struct { } -func (*awsRestjson1_serializeOpCreateSipRule) ID() string { +func (*awsRestjson1_serializeOpGetUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateSipRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3265,16 +2753,16 @@ func (m *awsRestjson1_serializeOpCreateSipRule) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateSipRuleInput) + input, ok := in.Parameters.(*GetUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/sip-rules") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3287,14 +2775,7 @@ func (m *awsRestjson1_serializeOpCreateSipRule) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateSipRuleInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3307,56 +2788,40 @@ func (m *awsRestjson1_serializeOpCreateSipRule) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateSipRuleInput(v *CreateSipRuleInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetUserInput(v *GetUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateSipRuleInput(v *CreateSipRuleInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Disabled != nil { - ok := object.Key("Disabled") - ok.Boolean(*v.Disabled) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - - if v.TargetApplications != nil { - ok := object.Key("TargetApplications") - if err := awsRestjson1_serializeDocumentSipRuleTargetApplicationList(v.TargetApplications, ok); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if len(v.TriggerType) > 0 { - ok := object.Key("TriggerType") - ok.String(string(v.TriggerType)) + if v.UserId == nil || len(*v.UserId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} } - - if v.TriggerValue != nil { - ok := object.Key("TriggerValue") - ok.String(*v.TriggerValue) + if v.UserId != nil { + if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpCreateUser struct { +type awsRestjson1_serializeOpGetUserSettings struct { } -func (*awsRestjson1_serializeOpCreateUser) ID() string { +func (*awsRestjson1_serializeOpGetUserSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGetUserSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3368,16 +2833,16 @@ func (m *awsRestjson1_serializeOpCreateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateUserInput) + input, ok := in.Parameters.(*GetUserSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users?operation=create") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}/settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3390,18 +2855,7 @@ func (m *awsRestjson1_serializeOpCreateUser) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsCreateUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateUserInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsGetUserSettingsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3414,7 +2868,7 @@ func (m *awsRestjson1_serializeOpCreateUser) HandleSerialize(ctx context.Context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateUserInput(v *CreateUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsGetUserSettingsInput(v *GetUserSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3428,39 +2882,26 @@ func awsRestjson1_serializeOpHttpBindingsCreateUserInput(v *CreateUserInput, enc } } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateUserInput(v *CreateUserInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Email != nil { - ok := object.Key("Email") - ok.String(*v.Email) - } - - if v.Username != nil { - ok := object.Key("Username") - ok.String(*v.Username) + if v.UserId == nil || len(*v.UserId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} } - - if len(v.UserType) > 0 { - ok := object.Key("UserType") - ok.String(string(v.UserType)) + if v.UserId != nil { + if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpCreateVoiceConnector struct { +type awsRestjson1_serializeOpInviteUsers struct { } -func (*awsRestjson1_serializeOpCreateVoiceConnector) ID() string { +func (*awsRestjson1_serializeOpInviteUsers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateVoiceConnector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpInviteUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3472,13 +2913,13 @@ func (m *awsRestjson1_serializeOpCreateVoiceConnector) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateVoiceConnectorInput) + input, ok := in.Parameters.(*InviteUsersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users?operation=add") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "POST" @@ -3494,10 +2935,14 @@ func (m *awsRestjson1_serializeOpCreateVoiceConnector) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } + if err := awsRestjson1_serializeOpHttpBindingsInviteUsersInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + restEncoder.SetHeader("Content-Type").String("application/json") jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateVoiceConnectorInput(input, jsonEncoder.Value); err != nil { + if err := awsRestjson1_serializeOpDocumentInviteUsersInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3514,44 +2959,50 @@ func (m *awsRestjson1_serializeOpCreateVoiceConnector) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateVoiceConnectorInput(v *CreateVoiceConnectorInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsInviteUsersInput(v *InviteUsersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + return nil } -func awsRestjson1_serializeOpDocumentCreateVoiceConnectorInput(v *CreateVoiceConnectorInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentInviteUsersInput(v *InviteUsersInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.AwsRegion) > 0 { - ok := object.Key("AwsRegion") - ok.String(string(v.AwsRegion)) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) + if v.UserEmailList != nil { + ok := object.Key("UserEmailList") + if err := awsRestjson1_serializeDocumentUserEmailList(v.UserEmailList, ok); err != nil { + return err + } } - if v.RequireEncryption != nil { - ok := object.Key("RequireEncryption") - ok.Boolean(*v.RequireEncryption) + if len(v.UserType) > 0 { + ok := object.Key("UserType") + ok.String(string(v.UserType)) } return nil } -type awsRestjson1_serializeOpCreateVoiceConnectorGroup struct { +type awsRestjson1_serializeOpListAccounts struct { } -func (*awsRestjson1_serializeOpCreateVoiceConnectorGroup) ID() string { +func (*awsRestjson1_serializeOpListAccounts) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpCreateVoiceConnectorGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3563,16 +3014,16 @@ func (m *awsRestjson1_serializeOpCreateVoiceConnectorGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*CreateVoiceConnectorGroupInput) + input, ok := in.Parameters.(*ListAccountsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connector-groups") + opPath, opQuery := httpbinding.SplitURI("/accounts") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3585,14 +3036,7 @@ func (m *awsRestjson1_serializeOpCreateVoiceConnectorGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentCreateVoiceConnectorGroupInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListAccountsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3605,41 +3049,38 @@ func (m *awsRestjson1_serializeOpCreateVoiceConnectorGroup) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsCreateVoiceConnectorGroupInput(v *CreateVoiceConnectorGroupInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListAccountsInput(v *ListAccountsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - return nil -} - -func awsRestjson1_serializeOpDocumentCreateVoiceConnectorGroupInput(v *CreateVoiceConnectorGroupInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) + encoder.SetQuery("name").String(*v.Name) } - if v.VoiceConnectorItems != nil { - ok := object.Key("VoiceConnectorItems") - if err := awsRestjson1_serializeDocumentVoiceConnectorItemList(v.VoiceConnectorItems, ok); err != nil { - return err - } + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.UserEmail != nil { + encoder.SetQuery("user-email").String(*v.UserEmail) } return nil } -type awsRestjson1_serializeOpDeleteAccount struct { +type awsRestjson1_serializeOpListBots struct { } -func (*awsRestjson1_serializeOpDeleteAccount) ID() string { +func (*awsRestjson1_serializeOpListBots) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListBots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3651,16 +3092,16 @@ func (m *awsRestjson1_serializeOpDeleteAccount) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteAccountInput) + input, ok := in.Parameters.(*ListBotsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3673,7 +3114,7 @@ func (m *awsRestjson1_serializeOpDeleteAccount) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteAccountInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListBotsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3686,7 +3127,7 @@ func (m *awsRestjson1_serializeOpDeleteAccount) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteAccountInput(v *DeleteAccountInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListBotsInput(v *ListBotsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -3700,17 +3141,25 @@ func awsRestjson1_serializeOpHttpBindingsDeleteAccountInput(v *DeleteAccountInpu } } + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + return nil } -type awsRestjson1_serializeOpDeleteAppInstance struct { +type awsRestjson1_serializeOpListPhoneNumberOrders struct { } -func (*awsRestjson1_serializeOpDeleteAppInstance) ID() string { +func (*awsRestjson1_serializeOpListPhoneNumberOrders) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteAppInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListPhoneNumberOrders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3722,16 +3171,16 @@ func (m *awsRestjson1_serializeOpDeleteAppInstance) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteAppInstanceInput) + input, ok := in.Parameters.(*ListPhoneNumberOrdersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}") + opPath, opQuery := httpbinding.SplitURI("/phone-number-orders") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3744,7 +3193,7 @@ func (m *awsRestjson1_serializeOpDeleteAppInstance) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListPhoneNumberOrdersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3757,31 +3206,30 @@ func (m *awsRestjson1_serializeOpDeleteAppInstance) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceInput(v *DeleteAppInstanceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListPhoneNumberOrdersInput(v *ListPhoneNumberOrdersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) } return nil } -type awsRestjson1_serializeOpDeleteAppInstanceAdmin struct { +type awsRestjson1_serializeOpListPhoneNumbers struct { } -func (*awsRestjson1_serializeOpDeleteAppInstanceAdmin) ID() string { +func (*awsRestjson1_serializeOpListPhoneNumbers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteAppInstanceAdmin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListPhoneNumbers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3793,16 +3241,16 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceAdmin) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteAppInstanceAdminInput) + input, ok := in.Parameters.(*ListPhoneNumbersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}") + opPath, opQuery := httpbinding.SplitURI("/phone-numbers") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3815,7 +3263,7 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceAdmin) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceAdminInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListPhoneNumbersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3828,40 +3276,46 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceAdmin) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceAdminInput(v *DeleteAppInstanceAdminInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListPhoneNumbersInput(v *ListPhoneNumbersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AppInstanceAdminArn == nil || len(*v.AppInstanceAdminArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceAdminArn must not be empty")} + if len(v.FilterName) > 0 { + encoder.SetQuery("filter-name").String(string(v.FilterName)) } - if v.AppInstanceAdminArn != nil { - if err := encoder.SetURI("AppInstanceAdminArn").String(*v.AppInstanceAdminArn); err != nil { - return err - } + + if v.FilterValue != nil { + encoder.SetQuery("filter-value").String(*v.FilterValue) } - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if len(v.ProductType) > 0 { + encoder.SetQuery("product-type").String(string(v.ProductType)) + } + + if len(v.Status) > 0 { + encoder.SetQuery("status").String(string(v.Status)) } return nil } -type awsRestjson1_serializeOpDeleteAppInstanceStreamingConfigurations struct { +type awsRestjson1_serializeOpListRoomMemberships struct { } -func (*awsRestjson1_serializeOpDeleteAppInstanceStreamingConfigurations) ID() string { +func (*awsRestjson1_serializeOpListRoomMemberships) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteAppInstanceStreamingConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListRoomMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3873,16 +3327,16 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceStreamingConfigurations) Handl return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteAppInstanceStreamingConfigurationsInput) + input, ok := in.Parameters.(*ListRoomMembershipsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/streaming-configurations") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3895,7 +3349,7 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceStreamingConfigurations) Handl return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceStreamingConfigurationsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListRoomMembershipsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3908,16 +3362,33 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceStreamingConfigurations) Handl span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceStreamingConfigurationsInput(v *DeleteAppInstanceStreamingConfigurationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListRoomMembershipsInput(v *ListRoomMembershipsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { return err } } @@ -3925,14 +3396,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceStreamingConfiguration return nil } -type awsRestjson1_serializeOpDeleteAppInstanceUser struct { +type awsRestjson1_serializeOpListRooms struct { } -func (*awsRestjson1_serializeOpDeleteAppInstanceUser) ID() string { +func (*awsRestjson1_serializeOpListRooms) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteAppInstanceUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListRooms) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -3944,16 +3415,16 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceUser) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteAppInstanceUserInput) + input, ok := in.Parameters.(*ListRoomsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/app-instance-users/{AppInstanceUserArn}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -3966,7 +3437,7 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceUser) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceUserInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListRoomsInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -3979,31 +3450,43 @@ func (m *awsRestjson1_serializeOpDeleteAppInstanceUser) HandleSerialize(ctx cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteAppInstanceUserInput(v *DeleteAppInstanceUserInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListRoomsInput(v *ListRoomsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AppInstanceUserArn == nil || len(*v.AppInstanceUserArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceUserArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.AppInstanceUserArn != nil { - if err := encoder.SetURI("AppInstanceUserArn").String(*v.AppInstanceUserArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - return nil -} - -type awsRestjson1_serializeOpDeleteAttendee struct { + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.MemberId != nil { + encoder.SetQuery("member-id").String(*v.MemberId) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListSupportedPhoneNumberCountries struct { } -func (*awsRestjson1_serializeOpDeleteAttendee) ID() string { +func (*awsRestjson1_serializeOpListSupportedPhoneNumberCountries) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteAttendee) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListSupportedPhoneNumberCountries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4015,16 +3498,16 @@ func (m *awsRestjson1_serializeOpDeleteAttendee) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteAttendeeInput) + input, ok := in.Parameters.(*ListSupportedPhoneNumberCountriesInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/attendees/{AttendeeId}") + opPath, opQuery := httpbinding.SplitURI("/phone-number-countries") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4037,7 +3520,7 @@ func (m *awsRestjson1_serializeOpDeleteAttendee) HandleSerialize(ctx context.Con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteAttendeeInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListSupportedPhoneNumberCountriesInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4050,40 +3533,26 @@ func (m *awsRestjson1_serializeOpDeleteAttendee) HandleSerialize(ctx context.Con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteAttendeeInput(v *DeleteAttendeeInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListSupportedPhoneNumberCountriesInput(v *ListSupportedPhoneNumberCountriesInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.AttendeeId == nil || len(*v.AttendeeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AttendeeId must not be empty")} - } - if v.AttendeeId != nil { - if err := encoder.SetURI("AttendeeId").String(*v.AttendeeId); err != nil { - return err - } - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } + if len(v.ProductType) > 0 { + encoder.SetQuery("product-type").String(string(v.ProductType)) } return nil } -type awsRestjson1_serializeOpDeleteChannel struct { +type awsRestjson1_serializeOpListUsers struct { } -func (*awsRestjson1_serializeOpDeleteChannel) ID() string { +func (*awsRestjson1_serializeOpListUsers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4095,16 +3564,16 @@ func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteChannelInput) + input, ok := in.Parameters.(*ListUsersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4117,7 +3586,7 @@ func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsListUsersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4130,36 +3599,47 @@ func (m *awsRestjson1_serializeOpDeleteChannel) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteChannelInput(v *DeleteChannelInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if v.UserEmail != nil { + encoder.SetQuery("user-email").String(*v.UserEmail) + } + + if len(v.UserType) > 0 { + encoder.SetQuery("user-type").String(string(v.UserType)) } return nil } -type awsRestjson1_serializeOpDeleteChannelBan struct { +type awsRestjson1_serializeOpLogoutUser struct { } -func (*awsRestjson1_serializeOpDeleteChannelBan) ID() string { +func (*awsRestjson1_serializeOpLogoutUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteChannelBan) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpLogoutUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4171,16 +3651,16 @@ func (m *awsRestjson1_serializeOpDeleteChannelBan) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteChannelBanInput) + input, ok := in.Parameters.(*LogoutUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/bans/{MemberArn}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}?operation=logout") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4193,7 +3673,7 @@ func (m *awsRestjson1_serializeOpDeleteChannelBan) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelBanInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsLogoutUserInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4206,30 +3686,25 @@ func (m *awsRestjson1_serializeOpDeleteChannelBan) HandleSerialize(ctx context.C span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteChannelBanInput(v *DeleteChannelBanInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsLogoutUserInput(v *LogoutUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MemberArn == nil || len(*v.MemberArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MemberArn must not be empty")} + if v.UserId == nil || len(*v.UserId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} } - if v.MemberArn != nil { - if err := encoder.SetURI("MemberArn").String(*v.MemberArn); err != nil { + if v.UserId != nil { + if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { return err } } @@ -4237,14 +3712,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteChannelBanInput(v *DeleteChannelB return nil } -type awsRestjson1_serializeOpDeleteChannelMembership struct { +type awsRestjson1_serializeOpPutEventsConfiguration struct { } -func (*awsRestjson1_serializeOpDeleteChannelMembership) ID() string { +func (*awsRestjson1_serializeOpPutEventsConfiguration) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteChannelMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpPutEventsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4256,16 +3731,16 @@ func (m *awsRestjson1_serializeOpDeleteChannelMembership) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteChannelMembershipInput) + input, ok := in.Parameters.(*PutEventsConfigurationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships/{MemberArn}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}/events-configuration") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4278,7 +3753,18 @@ func (m *awsRestjson1_serializeOpDeleteChannelMembership) HandleSerialize(ctx co return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelMembershipInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsPutEventsConfigurationInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutEventsConfigurationInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4291,30 +3777,25 @@ func (m *awsRestjson1_serializeOpDeleteChannelMembership) HandleSerialize(ctx co span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteChannelMembershipInput(v *DeleteChannelMembershipInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsPutEventsConfigurationInput(v *PutEventsConfigurationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MemberArn == nil || len(*v.MemberArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MemberArn must not be empty")} + if v.BotId == nil || len(*v.BotId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} } - if v.MemberArn != nil { - if err := encoder.SetURI("MemberArn").String(*v.MemberArn); err != nil { + if v.BotId != nil { + if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { return err } } @@ -4322,14 +3803,31 @@ func awsRestjson1_serializeOpHttpBindingsDeleteChannelMembershipInput(v *DeleteC return nil } -type awsRestjson1_serializeOpDeleteChannelMessage struct { +func awsRestjson1_serializeOpDocumentPutEventsConfigurationInput(v *PutEventsConfigurationInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.LambdaFunctionArn != nil { + ok := object.Key("LambdaFunctionArn") + ok.String(*v.LambdaFunctionArn) + } + + if v.OutboundEventsHTTPSEndpoint != nil { + ok := object.Key("OutboundEventsHTTPSEndpoint") + ok.String(*v.OutboundEventsHTTPSEndpoint) + } + + return nil +} + +type awsRestjson1_serializeOpPutRetentionSettings struct { } -func (*awsRestjson1_serializeOpDeleteChannelMessage) ID() string { +func (*awsRestjson1_serializeOpPutRetentionSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteChannelMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpPutRetentionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4341,16 +3839,16 @@ func (m *awsRestjson1_serializeOpDeleteChannelMessage) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteChannelMessageInput) + input, ok := in.Parameters.(*PutRetentionSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages/{MessageId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/retention-settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4363,7 +3861,18 @@ func (m *awsRestjson1_serializeOpDeleteChannelMessage) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelMessageInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsPutRetentionSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutRetentionSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4376,30 +3885,30 @@ func (m *awsRestjson1_serializeOpDeleteChannelMessage) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteChannelMessageInput(v *DeleteChannelMessageInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsPutRetentionSettingsInput(v *PutRetentionSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } + return nil +} - if v.MessageId == nil || len(*v.MessageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} - } - if v.MessageId != nil { - if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { +func awsRestjson1_serializeOpDocumentPutRetentionSettingsInput(v *PutRetentionSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.RetentionSettings != nil { + ok := object.Key("RetentionSettings") + if err := awsRestjson1_serializeDocumentRetentionSettings(v.RetentionSettings, ok); err != nil { return err } } @@ -4407,14 +3916,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteChannelMessageInput(v *DeleteChan return nil } -type awsRestjson1_serializeOpDeleteChannelModerator struct { +type awsRestjson1_serializeOpRedactConversationMessage struct { } -func (*awsRestjson1_serializeOpDeleteChannelModerator) ID() string { +func (*awsRestjson1_serializeOpRedactConversationMessage) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteChannelModerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRedactConversationMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4426,16 +3935,16 @@ func (m *awsRestjson1_serializeOpDeleteChannelModerator) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteChannelModeratorInput) + input, ok := in.Parameters.(*RedactConversationMessageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/moderators/{ChannelModeratorArn}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/conversations/{ConversationId}/messages/{MessageId}?operation=redact") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4448,7 +3957,7 @@ func (m *awsRestjson1_serializeOpDeleteChannelModerator) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteChannelModeratorInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRedactConversationMessageInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4461,45 +3970,49 @@ func (m *awsRestjson1_serializeOpDeleteChannelModerator) HandleSerialize(ctx con span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteChannelModeratorInput(v *DeleteChannelModeratorInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRedactConversationMessageInput(v *RedactConversationMessageInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { return err } } - if v.ChannelModeratorArn == nil || len(*v.ChannelModeratorArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelModeratorArn must not be empty")} + if v.ConversationId == nil || len(*v.ConversationId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ConversationId must not be empty")} } - if v.ChannelModeratorArn != nil { - if err := encoder.SetURI("ChannelModeratorArn").String(*v.ChannelModeratorArn); err != nil { + if v.ConversationId != nil { + if err := encoder.SetURI("ConversationId").String(*v.ConversationId); err != nil { return err } } - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) + if v.MessageId == nil || len(*v.MessageId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} + } + if v.MessageId != nil { + if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpDeleteEventsConfiguration struct { +type awsRestjson1_serializeOpRedactRoomMessage struct { } -func (*awsRestjson1_serializeOpDeleteEventsConfiguration) ID() string { +func (*awsRestjson1_serializeOpRedactRoomMessage) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteEventsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRedactRoomMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4511,16 +4024,16 @@ func (m *awsRestjson1_serializeOpDeleteEventsConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteEventsConfigurationInput) + input, ok := in.Parameters.(*RedactRoomMessageInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}/events-configuration") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/messages/{MessageId}?operation=redact") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4533,7 +4046,7 @@ func (m *awsRestjson1_serializeOpDeleteEventsConfiguration) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteEventsConfigurationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRedactRoomMessageInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4546,7 +4059,7 @@ func (m *awsRestjson1_serializeOpDeleteEventsConfiguration) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteEventsConfigurationInput(v *DeleteEventsConfigurationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRedactRoomMessageInput(v *RedactRoomMessageInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -4560,11 +4073,20 @@ func awsRestjson1_serializeOpHttpBindingsDeleteEventsConfigurationInput(v *Delet } } - if v.BotId == nil || len(*v.BotId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} + if v.MessageId == nil || len(*v.MessageId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} } - if v.BotId != nil { - if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { + if v.MessageId != nil { + if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { + return err + } + } + + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} + } + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { return err } } @@ -4572,14 +4094,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteEventsConfigurationInput(v *Delet return nil } -type awsRestjson1_serializeOpDeleteMediaCapturePipeline struct { +type awsRestjson1_serializeOpRegenerateSecurityToken struct { } -func (*awsRestjson1_serializeOpDeleteMediaCapturePipeline) ID() string { +func (*awsRestjson1_serializeOpRegenerateSecurityToken) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteMediaCapturePipeline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRegenerateSecurityToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4591,16 +4113,16 @@ func (m *awsRestjson1_serializeOpDeleteMediaCapturePipeline) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteMediaCapturePipelineInput) + input, ok := in.Parameters.(*RegenerateSecurityTokenInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/media-capture-pipelines/{MediaPipelineId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}?operation=regenerate-security-token") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4613,7 +4135,7 @@ func (m *awsRestjson1_serializeOpDeleteMediaCapturePipeline) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteMediaCapturePipelineInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRegenerateSecurityTokenInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4626,16 +4148,25 @@ func (m *awsRestjson1_serializeOpDeleteMediaCapturePipeline) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteMediaCapturePipelineInput(v *DeleteMediaCapturePipelineInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRegenerateSecurityTokenInput(v *RegenerateSecurityTokenInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MediaPipelineId == nil || len(*v.MediaPipelineId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MediaPipelineId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.BotId == nil || len(*v.BotId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} } - if v.MediaPipelineId != nil { - if err := encoder.SetURI("MediaPipelineId").String(*v.MediaPipelineId); err != nil { + if v.BotId != nil { + if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { return err } } @@ -4643,14 +4174,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteMediaCapturePipelineInput(v *Dele return nil } -type awsRestjson1_serializeOpDeleteMeeting struct { +type awsRestjson1_serializeOpResetPersonalPIN struct { } -func (*awsRestjson1_serializeOpDeleteMeeting) ID() string { +func (*awsRestjson1_serializeOpResetPersonalPIN) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteMeeting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpResetPersonalPIN) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4662,16 +4193,16 @@ func (m *awsRestjson1_serializeOpDeleteMeeting) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteMeetingInput) + input, ok := in.Parameters.(*ResetPersonalPINInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}?operation=reset-personal-pin") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4684,7 +4215,7 @@ func (m *awsRestjson1_serializeOpDeleteMeeting) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteMeetingInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsResetPersonalPINInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4697,16 +4228,25 @@ func (m *awsRestjson1_serializeOpDeleteMeeting) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteMeetingInput(v *DeleteMeetingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsResetPersonalPINInput(v *ResetPersonalPINInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.UserId == nil || len(*v.UserId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} + } + if v.UserId != nil { + if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { return err } } @@ -4714,14 +4254,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteMeetingInput(v *DeleteMeetingInpu return nil } -type awsRestjson1_serializeOpDeletePhoneNumber struct { +type awsRestjson1_serializeOpRestorePhoneNumber struct { } -func (*awsRestjson1_serializeOpDeletePhoneNumber) ID() string { +func (*awsRestjson1_serializeOpRestorePhoneNumber) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeletePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRestorePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4733,16 +4273,16 @@ func (m *awsRestjson1_serializeOpDeletePhoneNumber) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeletePhoneNumberInput) + input, ok := in.Parameters.(*RestorePhoneNumberInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/phone-numbers/{PhoneNumberId}") + opPath, opQuery := httpbinding.SplitURI("/phone-numbers/{PhoneNumberId}?operation=restore") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4755,7 +4295,7 @@ func (m *awsRestjson1_serializeOpDeletePhoneNumber) HandleSerialize(ctx context. return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeletePhoneNumberInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRestorePhoneNumberInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4768,7 +4308,7 @@ func (m *awsRestjson1_serializeOpDeletePhoneNumber) HandleSerialize(ctx context. span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeletePhoneNumberInput(v *DeletePhoneNumberInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRestorePhoneNumberInput(v *RestorePhoneNumberInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -4785,14 +4325,14 @@ func awsRestjson1_serializeOpHttpBindingsDeletePhoneNumberInput(v *DeletePhoneNu return nil } -type awsRestjson1_serializeOpDeleteProxySession struct { +type awsRestjson1_serializeOpSearchAvailablePhoneNumbers struct { } -func (*awsRestjson1_serializeOpDeleteProxySession) ID() string { +func (*awsRestjson1_serializeOpSearchAvailablePhoneNumbers) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteProxySession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpSearchAvailablePhoneNumbers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4804,16 +4344,16 @@ func (m *awsRestjson1_serializeOpDeleteProxySession) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteProxySessionInput) + input, ok := in.Parameters.(*SearchAvailablePhoneNumbersInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}") + opPath, opQuery := httpbinding.SplitURI("/search?type=phone-numbers") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "GET" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4826,7 +4366,7 @@ func (m *awsRestjson1_serializeOpDeleteProxySession) HandleSerialize(ctx context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteProxySessionInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsSearchAvailablePhoneNumbersInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4839,40 +4379,54 @@ func (m *awsRestjson1_serializeOpDeleteProxySession) HandleSerialize(ctx context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteProxySessionInput(v *DeleteProxySessionInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsSearchAvailablePhoneNumbersInput(v *SearchAvailablePhoneNumbersInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ProxySessionId == nil || len(*v.ProxySessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ProxySessionId must not be empty")} + if v.AreaCode != nil { + encoder.SetQuery("area-code").String(*v.AreaCode) } - if v.ProxySessionId != nil { - if err := encoder.SetURI("ProxySessionId").String(*v.ProxySessionId); err != nil { - return err - } + + if v.City != nil { + encoder.SetQuery("city").String(*v.City) } - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} + if v.Country != nil { + encoder.SetQuery("country").String(*v.Country) } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } + + if v.MaxResults != nil { + encoder.SetQuery("max-results").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("next-token").String(*v.NextToken) + } + + if len(v.PhoneNumberType) > 0 { + encoder.SetQuery("phone-number-type").String(string(v.PhoneNumberType)) + } + + if v.State != nil { + encoder.SetQuery("state").String(*v.State) + } + + if v.TollFreePrefix != nil { + encoder.SetQuery("toll-free-prefix").String(*v.TollFreePrefix) } return nil } -type awsRestjson1_serializeOpDeleteRoom struct { +type awsRestjson1_serializeOpUpdateAccount struct { } -func (*awsRestjson1_serializeOpDeleteRoom) ID() string { +func (*awsRestjson1_serializeOpUpdateAccount) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteRoom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4884,16 +4438,16 @@ func (m *awsRestjson1_serializeOpDeleteRoom) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteRoomInput) + input, ok := in.Parameters.(*UpdateAccountInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4906,7 +4460,18 @@ func (m *awsRestjson1_serializeOpDeleteRoom) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteRoomInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateAccountInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAccountInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4919,7 +4484,7 @@ func (m *awsRestjson1_serializeOpDeleteRoom) HandleSerialize(ctx context.Context span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteRoomInput(v *DeleteRoomInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateAccountInput(v *UpdateAccountInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -4933,26 +4498,34 @@ func awsRestjson1_serializeOpHttpBindingsDeleteRoomInput(v *DeleteRoomInput, enc } } - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateAccountInput(v *UpdateAccountInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DefaultLicense) > 0 { + ok := object.Key("DefaultLicense") + ok.String(string(v.DefaultLicense)) } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { - return err - } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) } return nil } -type awsRestjson1_serializeOpDeleteRoomMembership struct { +type awsRestjson1_serializeOpUpdateAccountSettings struct { } -func (*awsRestjson1_serializeOpDeleteRoomMembership) ID() string { +func (*awsRestjson1_serializeOpUpdateAccountSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteRoomMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -4964,16 +4537,16 @@ func (m *awsRestjson1_serializeOpDeleteRoomMembership) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteRoomMembershipInput) + input, ok := in.Parameters.(*UpdateAccountSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships/{MemberId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -4986,7 +4559,18 @@ func (m *awsRestjson1_serializeOpDeleteRoomMembership) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteRoomMembershipInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateAccountSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -4999,7 +4583,7 @@ func (m *awsRestjson1_serializeOpDeleteRoomMembership) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteRoomMembershipInput(v *DeleteRoomMembershipInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -5013,20 +4597,16 @@ func awsRestjson1_serializeOpHttpBindingsDeleteRoomMembershipInput(v *DeleteRoom } } - if v.MemberId == nil || len(*v.MemberId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MemberId must not be empty")} - } - if v.MemberId != nil { - if err := encoder.SetURI("MemberId").String(*v.MemberId); err != nil { - return err - } - } + return nil +} - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} - } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { +func awsRestjson1_serializeOpDocumentUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AccountSettings != nil { + ok := object.Key("AccountSettings") + if err := awsRestjson1_serializeDocumentAccountSettings(v.AccountSettings, ok); err != nil { return err } } @@ -5034,14 +4614,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteRoomMembershipInput(v *DeleteRoom return nil } -type awsRestjson1_serializeOpDeleteSipMediaApplication struct { +type awsRestjson1_serializeOpUpdateBot struct { } -func (*awsRestjson1_serializeOpDeleteSipMediaApplication) ID() string { +func (*awsRestjson1_serializeOpUpdateBot) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteSipMediaApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5053,16 +4633,16 @@ func (m *awsRestjson1_serializeOpDeleteSipMediaApplication) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteSipMediaApplicationInput) + input, ok := in.Parameters.(*UpdateBotInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications/{SipMediaApplicationId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -5075,7 +4655,18 @@ func (m *awsRestjson1_serializeOpDeleteSipMediaApplication) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteSipMediaApplicationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateBotInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateBotInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5088,16 +4679,25 @@ func (m *awsRestjson1_serializeOpDeleteSipMediaApplication) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteSipMediaApplicationInput(v *DeleteSipMediaApplicationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateBotInput(v *UpdateBotInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.SipMediaApplicationId == nil || len(*v.SipMediaApplicationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipMediaApplicationId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.BotId == nil || len(*v.BotId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} } - if v.SipMediaApplicationId != nil { - if err := encoder.SetURI("SipMediaApplicationId").String(*v.SipMediaApplicationId); err != nil { + if v.BotId != nil { + if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { return err } } @@ -5105,14 +4705,26 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSipMediaApplicationInput(v *Delet return nil } -type awsRestjson1_serializeOpDeleteSipRule struct { +func awsRestjson1_serializeOpDocumentUpdateBotInput(v *UpdateBotInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Disabled != nil { + ok := object.Key("Disabled") + ok.Boolean(*v.Disabled) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateGlobalSettings struct { } -func (*awsRestjson1_serializeOpDeleteSipRule) ID() string { +func (*awsRestjson1_serializeOpUpdateGlobalSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteSipRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateGlobalSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5124,16 +4736,16 @@ func (m *awsRestjson1_serializeOpDeleteSipRule) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteSipRuleInput) + input, ok := in.Parameters.(*UpdateGlobalSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/sip-rules/{SipRuleId}") + opPath, opQuery := httpbinding.SplitURI("/settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -5146,7 +4758,14 @@ func (m *awsRestjson1_serializeOpDeleteSipRule) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteSipRuleInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateGlobalSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5159,16 +4778,28 @@ func (m *awsRestjson1_serializeOpDeleteSipRule) HandleSerialize(ctx context.Cont span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteSipRuleInput(v *DeleteSipRuleInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateGlobalSettingsInput(v *UpdateGlobalSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.SipRuleId == nil || len(*v.SipRuleId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipRuleId must not be empty")} + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateGlobalSettingsInput(v *UpdateGlobalSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BusinessCalling != nil { + ok := object.Key("BusinessCalling") + if err := awsRestjson1_serializeDocumentBusinessCallingSettings(v.BusinessCalling, ok); err != nil { + return err + } } - if v.SipRuleId != nil { - if err := encoder.SetURI("SipRuleId").String(*v.SipRuleId); err != nil { + + if v.VoiceConnector != nil { + ok := object.Key("VoiceConnector") + if err := awsRestjson1_serializeDocumentVoiceConnectorSettings(v.VoiceConnector, ok); err != nil { return err } } @@ -5176,14 +4807,14 @@ func awsRestjson1_serializeOpHttpBindingsDeleteSipRuleInput(v *DeleteSipRuleInpu return nil } -type awsRestjson1_serializeOpDeleteVoiceConnector struct { +type awsRestjson1_serializeOpUpdatePhoneNumber struct { } -func (*awsRestjson1_serializeOpDeleteVoiceConnector) ID() string { +func (*awsRestjson1_serializeOpUpdatePhoneNumber) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteVoiceConnector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdatePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5195,16 +4826,16 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnector) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteVoiceConnectorInput) + input, ok := in.Parameters.(*UpdatePhoneNumberInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}") + opPath, opQuery := httpbinding.SplitURI("/phone-numbers/{PhoneNumberId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -5217,11 +4848,22 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnector) HandleSerialize(ctx conte return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdatePhoneNumberInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if request.Request, err = restEncoder.Encode(request.Request); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdatePhoneNumberInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } in.Request = request @@ -5230,16 +4872,16 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnector) HandleSerialize(ctx conte span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorInput(v *DeleteVoiceConnectorInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdatePhoneNumberInput(v *UpdatePhoneNumberInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} + if v.PhoneNumberId == nil || len(*v.PhoneNumberId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member PhoneNumberId must not be empty")} } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { + if v.PhoneNumberId != nil { + if err := encoder.SetURI("PhoneNumberId").String(*v.PhoneNumberId); err != nil { return err } } @@ -5247,14 +4889,31 @@ func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorInput(v *DeleteVoic return nil } -type awsRestjson1_serializeOpDeleteVoiceConnectorEmergencyCallingConfiguration struct { +func awsRestjson1_serializeOpDocumentUpdatePhoneNumberInput(v *UpdatePhoneNumberInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CallingName != nil { + ok := object.Key("CallingName") + ok.String(*v.CallingName) + } + + if len(v.ProductType) > 0 { + ok := object.Key("ProductType") + ok.String(string(v.ProductType)) + } + + return nil +} + +type awsRestjson1_serializeOpUpdatePhoneNumberSettings struct { } -func (*awsRestjson1_serializeOpDeleteVoiceConnectorEmergencyCallingConfiguration) ID() string { +func (*awsRestjson1_serializeOpUpdatePhoneNumberSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteVoiceConnectorEmergencyCallingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdatePhoneNumberSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5266,16 +4925,16 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorEmergencyCallingConfigurati return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteVoiceConnectorEmergencyCallingConfigurationInput) + input, ok := in.Parameters.(*UpdatePhoneNumberSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration") + opPath, opQuery := httpbinding.SplitURI("/settings/phone-number") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -5288,7 +4947,14 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorEmergencyCallingConfigurati return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorEmergencyCallingConfigurationInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdatePhoneNumberSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5301,31 +4967,34 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorEmergencyCallingConfigurati span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorEmergencyCallingConfigurationInput(v *DeleteVoiceConnectorEmergencyCallingConfigurationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdatePhoneNumberSettingsInput(v *UpdatePhoneNumberSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } + return nil +} + +func awsRestjson1_serializeOpDocumentUpdatePhoneNumberSettingsInput(v *UpdatePhoneNumberSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CallingName != nil { + ok := object.Key("CallingName") + ok.String(*v.CallingName) } return nil } -type awsRestjson1_serializeOpDeleteVoiceConnectorGroup struct { +type awsRestjson1_serializeOpUpdateRoom struct { } -func (*awsRestjson1_serializeOpDeleteVoiceConnectorGroup) ID() string { +func (*awsRestjson1_serializeOpUpdateRoom) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteVoiceConnectorGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateRoom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5337,16 +5006,16 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteVoiceConnectorGroupInput) + input, ok := in.Parameters.(*UpdateRoomInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connector-groups/{VoiceConnectorGroupId}") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -5359,7 +5028,18 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorGroup) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorGroupInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateRoomInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateRoomInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5372,16 +5052,25 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorGroup) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorGroupInput(v *DeleteVoiceConnectorGroupInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateRoomInput(v *UpdateRoomInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorGroupId == nil || len(*v.VoiceConnectorGroupId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorGroupId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} } - if v.VoiceConnectorGroupId != nil { - if err := encoder.SetURI("VoiceConnectorGroupId").String(*v.VoiceConnectorGroupId); err != nil { + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { return err } } @@ -5389,14 +5078,26 @@ func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorGroupInput(v *Delet return nil } -type awsRestjson1_serializeOpDeleteVoiceConnectorOrigination struct { +func awsRestjson1_serializeOpDocumentUpdateRoomInput(v *UpdateRoomInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateRoomMembership struct { } -func (*awsRestjson1_serializeOpDeleteVoiceConnectorOrigination) ID() string { +func (*awsRestjson1_serializeOpUpdateRoomMembership) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteVoiceConnectorOrigination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateRoomMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5408,16 +5109,16 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorOrigination) HandleSerializ return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteVoiceConnectorOriginationInput) + input, ok := in.Parameters.(*UpdateRoomMembershipInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/origination") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships/{MemberId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -5430,7 +5131,18 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorOrigination) HandleSerializ return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorOriginationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateRoomMembershipInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateRoomMembershipInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5443,16 +5155,34 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorOrigination) HandleSerializ span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorOriginationInput(v *DeleteVoiceConnectorOriginationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateRoomMembershipInput(v *UpdateRoomMembershipInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.MemberId == nil || len(*v.MemberId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MemberId must not be empty")} + } + if v.MemberId != nil { + if err := encoder.SetURI("MemberId").String(*v.MemberId); err != nil { + return err + } } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { + + if v.RoomId == nil || len(*v.RoomId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} + } + if v.RoomId != nil { + if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { return err } } @@ -5460,14 +5190,26 @@ func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorOriginationInput(v return nil } -type awsRestjson1_serializeOpDeleteVoiceConnectorProxy struct { +func awsRestjson1_serializeOpDocumentUpdateRoomMembershipInput(v *UpdateRoomMembershipInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Role) > 0 { + ok := object.Key("Role") + ok.String(string(v.Role)) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateUser struct { } -func (*awsRestjson1_serializeOpDeleteVoiceConnectorProxy) ID() string { +func (*awsRestjson1_serializeOpUpdateUser) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteVoiceConnectorProxy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5479,16 +5221,16 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorProxy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteVoiceConnectorProxyInput) + input, ok := in.Parameters.(*UpdateUserInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -5501,7 +5243,18 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorProxy) HandleSerialize(ctx return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorProxyInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateUserInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateUserInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5514,31 +5267,64 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorProxy) HandleSerialize(ctx span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorProxyInput(v *DeleteVoiceConnectorProxyInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateUserInput(v *UpdateUserInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.UserId == nil || len(*v.UserId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} + } + if v.UserId != nil { + if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { + return err + } } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AlexaForBusinessMetadata != nil { + ok := object.Key("AlexaForBusinessMetadata") + if err := awsRestjson1_serializeDocumentAlexaForBusinessMetadata(v.AlexaForBusinessMetadata, ok); err != nil { return err } } + if len(v.LicenseType) > 0 { + ok := object.Key("LicenseType") + ok.String(string(v.LicenseType)) + } + + if len(v.UserType) > 0 { + ok := object.Key("UserType") + ok.String(string(v.UserType)) + } + return nil } -type awsRestjson1_serializeOpDeleteVoiceConnectorStreamingConfiguration struct { +type awsRestjson1_serializeOpUpdateUserSettings struct { } -func (*awsRestjson1_serializeOpDeleteVoiceConnectorStreamingConfiguration) ID() string { +func (*awsRestjson1_serializeOpUpdateUserSettings) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteVoiceConnectorStreamingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateUserSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { _, span := tracing.StartSpan(ctx, "OperationSerializer") @@ -5550,16 +5336,16 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorStreamingConfiguration) Han return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteVoiceConnectorStreamingConfigurationInput) + input, ok := in.Parameters.(*UpdateUserSettingsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/streaming-configuration") + opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}/settings") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" var restEncoder *httpbinding.Encoder if request.URL.RawPath == "" { restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) @@ -5572,7 +5358,18 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorStreamingConfiguration) Han return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorStreamingConfigurationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateUserSettingsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateUserSettingsInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -5585,16 +5382,25 @@ func (m *awsRestjson1_serializeOpDeleteVoiceConnectorStreamingConfiguration) Han span.End() return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorStreamingConfigurationInput(v *DeleteVoiceConnectorStreamingConfigurationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateUserSettingsInput(v *UpdateUserSettingsInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} + if v.AccountId == nil || len(*v.AccountId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} + } + if v.AccountId != nil { + if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { + return err + } + } + + if v.UserId == nil || len(*v.UserId) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { + if v.UserId != nil { + if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { return err } } @@ -5602,11882 +5408,144 @@ func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorStreamingConfigurat return nil } -type awsRestjson1_serializeOpDeleteVoiceConnectorTermination struct { -} +func awsRestjson1_serializeOpDocumentUpdateUserSettingsInput(v *UpdateUserSettingsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() -func (*awsRestjson1_serializeOpDeleteVoiceConnectorTermination) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteVoiceConnectorTermination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVoiceConnectorTerminationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/termination") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorTerminationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorTerminationInput(v *DeleteVoiceConnectorTerminationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDeleteVoiceConnectorTerminationCredentials struct { -} - -func (*awsRestjson1_serializeOpDeleteVoiceConnectorTerminationCredentials) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDeleteVoiceConnectorTerminationCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DeleteVoiceConnectorTerminationCredentialsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/termination/credentials?operation=delete") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorTerminationCredentialsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentDeleteVoiceConnectorTerminationCredentialsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDeleteVoiceConnectorTerminationCredentialsInput(v *DeleteVoiceConnectorTerminationCredentialsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentDeleteVoiceConnectorTerminationCredentialsInput(v *DeleteVoiceConnectorTerminationCredentialsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Usernames != nil { - ok := object.Key("Usernames") - if err := awsRestjson1_serializeDocumentSensitiveStringList(v.Usernames, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDescribeAppInstance struct { -} - -func (*awsRestjson1_serializeOpDescribeAppInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeAppInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAppInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceInput(v *DescribeAppInstanceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} - } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDescribeAppInstanceAdmin struct { -} - -func (*awsRestjson1_serializeOpDescribeAppInstanceAdmin) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeAppInstanceAdmin) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAppInstanceAdminInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/admins/{AppInstanceAdminArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceAdminInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceAdminInput(v *DescribeAppInstanceAdminInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceAdminArn == nil || len(*v.AppInstanceAdminArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceAdminArn must not be empty")} - } - if v.AppInstanceAdminArn != nil { - if err := encoder.SetURI("AppInstanceAdminArn").String(*v.AppInstanceAdminArn); err != nil { - return err - } - } - - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} - } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDescribeAppInstanceUser struct { -} - -func (*awsRestjson1_serializeOpDescribeAppInstanceUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeAppInstanceUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeAppInstanceUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instance-users/{AppInstanceUserArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeAppInstanceUserInput(v *DescribeAppInstanceUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceUserArn == nil || len(*v.AppInstanceUserArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceUserArn must not be empty")} - } - if v.AppInstanceUserArn != nil { - if err := encoder.SetURI("AppInstanceUserArn").String(*v.AppInstanceUserArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDescribeChannel struct { -} - -func (*awsRestjson1_serializeOpDescribeChannel) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeChannelInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeChannelInput(v *DescribeChannelInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -type awsRestjson1_serializeOpDescribeChannelBan struct { -} - -func (*awsRestjson1_serializeOpDescribeChannelBan) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeChannelBan) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeChannelBanInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/bans/{MemberArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelBanInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeChannelBanInput(v *DescribeChannelBanInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MemberArn == nil || len(*v.MemberArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MemberArn must not be empty")} - } - if v.MemberArn != nil { - if err := encoder.SetURI("MemberArn").String(*v.MemberArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDescribeChannelMembership struct { -} - -func (*awsRestjson1_serializeOpDescribeChannelMembership) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeChannelMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeChannelMembershipInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships/{MemberArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelMembershipInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeChannelMembershipInput(v *DescribeChannelMembershipInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MemberArn == nil || len(*v.MemberArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MemberArn must not be empty")} - } - if v.MemberArn != nil { - if err := encoder.SetURI("MemberArn").String(*v.MemberArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDescribeChannelMembershipForAppInstanceUser struct { -} - -func (*awsRestjson1_serializeOpDescribeChannelMembershipForAppInstanceUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeChannelMembershipForAppInstanceUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeChannelMembershipForAppInstanceUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}?scope=app-instance-user-membership") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelMembershipForAppInstanceUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeChannelMembershipForAppInstanceUserInput(v *DescribeChannelMembershipForAppInstanceUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceUserArn != nil { - encoder.SetQuery("app-instance-user-arn").String(*v.AppInstanceUserArn) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -type awsRestjson1_serializeOpDescribeChannelModeratedByAppInstanceUser struct { -} - -func (*awsRestjson1_serializeOpDescribeChannelModeratedByAppInstanceUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeChannelModeratedByAppInstanceUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeChannelModeratedByAppInstanceUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}?scope=app-instance-user-moderated-channel") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelModeratedByAppInstanceUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeChannelModeratedByAppInstanceUserInput(v *DescribeChannelModeratedByAppInstanceUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceUserArn != nil { - encoder.SetQuery("app-instance-user-arn").String(*v.AppInstanceUserArn) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -type awsRestjson1_serializeOpDescribeChannelModerator struct { -} - -func (*awsRestjson1_serializeOpDescribeChannelModerator) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDescribeChannelModerator) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DescribeChannelModeratorInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/moderators/{ChannelModeratorArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDescribeChannelModeratorInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDescribeChannelModeratorInput(v *DescribeChannelModeratorInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChannelModeratorArn == nil || len(*v.ChannelModeratorArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelModeratorArn must not be empty")} - } - if v.ChannelModeratorArn != nil { - if err := encoder.SetURI("ChannelModeratorArn").String(*v.ChannelModeratorArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -type awsRestjson1_serializeOpDisassociatePhoneNumberFromUser struct { -} - -func (*awsRestjson1_serializeOpDisassociatePhoneNumberFromUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDisassociatePhoneNumberFromUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociatePhoneNumberFromUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}?operation=disassociate-phone-number") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDisassociatePhoneNumberFromUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDisassociatePhoneNumberFromUserInput(v *DisassociatePhoneNumberFromUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.UserId == nil || len(*v.UserId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} - } - if v.UserId != nil { - if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDisassociatePhoneNumbersFromVoiceConnector struct { -} - -func (*awsRestjson1_serializeOpDisassociatePhoneNumbersFromVoiceConnector) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDisassociatePhoneNumbersFromVoiceConnector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociatePhoneNumbersFromVoiceConnectorInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}?operation=disassociate-phone-numbers") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDisassociatePhoneNumbersFromVoiceConnectorInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentDisassociatePhoneNumbersFromVoiceConnectorInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDisassociatePhoneNumbersFromVoiceConnectorInput(v *DisassociatePhoneNumbersFromVoiceConnectorInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentDisassociatePhoneNumbersFromVoiceConnectorInput(v *DisassociatePhoneNumbersFromVoiceConnectorInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.E164PhoneNumbers != nil { - ok := object.Key("E164PhoneNumbers") - if err := awsRestjson1_serializeDocumentE164PhoneNumberList(v.E164PhoneNumbers, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDisassociatePhoneNumbersFromVoiceConnectorGroup struct { -} - -func (*awsRestjson1_serializeOpDisassociatePhoneNumbersFromVoiceConnectorGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDisassociatePhoneNumbersFromVoiceConnectorGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociatePhoneNumbersFromVoiceConnectorGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connector-groups/{VoiceConnectorGroupId}?operation=disassociate-phone-numbers") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDisassociatePhoneNumbersFromVoiceConnectorGroupInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentDisassociatePhoneNumbersFromVoiceConnectorGroupInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDisassociatePhoneNumbersFromVoiceConnectorGroupInput(v *DisassociatePhoneNumbersFromVoiceConnectorGroupInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorGroupId == nil || len(*v.VoiceConnectorGroupId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorGroupId must not be empty")} - } - if v.VoiceConnectorGroupId != nil { - if err := encoder.SetURI("VoiceConnectorGroupId").String(*v.VoiceConnectorGroupId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentDisassociatePhoneNumbersFromVoiceConnectorGroupInput(v *DisassociatePhoneNumbersFromVoiceConnectorGroupInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.E164PhoneNumbers != nil { - ok := object.Key("E164PhoneNumbers") - if err := awsRestjson1_serializeDocumentE164PhoneNumberList(v.E164PhoneNumbers, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpDisassociateSigninDelegateGroupsFromAccount struct { -} - -func (*awsRestjson1_serializeOpDisassociateSigninDelegateGroupsFromAccount) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpDisassociateSigninDelegateGroupsFromAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*DisassociateSigninDelegateGroupsFromAccountInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}?operation=disassociate-signin-delegate-groups") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsDisassociateSigninDelegateGroupsFromAccountInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentDisassociateSigninDelegateGroupsFromAccountInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsDisassociateSigninDelegateGroupsFromAccountInput(v *DisassociateSigninDelegateGroupsFromAccountInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentDisassociateSigninDelegateGroupsFromAccountInput(v *DisassociateSigninDelegateGroupsFromAccountInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.GroupNames != nil { - ok := object.Key("GroupNames") - if err := awsRestjson1_serializeDocumentNonEmptyStringList(v.GroupNames, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetAccount struct { -} - -func (*awsRestjson1_serializeOpGetAccount) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAccountInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetAccountInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetAccountInput(v *GetAccountInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetAccountSettings struct { -} - -func (*awsRestjson1_serializeOpGetAccountSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAccountSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetAccountSettingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetAccountSettingsInput(v *GetAccountSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetAppInstanceRetentionSettings struct { -} - -func (*awsRestjson1_serializeOpGetAppInstanceRetentionSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetAppInstanceRetentionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAppInstanceRetentionSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/retention-settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetAppInstanceRetentionSettingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetAppInstanceRetentionSettingsInput(v *GetAppInstanceRetentionSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} - } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetAppInstanceStreamingConfigurations struct { -} - -func (*awsRestjson1_serializeOpGetAppInstanceStreamingConfigurations) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetAppInstanceStreamingConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAppInstanceStreamingConfigurationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/streaming-configurations") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetAppInstanceStreamingConfigurationsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetAppInstanceStreamingConfigurationsInput(v *GetAppInstanceStreamingConfigurationsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} - } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetAttendee struct { -} - -func (*awsRestjson1_serializeOpGetAttendee) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetAttendee) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetAttendeeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/attendees/{AttendeeId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetAttendeeInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetAttendeeInput(v *GetAttendeeInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AttendeeId == nil || len(*v.AttendeeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AttendeeId must not be empty")} - } - if v.AttendeeId != nil { - if err := encoder.SetURI("AttendeeId").String(*v.AttendeeId); err != nil { - return err - } - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetBot struct { -} - -func (*awsRestjson1_serializeOpGetBot) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetBotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetBotInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetBotInput(v *GetBotInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.BotId == nil || len(*v.BotId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} - } - if v.BotId != nil { - if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetChannelMessage struct { -} - -func (*awsRestjson1_serializeOpGetChannelMessage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetChannelMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetChannelMessageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages/{MessageId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetChannelMessageInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetChannelMessageInput(v *GetChannelMessageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MessageId == nil || len(*v.MessageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} - } - if v.MessageId != nil { - if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetEventsConfiguration struct { -} - -func (*awsRestjson1_serializeOpGetEventsConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetEventsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetEventsConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}/events-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetEventsConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetEventsConfigurationInput(v *GetEventsConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.BotId == nil || len(*v.BotId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} - } - if v.BotId != nil { - if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetGlobalSettings struct { -} - -func (*awsRestjson1_serializeOpGetGlobalSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetGlobalSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetGlobalSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetGlobalSettingsInput(v *GetGlobalSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -type awsRestjson1_serializeOpGetMediaCapturePipeline struct { -} - -func (*awsRestjson1_serializeOpGetMediaCapturePipeline) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetMediaCapturePipeline) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetMediaCapturePipelineInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/media-capture-pipelines/{MediaPipelineId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetMediaCapturePipelineInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetMediaCapturePipelineInput(v *GetMediaCapturePipelineInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MediaPipelineId == nil || len(*v.MediaPipelineId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MediaPipelineId must not be empty")} - } - if v.MediaPipelineId != nil { - if err := encoder.SetURI("MediaPipelineId").String(*v.MediaPipelineId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetMeeting struct { -} - -func (*awsRestjson1_serializeOpGetMeeting) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetMeeting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetMeetingInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetMeetingInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetMeetingInput(v *GetMeetingInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetMessagingSessionEndpoint struct { -} - -func (*awsRestjson1_serializeOpGetMessagingSessionEndpoint) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetMessagingSessionEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetMessagingSessionEndpointInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/endpoints/messaging-session") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetMessagingSessionEndpointInput(v *GetMessagingSessionEndpointInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -type awsRestjson1_serializeOpGetPhoneNumber struct { -} - -func (*awsRestjson1_serializeOpGetPhoneNumber) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetPhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetPhoneNumberInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/phone-numbers/{PhoneNumberId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetPhoneNumberInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetPhoneNumberInput(v *GetPhoneNumberInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.PhoneNumberId == nil || len(*v.PhoneNumberId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member PhoneNumberId must not be empty")} - } - if v.PhoneNumberId != nil { - if err := encoder.SetURI("PhoneNumberId").String(*v.PhoneNumberId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetPhoneNumberOrder struct { -} - -func (*awsRestjson1_serializeOpGetPhoneNumberOrder) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetPhoneNumberOrder) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetPhoneNumberOrderInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/phone-number-orders/{PhoneNumberOrderId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetPhoneNumberOrderInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetPhoneNumberOrderInput(v *GetPhoneNumberOrderInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.PhoneNumberOrderId == nil || len(*v.PhoneNumberOrderId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member PhoneNumberOrderId must not be empty")} - } - if v.PhoneNumberOrderId != nil { - if err := encoder.SetURI("PhoneNumberOrderId").String(*v.PhoneNumberOrderId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetPhoneNumberSettings struct { -} - -func (*awsRestjson1_serializeOpGetPhoneNumberSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetPhoneNumberSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetPhoneNumberSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/settings/phone-number") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetPhoneNumberSettingsInput(v *GetPhoneNumberSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -type awsRestjson1_serializeOpGetProxySession struct { -} - -func (*awsRestjson1_serializeOpGetProxySession) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetProxySession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetProxySessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetProxySessionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetProxySessionInput(v *GetProxySessionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ProxySessionId == nil || len(*v.ProxySessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ProxySessionId must not be empty")} - } - if v.ProxySessionId != nil { - if err := encoder.SetURI("ProxySessionId").String(*v.ProxySessionId); err != nil { - return err - } - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetRetentionSettings struct { -} - -func (*awsRestjson1_serializeOpGetRetentionSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetRetentionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetRetentionSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/retention-settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetRetentionSettingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetRetentionSettingsInput(v *GetRetentionSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetRoom struct { -} - -func (*awsRestjson1_serializeOpGetRoom) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetRoom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetRoomInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetRoomInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetRoomInput(v *GetRoomInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} - } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetSipMediaApplication struct { -} - -func (*awsRestjson1_serializeOpGetSipMediaApplication) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetSipMediaApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSipMediaApplicationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications/{SipMediaApplicationId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetSipMediaApplicationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetSipMediaApplicationInput(v *GetSipMediaApplicationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SipMediaApplicationId == nil || len(*v.SipMediaApplicationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipMediaApplicationId must not be empty")} - } - if v.SipMediaApplicationId != nil { - if err := encoder.SetURI("SipMediaApplicationId").String(*v.SipMediaApplicationId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetSipMediaApplicationLoggingConfiguration struct { -} - -func (*awsRestjson1_serializeOpGetSipMediaApplicationLoggingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetSipMediaApplicationLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSipMediaApplicationLoggingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications/{SipMediaApplicationId}/logging-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetSipMediaApplicationLoggingConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetSipMediaApplicationLoggingConfigurationInput(v *GetSipMediaApplicationLoggingConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SipMediaApplicationId == nil || len(*v.SipMediaApplicationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipMediaApplicationId must not be empty")} - } - if v.SipMediaApplicationId != nil { - if err := encoder.SetURI("SipMediaApplicationId").String(*v.SipMediaApplicationId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetSipRule struct { -} - -func (*awsRestjson1_serializeOpGetSipRule) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetSipRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetSipRuleInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-rules/{SipRuleId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetSipRuleInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetSipRuleInput(v *GetSipRuleInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SipRuleId == nil || len(*v.SipRuleId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipRuleId must not be empty")} - } - if v.SipRuleId != nil { - if err := encoder.SetURI("SipRuleId").String(*v.SipRuleId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetUser struct { -} - -func (*awsRestjson1_serializeOpGetUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetUserInput(v *GetUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.UserId == nil || len(*v.UserId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} - } - if v.UserId != nil { - if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetUserSettings struct { -} - -func (*awsRestjson1_serializeOpGetUserSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetUserSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetUserSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}/settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetUserSettingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetUserSettingsInput(v *GetUserSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.UserId == nil || len(*v.UserId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} - } - if v.UserId != nil { - if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnector struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnector) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorInput(v *GetVoiceConnectorInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnectorEmergencyCallingConfiguration struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnectorEmergencyCallingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnectorEmergencyCallingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorEmergencyCallingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorEmergencyCallingConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorEmergencyCallingConfigurationInput(v *GetVoiceConnectorEmergencyCallingConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnectorGroup struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnectorGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnectorGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connector-groups/{VoiceConnectorGroupId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorGroupInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorGroupInput(v *GetVoiceConnectorGroupInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorGroupId == nil || len(*v.VoiceConnectorGroupId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorGroupId must not be empty")} - } - if v.VoiceConnectorGroupId != nil { - if err := encoder.SetURI("VoiceConnectorGroupId").String(*v.VoiceConnectorGroupId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnectorLoggingConfiguration struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnectorLoggingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnectorLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorLoggingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/logging-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorLoggingConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorLoggingConfigurationInput(v *GetVoiceConnectorLoggingConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnectorOrigination struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnectorOrigination) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnectorOrigination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorOriginationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/origination") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorOriginationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorOriginationInput(v *GetVoiceConnectorOriginationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnectorProxy struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnectorProxy) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnectorProxy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorProxyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorProxyInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorProxyInput(v *GetVoiceConnectorProxyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnectorStreamingConfiguration struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnectorStreamingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnectorStreamingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorStreamingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/streaming-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorStreamingConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorStreamingConfigurationInput(v *GetVoiceConnectorStreamingConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnectorTermination struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnectorTermination) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnectorTermination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorTerminationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/termination") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorTerminationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorTerminationInput(v *GetVoiceConnectorTerminationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpGetVoiceConnectorTerminationHealth struct { -} - -func (*awsRestjson1_serializeOpGetVoiceConnectorTerminationHealth) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpGetVoiceConnectorTerminationHealth) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*GetVoiceConnectorTerminationHealthInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/termination/health") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorTerminationHealthInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsGetVoiceConnectorTerminationHealthInput(v *GetVoiceConnectorTerminationHealthInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpInviteUsers struct { -} - -func (*awsRestjson1_serializeOpInviteUsers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpInviteUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*InviteUsersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users?operation=add") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsInviteUsersInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentInviteUsersInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsInviteUsersInput(v *InviteUsersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentInviteUsersInput(v *InviteUsersInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.UserEmailList != nil { - ok := object.Key("UserEmailList") - if err := awsRestjson1_serializeDocumentUserEmailList(v.UserEmailList, ok); err != nil { - return err - } - } - - if len(v.UserType) > 0 { - ok := object.Key("UserType") - ok.String(string(v.UserType)) - } - - return nil -} - -type awsRestjson1_serializeOpListAccounts struct { -} - -func (*awsRestjson1_serializeOpListAccounts) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListAccounts) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListAccountsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListAccountsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListAccountsInput(v *ListAccountsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.Name != nil { - encoder.SetQuery("name").String(*v.Name) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if v.UserEmail != nil { - encoder.SetQuery("user-email").String(*v.UserEmail) - } - - return nil -} - -type awsRestjson1_serializeOpListAppInstanceAdmins struct { -} - -func (*awsRestjson1_serializeOpListAppInstanceAdmins) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListAppInstanceAdmins) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListAppInstanceAdminsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/admins") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListAppInstanceAdminsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListAppInstanceAdminsInput(v *ListAppInstanceAdminsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} - } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListAppInstances struct { -} - -func (*awsRestjson1_serializeOpListAppInstances) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListAppInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListAppInstancesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListAppInstancesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListAppInstancesInput(v *ListAppInstancesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListAppInstanceUsers struct { -} - -func (*awsRestjson1_serializeOpListAppInstanceUsers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListAppInstanceUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListAppInstanceUsersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instance-users") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListAppInstanceUsersInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListAppInstanceUsersInput(v *ListAppInstanceUsersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn != nil { - encoder.SetQuery("app-instance-arn").String(*v.AppInstanceArn) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListAttendees struct { -} - -func (*awsRestjson1_serializeOpListAttendees) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListAttendees) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListAttendeesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/attendees") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListAttendeesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListAttendeesInput(v *ListAttendeesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListAttendeeTags struct { -} - -func (*awsRestjson1_serializeOpListAttendeeTags) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListAttendeeTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListAttendeeTagsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/attendees/{AttendeeId}/tags") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListAttendeeTagsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListAttendeeTagsInput(v *ListAttendeeTagsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AttendeeId == nil || len(*v.AttendeeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AttendeeId must not be empty")} - } - if v.AttendeeId != nil { - if err := encoder.SetURI("AttendeeId").String(*v.AttendeeId); err != nil { - return err - } - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListBots struct { -} - -func (*awsRestjson1_serializeOpListBots) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListBots) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListBotsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListBotsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListBotsInput(v *ListBotsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListChannelBans struct { -} - -func (*awsRestjson1_serializeOpListChannelBans) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListChannelBans) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListChannelBansInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/bans") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListChannelBansInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListChannelBansInput(v *ListChannelBansInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListChannelMemberships struct { -} - -func (*awsRestjson1_serializeOpListChannelMemberships) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListChannelMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListChannelMembershipsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/memberships") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListChannelMembershipsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListChannelMembershipsInput(v *ListChannelMembershipsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if len(v.Type) > 0 { - encoder.SetQuery("type").String(string(v.Type)) - } - - return nil -} - -type awsRestjson1_serializeOpListChannelMembershipsForAppInstanceUser struct { -} - -func (*awsRestjson1_serializeOpListChannelMembershipsForAppInstanceUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListChannelMembershipsForAppInstanceUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListChannelMembershipsForAppInstanceUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels?scope=app-instance-user-memberships") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListChannelMembershipsForAppInstanceUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListChannelMembershipsForAppInstanceUserInput(v *ListChannelMembershipsForAppInstanceUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceUserArn != nil { - encoder.SetQuery("app-instance-user-arn").String(*v.AppInstanceUserArn) - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListChannelMessages struct { -} - -func (*awsRestjson1_serializeOpListChannelMessages) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListChannelMessages) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListChannelMessagesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListChannelMessagesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListChannelMessagesInput(v *ListChannelMessagesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if v.NotAfter != nil { - encoder.SetQuery("not-after").String(smithytime.FormatDateTime(*v.NotAfter)) - } - - if v.NotBefore != nil { - encoder.SetQuery("not-before").String(smithytime.FormatDateTime(*v.NotBefore)) - } - - if len(v.SortOrder) > 0 { - encoder.SetQuery("sort-order").String(string(v.SortOrder)) - } - - return nil -} - -type awsRestjson1_serializeOpListChannelModerators struct { -} - -func (*awsRestjson1_serializeOpListChannelModerators) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListChannelModerators) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListChannelModeratorsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/moderators") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListChannelModeratorsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListChannelModeratorsInput(v *ListChannelModeratorsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListChannels struct { -} - -func (*awsRestjson1_serializeOpListChannels) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListChannels) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListChannelsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListChannelsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListChannelsInput(v *ListChannelsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn != nil { - encoder.SetQuery("app-instance-arn").String(*v.AppInstanceArn) - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if len(v.Privacy) > 0 { - encoder.SetQuery("privacy").String(string(v.Privacy)) - } - - return nil -} - -type awsRestjson1_serializeOpListChannelsModeratedByAppInstanceUser struct { -} - -func (*awsRestjson1_serializeOpListChannelsModeratedByAppInstanceUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListChannelsModeratedByAppInstanceUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListChannelsModeratedByAppInstanceUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels?scope=app-instance-user-moderated-channels") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListChannelsModeratedByAppInstanceUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListChannelsModeratedByAppInstanceUserInput(v *ListChannelsModeratedByAppInstanceUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceUserArn != nil { - encoder.SetQuery("app-instance-user-arn").String(*v.AppInstanceUserArn) - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListMediaCapturePipelines struct { -} - -func (*awsRestjson1_serializeOpListMediaCapturePipelines) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListMediaCapturePipelines) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListMediaCapturePipelinesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/media-capture-pipelines") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListMediaCapturePipelinesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListMediaCapturePipelinesInput(v *ListMediaCapturePipelinesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListMeetings struct { -} - -func (*awsRestjson1_serializeOpListMeetings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListMeetings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListMeetingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListMeetingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListMeetingsInput(v *ListMeetingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListMeetingTags struct { -} - -func (*awsRestjson1_serializeOpListMeetingTags) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListMeetingTags) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListMeetingTagsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/tags") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListMeetingTagsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListMeetingTagsInput(v *ListMeetingTagsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListPhoneNumberOrders struct { -} - -func (*awsRestjson1_serializeOpListPhoneNumberOrders) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListPhoneNumberOrders) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListPhoneNumberOrdersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/phone-number-orders") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListPhoneNumberOrdersInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListPhoneNumberOrdersInput(v *ListPhoneNumberOrdersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListPhoneNumbers struct { -} - -func (*awsRestjson1_serializeOpListPhoneNumbers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListPhoneNumbers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListPhoneNumbersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/phone-numbers") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListPhoneNumbersInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListPhoneNumbersInput(v *ListPhoneNumbersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if len(v.FilterName) > 0 { - encoder.SetQuery("filter-name").String(string(v.FilterName)) - } - - if v.FilterValue != nil { - encoder.SetQuery("filter-value").String(*v.FilterValue) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if len(v.ProductType) > 0 { - encoder.SetQuery("product-type").String(string(v.ProductType)) - } - - if len(v.Status) > 0 { - encoder.SetQuery("status").String(string(v.Status)) - } - - return nil -} - -type awsRestjson1_serializeOpListProxySessions struct { -} - -func (*awsRestjson1_serializeOpListProxySessions) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListProxySessions) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListProxySessionsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/proxy-sessions") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListProxySessionsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListProxySessionsInput(v *ListProxySessionsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if len(v.Status) > 0 { - encoder.SetQuery("status").String(string(v.Status)) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListRoomMemberships struct { -} - -func (*awsRestjson1_serializeOpListRoomMemberships) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListRoomMemberships) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListRoomMembershipsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListRoomMembershipsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListRoomMembershipsInput(v *ListRoomMembershipsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} - } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpListRooms struct { -} - -func (*awsRestjson1_serializeOpListRooms) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListRooms) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListRoomsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListRoomsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListRoomsInput(v *ListRoomsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.MemberId != nil { - encoder.SetQuery("member-id").String(*v.MemberId) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListSipMediaApplications struct { -} - -func (*awsRestjson1_serializeOpListSipMediaApplications) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListSipMediaApplications) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListSipMediaApplicationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListSipMediaApplicationsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListSipMediaApplicationsInput(v *ListSipMediaApplicationsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListSipRules struct { -} - -func (*awsRestjson1_serializeOpListSipRules) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListSipRules) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListSipRulesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-rules") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListSipRulesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListSipRulesInput(v *ListSipRulesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if v.SipMediaApplicationId != nil { - encoder.SetQuery("sip-media-application").String(*v.SipMediaApplicationId) - } - - return nil -} - -type awsRestjson1_serializeOpListSupportedPhoneNumberCountries struct { -} - -func (*awsRestjson1_serializeOpListSupportedPhoneNumberCountries) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListSupportedPhoneNumberCountries) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListSupportedPhoneNumberCountriesInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/phone-number-countries") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListSupportedPhoneNumberCountriesInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListSupportedPhoneNumberCountriesInput(v *ListSupportedPhoneNumberCountriesInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if len(v.ProductType) > 0 { - encoder.SetQuery("product-type").String(string(v.ProductType)) - } - - return nil -} - -type awsRestjson1_serializeOpListTagsForResource struct { -} - -func (*awsRestjson1_serializeOpListTagsForResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListTagsForResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/tags") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ResourceARN != nil { - encoder.SetQuery("arn").String(*v.ResourceARN) - } - - return nil -} - -type awsRestjson1_serializeOpListUsers struct { -} - -func (*awsRestjson1_serializeOpListUsers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListUsers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListUsersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListUsersInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListUsersInput(v *ListUsersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if v.UserEmail != nil { - encoder.SetQuery("user-email").String(*v.UserEmail) - } - - if len(v.UserType) > 0 { - encoder.SetQuery("user-type").String(string(v.UserType)) - } - - return nil -} - -type awsRestjson1_serializeOpListVoiceConnectorGroups struct { -} - -func (*awsRestjson1_serializeOpListVoiceConnectorGroups) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListVoiceConnectorGroups) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListVoiceConnectorGroupsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connector-groups") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListVoiceConnectorGroupsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListVoiceConnectorGroupsInput(v *ListVoiceConnectorGroupsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListVoiceConnectors struct { -} - -func (*awsRestjson1_serializeOpListVoiceConnectors) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListVoiceConnectors) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListVoiceConnectorsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListVoiceConnectorsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListVoiceConnectorsInput(v *ListVoiceConnectorsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - return nil -} - -type awsRestjson1_serializeOpListVoiceConnectorTerminationCredentials struct { -} - -func (*awsRestjson1_serializeOpListVoiceConnectorTerminationCredentials) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpListVoiceConnectorTerminationCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ListVoiceConnectorTerminationCredentialsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/termination/credentials") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsListVoiceConnectorTerminationCredentialsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsListVoiceConnectorTerminationCredentialsInput(v *ListVoiceConnectorTerminationCredentialsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpLogoutUser struct { -} - -func (*awsRestjson1_serializeOpLogoutUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpLogoutUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*LogoutUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}?operation=logout") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsLogoutUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsLogoutUserInput(v *LogoutUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.UserId == nil || len(*v.UserId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} - } - if v.UserId != nil { - if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutAppInstanceRetentionSettings struct { -} - -func (*awsRestjson1_serializeOpPutAppInstanceRetentionSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutAppInstanceRetentionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutAppInstanceRetentionSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/retention-settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutAppInstanceRetentionSettingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutAppInstanceRetentionSettingsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutAppInstanceRetentionSettingsInput(v *PutAppInstanceRetentionSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} - } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutAppInstanceRetentionSettingsInput(v *PutAppInstanceRetentionSettingsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AppInstanceRetentionSettings != nil { - ok := object.Key("AppInstanceRetentionSettings") - if err := awsRestjson1_serializeDocumentAppInstanceRetentionSettings(v.AppInstanceRetentionSettings, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutAppInstanceStreamingConfigurations struct { -} - -func (*awsRestjson1_serializeOpPutAppInstanceStreamingConfigurations) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutAppInstanceStreamingConfigurations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutAppInstanceStreamingConfigurationsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/streaming-configurations") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutAppInstanceStreamingConfigurationsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutAppInstanceStreamingConfigurationsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutAppInstanceStreamingConfigurationsInput(v *PutAppInstanceStreamingConfigurationsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} - } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutAppInstanceStreamingConfigurationsInput(v *PutAppInstanceStreamingConfigurationsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AppInstanceStreamingConfigurations != nil { - ok := object.Key("AppInstanceStreamingConfigurations") - if err := awsRestjson1_serializeDocumentAppInstanceStreamingConfigurationList(v.AppInstanceStreamingConfigurations, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutEventsConfiguration struct { -} - -func (*awsRestjson1_serializeOpPutEventsConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutEventsConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutEventsConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}/events-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutEventsConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutEventsConfigurationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutEventsConfigurationInput(v *PutEventsConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.BotId == nil || len(*v.BotId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} - } - if v.BotId != nil { - if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutEventsConfigurationInput(v *PutEventsConfigurationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.LambdaFunctionArn != nil { - ok := object.Key("LambdaFunctionArn") - ok.String(*v.LambdaFunctionArn) - } - - if v.OutboundEventsHTTPSEndpoint != nil { - ok := object.Key("OutboundEventsHTTPSEndpoint") - ok.String(*v.OutboundEventsHTTPSEndpoint) - } - - return nil -} - -type awsRestjson1_serializeOpPutRetentionSettings struct { -} - -func (*awsRestjson1_serializeOpPutRetentionSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutRetentionSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutRetentionSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/retention-settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutRetentionSettingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutRetentionSettingsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutRetentionSettingsInput(v *PutRetentionSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutRetentionSettingsInput(v *PutRetentionSettingsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.RetentionSettings != nil { - ok := object.Key("RetentionSettings") - if err := awsRestjson1_serializeDocumentRetentionSettings(v.RetentionSettings, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutSipMediaApplicationLoggingConfiguration struct { -} - -func (*awsRestjson1_serializeOpPutSipMediaApplicationLoggingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutSipMediaApplicationLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutSipMediaApplicationLoggingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications/{SipMediaApplicationId}/logging-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutSipMediaApplicationLoggingConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutSipMediaApplicationLoggingConfigurationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutSipMediaApplicationLoggingConfigurationInput(v *PutSipMediaApplicationLoggingConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SipMediaApplicationId == nil || len(*v.SipMediaApplicationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipMediaApplicationId must not be empty")} - } - if v.SipMediaApplicationId != nil { - if err := encoder.SetURI("SipMediaApplicationId").String(*v.SipMediaApplicationId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutSipMediaApplicationLoggingConfigurationInput(v *PutSipMediaApplicationLoggingConfigurationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SipMediaApplicationLoggingConfiguration != nil { - ok := object.Key("SipMediaApplicationLoggingConfiguration") - if err := awsRestjson1_serializeDocumentSipMediaApplicationLoggingConfiguration(v.SipMediaApplicationLoggingConfiguration, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutVoiceConnectorEmergencyCallingConfiguration struct { -} - -func (*awsRestjson1_serializeOpPutVoiceConnectorEmergencyCallingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutVoiceConnectorEmergencyCallingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutVoiceConnectorEmergencyCallingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/emergency-calling-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorEmergencyCallingConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutVoiceConnectorEmergencyCallingConfigurationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorEmergencyCallingConfigurationInput(v *PutVoiceConnectorEmergencyCallingConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutVoiceConnectorEmergencyCallingConfigurationInput(v *PutVoiceConnectorEmergencyCallingConfigurationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.EmergencyCallingConfiguration != nil { - ok := object.Key("EmergencyCallingConfiguration") - if err := awsRestjson1_serializeDocumentEmergencyCallingConfiguration(v.EmergencyCallingConfiguration, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutVoiceConnectorLoggingConfiguration struct { -} - -func (*awsRestjson1_serializeOpPutVoiceConnectorLoggingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutVoiceConnectorLoggingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutVoiceConnectorLoggingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/logging-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorLoggingConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutVoiceConnectorLoggingConfigurationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorLoggingConfigurationInput(v *PutVoiceConnectorLoggingConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutVoiceConnectorLoggingConfigurationInput(v *PutVoiceConnectorLoggingConfigurationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.LoggingConfiguration != nil { - ok := object.Key("LoggingConfiguration") - if err := awsRestjson1_serializeDocumentLoggingConfiguration(v.LoggingConfiguration, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutVoiceConnectorOrigination struct { -} - -func (*awsRestjson1_serializeOpPutVoiceConnectorOrigination) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutVoiceConnectorOrigination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutVoiceConnectorOriginationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/origination") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorOriginationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutVoiceConnectorOriginationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorOriginationInput(v *PutVoiceConnectorOriginationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutVoiceConnectorOriginationInput(v *PutVoiceConnectorOriginationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Origination != nil { - ok := object.Key("Origination") - if err := awsRestjson1_serializeDocumentOrigination(v.Origination, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutVoiceConnectorProxy struct { -} - -func (*awsRestjson1_serializeOpPutVoiceConnectorProxy) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutVoiceConnectorProxy) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutVoiceConnectorProxyInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/programmable-numbers/proxy") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorProxyInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutVoiceConnectorProxyInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorProxyInput(v *PutVoiceConnectorProxyInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutVoiceConnectorProxyInput(v *PutVoiceConnectorProxyInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DefaultSessionExpiryMinutes != nil { - ok := object.Key("DefaultSessionExpiryMinutes") - ok.Integer(*v.DefaultSessionExpiryMinutes) - } - - if v.Disabled != nil { - ok := object.Key("Disabled") - ok.Boolean(*v.Disabled) - } - - if v.FallBackPhoneNumber != nil { - ok := object.Key("FallBackPhoneNumber") - ok.String(*v.FallBackPhoneNumber) - } - - if v.PhoneNumberPoolCountries != nil { - ok := object.Key("PhoneNumberPoolCountries") - if err := awsRestjson1_serializeDocumentCountryList(v.PhoneNumberPoolCountries, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutVoiceConnectorStreamingConfiguration struct { -} - -func (*awsRestjson1_serializeOpPutVoiceConnectorStreamingConfiguration) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutVoiceConnectorStreamingConfiguration) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutVoiceConnectorStreamingConfigurationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/streaming-configuration") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorStreamingConfigurationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutVoiceConnectorStreamingConfigurationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorStreamingConfigurationInput(v *PutVoiceConnectorStreamingConfigurationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutVoiceConnectorStreamingConfigurationInput(v *PutVoiceConnectorStreamingConfigurationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.StreamingConfiguration != nil { - ok := object.Key("StreamingConfiguration") - if err := awsRestjson1_serializeDocumentStreamingConfiguration(v.StreamingConfiguration, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutVoiceConnectorTermination struct { -} - -func (*awsRestjson1_serializeOpPutVoiceConnectorTermination) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutVoiceConnectorTermination) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutVoiceConnectorTerminationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/termination") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorTerminationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutVoiceConnectorTerminationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorTerminationInput(v *PutVoiceConnectorTerminationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutVoiceConnectorTerminationInput(v *PutVoiceConnectorTerminationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Termination != nil { - ok := object.Key("Termination") - if err := awsRestjson1_serializeDocumentTermination(v.Termination, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpPutVoiceConnectorTerminationCredentials struct { -} - -func (*awsRestjson1_serializeOpPutVoiceConnectorTerminationCredentials) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpPutVoiceConnectorTerminationCredentials) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*PutVoiceConnectorTerminationCredentialsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/termination/credentials?operation=put") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorTerminationCredentialsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPutVoiceConnectorTerminationCredentialsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsPutVoiceConnectorTerminationCredentialsInput(v *PutVoiceConnectorTerminationCredentialsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentPutVoiceConnectorTerminationCredentialsInput(v *PutVoiceConnectorTerminationCredentialsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Credentials != nil { - ok := object.Key("Credentials") - if err := awsRestjson1_serializeDocumentCredentialList(v.Credentials, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpRedactChannelMessage struct { -} - -func (*awsRestjson1_serializeOpRedactChannelMessage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpRedactChannelMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RedactChannelMessageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages/{MessageId}?operation=redact") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsRedactChannelMessageInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsRedactChannelMessageInput(v *RedactChannelMessageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MessageId == nil || len(*v.MessageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} - } - if v.MessageId != nil { - if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpRedactConversationMessage struct { -} - -func (*awsRestjson1_serializeOpRedactConversationMessage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpRedactConversationMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RedactConversationMessageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/conversations/{ConversationId}/messages/{MessageId}?operation=redact") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsRedactConversationMessageInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsRedactConversationMessageInput(v *RedactConversationMessageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.ConversationId == nil || len(*v.ConversationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ConversationId must not be empty")} - } - if v.ConversationId != nil { - if err := encoder.SetURI("ConversationId").String(*v.ConversationId); err != nil { - return err - } - } - - if v.MessageId == nil || len(*v.MessageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} - } - if v.MessageId != nil { - if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpRedactRoomMessage struct { -} - -func (*awsRestjson1_serializeOpRedactRoomMessage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpRedactRoomMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RedactRoomMessageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/messages/{MessageId}?operation=redact") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsRedactRoomMessageInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsRedactRoomMessageInput(v *RedactRoomMessageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.MessageId == nil || len(*v.MessageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} - } - if v.MessageId != nil { - if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { - return err - } - } - - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} - } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpRegenerateSecurityToken struct { -} - -func (*awsRestjson1_serializeOpRegenerateSecurityToken) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpRegenerateSecurityToken) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RegenerateSecurityTokenInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}?operation=regenerate-security-token") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsRegenerateSecurityTokenInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsRegenerateSecurityTokenInput(v *RegenerateSecurityTokenInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.BotId == nil || len(*v.BotId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} - } - if v.BotId != nil { - if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpResetPersonalPIN struct { -} - -func (*awsRestjson1_serializeOpResetPersonalPIN) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpResetPersonalPIN) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ResetPersonalPINInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}?operation=reset-personal-pin") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsResetPersonalPINInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsResetPersonalPINInput(v *ResetPersonalPINInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.UserId == nil || len(*v.UserId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} - } - if v.UserId != nil { - if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpRestorePhoneNumber struct { -} - -func (*awsRestjson1_serializeOpRestorePhoneNumber) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpRestorePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*RestorePhoneNumberInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/phone-numbers/{PhoneNumberId}?operation=restore") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsRestorePhoneNumberInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsRestorePhoneNumberInput(v *RestorePhoneNumberInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.PhoneNumberId == nil || len(*v.PhoneNumberId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member PhoneNumberId must not be empty")} - } - if v.PhoneNumberId != nil { - if err := encoder.SetURI("PhoneNumberId").String(*v.PhoneNumberId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpSearchAvailablePhoneNumbers struct { -} - -func (*awsRestjson1_serializeOpSearchAvailablePhoneNumbers) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpSearchAvailablePhoneNumbers) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*SearchAvailablePhoneNumbersInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/search?type=phone-numbers") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsSearchAvailablePhoneNumbersInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsSearchAvailablePhoneNumbersInput(v *SearchAvailablePhoneNumbersInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AreaCode != nil { - encoder.SetQuery("area-code").String(*v.AreaCode) - } - - if v.City != nil { - encoder.SetQuery("city").String(*v.City) - } - - if v.Country != nil { - encoder.SetQuery("country").String(*v.Country) - } - - if v.MaxResults != nil { - encoder.SetQuery("max-results").Integer(*v.MaxResults) - } - - if v.NextToken != nil { - encoder.SetQuery("next-token").String(*v.NextToken) - } - - if len(v.PhoneNumberType) > 0 { - encoder.SetQuery("phone-number-type").String(string(v.PhoneNumberType)) - } - - if v.State != nil { - encoder.SetQuery("state").String(*v.State) - } - - if v.TollFreePrefix != nil { - encoder.SetQuery("toll-free-prefix").String(*v.TollFreePrefix) - } - - return nil -} - -type awsRestjson1_serializeOpSendChannelMessage struct { -} - -func (*awsRestjson1_serializeOpSendChannelMessage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpSendChannelMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*SendChannelMessageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsSendChannelMessageInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentSendChannelMessageInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsSendChannelMessageInput(v *SendChannelMessageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentSendChannelMessageInput(v *SendChannelMessageInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("ClientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.Content != nil { - ok := object.Key("Content") - ok.String(*v.Content) - } - - if v.Metadata != nil { - ok := object.Key("Metadata") - ok.String(*v.Metadata) - } - - if len(v.Persistence) > 0 { - ok := object.Key("Persistence") - ok.String(string(v.Persistence)) - } - - if len(v.Type) > 0 { - ok := object.Key("Type") - ok.String(string(v.Type)) - } - - return nil -} - -type awsRestjson1_serializeOpStartMeetingTranscription struct { -} - -func (*awsRestjson1_serializeOpStartMeetingTranscription) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpStartMeetingTranscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StartMeetingTranscriptionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/transcription?operation=start") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsStartMeetingTranscriptionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentStartMeetingTranscriptionInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsStartMeetingTranscriptionInput(v *StartMeetingTranscriptionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentStartMeetingTranscriptionInput(v *StartMeetingTranscriptionInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.TranscriptionConfiguration != nil { - ok := object.Key("TranscriptionConfiguration") - if err := awsRestjson1_serializeDocumentTranscriptionConfiguration(v.TranscriptionConfiguration, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpStopMeetingTranscription struct { -} - -func (*awsRestjson1_serializeOpStopMeetingTranscription) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpStopMeetingTranscription) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*StopMeetingTranscriptionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/transcription?operation=stop") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsStopMeetingTranscriptionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsStopMeetingTranscriptionInput(v *StopMeetingTranscriptionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpTagAttendee struct { -} - -func (*awsRestjson1_serializeOpTagAttendee) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpTagAttendee) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*TagAttendeeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/attendees/{AttendeeId}/tags?operation=add") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsTagAttendeeInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentTagAttendeeInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsTagAttendeeInput(v *TagAttendeeInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AttendeeId == nil || len(*v.AttendeeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AttendeeId must not be empty")} - } - if v.AttendeeId != nil { - if err := encoder.SetURI("AttendeeId").String(*v.AttendeeId); err != nil { - return err - } - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentTagAttendeeInput(v *TagAttendeeInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentAttendeeTagList(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpTagMeeting struct { -} - -func (*awsRestjson1_serializeOpTagMeeting) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpTagMeeting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*TagMeetingInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/tags?operation=add") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsTagMeetingInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentTagMeetingInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsTagMeetingInput(v *TagMeetingInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentTagMeetingInput(v *TagMeetingInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentMeetingTagList(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpTagResource struct { -} - -func (*awsRestjson1_serializeOpTagResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*TagResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/tags?operation=tag-resource") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ResourceARN != nil { - ok := object.Key("ResourceARN") - ok.String(*v.ResourceARN) - } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUntagAttendee struct { -} - -func (*awsRestjson1_serializeOpUntagAttendee) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUntagAttendee) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UntagAttendeeInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/attendees/{AttendeeId}/tags?operation=delete") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUntagAttendeeInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUntagAttendeeInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUntagAttendeeInput(v *UntagAttendeeInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AttendeeId == nil || len(*v.AttendeeId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AttendeeId must not be empty")} - } - if v.AttendeeId != nil { - if err := encoder.SetURI("AttendeeId").String(*v.AttendeeId); err != nil { - return err - } - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUntagAttendeeInput(v *UntagAttendeeInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.TagKeys != nil { - ok := object.Key("TagKeys") - if err := awsRestjson1_serializeDocumentAttendeeTagKeyList(v.TagKeys, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUntagMeeting struct { -} - -func (*awsRestjson1_serializeOpUntagMeeting) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUntagMeeting) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UntagMeetingInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/meetings/{MeetingId}/tags?operation=delete") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUntagMeetingInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUntagMeetingInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUntagMeetingInput(v *UntagMeetingInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.MeetingId == nil || len(*v.MeetingId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MeetingId must not be empty")} - } - if v.MeetingId != nil { - if err := encoder.SetURI("MeetingId").String(*v.MeetingId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUntagMeetingInput(v *UntagMeetingInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.TagKeys != nil { - ok := object.Key("TagKeys") - if err := awsRestjson1_serializeDocumentMeetingTagKeyList(v.TagKeys, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUntagResource struct { -} - -func (*awsRestjson1_serializeOpUntagResource) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UntagResourceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/tags?operation=untag-resource") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUntagResourceInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUntagResourceInput(v *UntagResourceInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ResourceARN != nil { - ok := object.Key("ResourceARN") - ok.String(*v.ResourceARN) - } - - if v.TagKeys != nil { - ok := object.Key("TagKeys") - if err := awsRestjson1_serializeDocumentTagKeyList(v.TagKeys, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUpdateAccount struct { -} - -func (*awsRestjson1_serializeOpUpdateAccount) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateAccount) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateAccountInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateAccountInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAccountInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateAccountInput(v *UpdateAccountInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateAccountInput(v *UpdateAccountInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.DefaultLicense) > 0 { - ok := object.Key("DefaultLicense") - ok.String(string(v.DefaultLicense)) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateAccountSettings struct { -} - -func (*awsRestjson1_serializeOpUpdateAccountSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateAccountSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateAccountSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAccountSettingsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateAccountSettingsInput(v *UpdateAccountSettingsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AccountSettings != nil { - ok := object.Key("AccountSettings") - if err := awsRestjson1_serializeDocumentAccountSettings(v.AccountSettings, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUpdateAppInstance struct { -} - -func (*awsRestjson1_serializeOpUpdateAppInstance) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateAppInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateAppInstanceInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateAppInstanceInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAppInstanceInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateAppInstanceInput(v *UpdateAppInstanceInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} - } - if v.AppInstanceArn != nil { - if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateAppInstanceInput(v *UpdateAppInstanceInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Metadata != nil { - ok := object.Key("Metadata") - ok.String(*v.Metadata) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateAppInstanceUser struct { -} - -func (*awsRestjson1_serializeOpUpdateAppInstanceUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateAppInstanceUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateAppInstanceUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/app-instance-users/{AppInstanceUserArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateAppInstanceUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateAppInstanceUserInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateAppInstanceUserInput(v *UpdateAppInstanceUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AppInstanceUserArn == nil || len(*v.AppInstanceUserArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceUserArn must not be empty")} - } - if v.AppInstanceUserArn != nil { - if err := encoder.SetURI("AppInstanceUserArn").String(*v.AppInstanceUserArn); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateAppInstanceUserInput(v *UpdateAppInstanceUserInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Metadata != nil { - ok := object.Key("Metadata") - ok.String(*v.Metadata) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateBot struct { -} - -func (*awsRestjson1_serializeOpUpdateBot) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateBot) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateBotInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/bots/{BotId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateBotInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateBotInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateBotInput(v *UpdateBotInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.BotId == nil || len(*v.BotId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member BotId must not be empty")} - } - if v.BotId != nil { - if err := encoder.SetURI("BotId").String(*v.BotId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateBotInput(v *UpdateBotInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Disabled != nil { - ok := object.Key("Disabled") - ok.Boolean(*v.Disabled) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateChannel struct { -} - -func (*awsRestjson1_serializeOpUpdateChannel) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateChannel) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateChannelInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateChannelInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateChannelInput(v *UpdateChannelInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateChannelInput(v *UpdateChannelInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Metadata != nil { - ok := object.Key("Metadata") - ok.String(*v.Metadata) - } - - if len(v.Mode) > 0 { - ok := object.Key("Mode") - ok.String(string(v.Mode)) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateChannelMessage struct { -} - -func (*awsRestjson1_serializeOpUpdateChannelMessage) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateChannelMessage) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateChannelMessageInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/messages/{MessageId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelMessageInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateChannelMessageInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateChannelMessageInput(v *UpdateChannelMessageInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - if v.MessageId == nil || len(*v.MessageId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MessageId must not be empty")} - } - if v.MessageId != nil { - if err := encoder.SetURI("MessageId").String(*v.MessageId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateChannelMessageInput(v *UpdateChannelMessageInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Content != nil { - ok := object.Key("Content") - ok.String(*v.Content) - } - - if v.Metadata != nil { - ok := object.Key("Metadata") - ok.String(*v.Metadata) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateChannelReadMarker struct { -} - -func (*awsRestjson1_serializeOpUpdateChannelReadMarker) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateChannelReadMarker) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateChannelReadMarkerInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/channels/{ChannelArn}/readMarker") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateChannelReadMarkerInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateChannelReadMarkerInput(v *UpdateChannelReadMarkerInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ChannelArn == nil || len(*v.ChannelArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ChannelArn must not be empty")} - } - if v.ChannelArn != nil { - if err := encoder.SetURI("ChannelArn").String(*v.ChannelArn); err != nil { - return err - } - } - - if v.ChimeBearer != nil { - locationName := "X-Amz-Chime-Bearer" - encoder.SetHeader(locationName).String(*v.ChimeBearer) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateGlobalSettings struct { -} - -func (*awsRestjson1_serializeOpUpdateGlobalSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateGlobalSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateGlobalSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateGlobalSettingsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateGlobalSettingsInput(v *UpdateGlobalSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateGlobalSettingsInput(v *UpdateGlobalSettingsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.BusinessCalling != nil { - ok := object.Key("BusinessCalling") - if err := awsRestjson1_serializeDocumentBusinessCallingSettings(v.BusinessCalling, ok); err != nil { - return err - } - } - - if v.VoiceConnector != nil { - ok := object.Key("VoiceConnector") - if err := awsRestjson1_serializeDocumentVoiceConnectorSettings(v.VoiceConnector, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUpdatePhoneNumber struct { -} - -func (*awsRestjson1_serializeOpUpdatePhoneNumber) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdatePhoneNumber) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdatePhoneNumberInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/phone-numbers/{PhoneNumberId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdatePhoneNumberInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdatePhoneNumberInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdatePhoneNumberInput(v *UpdatePhoneNumberInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.PhoneNumberId == nil || len(*v.PhoneNumberId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member PhoneNumberId must not be empty")} - } - if v.PhoneNumberId != nil { - if err := encoder.SetURI("PhoneNumberId").String(*v.PhoneNumberId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdatePhoneNumberInput(v *UpdatePhoneNumberInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CallingName != nil { - ok := object.Key("CallingName") - ok.String(*v.CallingName) - } - - if len(v.ProductType) > 0 { - ok := object.Key("ProductType") - ok.String(string(v.ProductType)) - } - - return nil -} - -type awsRestjson1_serializeOpUpdatePhoneNumberSettings struct { -} - -func (*awsRestjson1_serializeOpUpdatePhoneNumberSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdatePhoneNumberSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdatePhoneNumberSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/settings/phone-number") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdatePhoneNumberSettingsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdatePhoneNumberSettingsInput(v *UpdatePhoneNumberSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdatePhoneNumberSettingsInput(v *UpdatePhoneNumberSettingsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CallingName != nil { - ok := object.Key("CallingName") - ok.String(*v.CallingName) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateProxySession struct { -} - -func (*awsRestjson1_serializeOpUpdateProxySession) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateProxySession) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateProxySessionInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}/proxy-sessions/{ProxySessionId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateProxySessionInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateProxySessionInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateProxySessionInput(v *UpdateProxySessionInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.ProxySessionId == nil || len(*v.ProxySessionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ProxySessionId must not be empty")} - } - if v.ProxySessionId != nil { - if err := encoder.SetURI("ProxySessionId").String(*v.ProxySessionId); err != nil { - return err - } - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateProxySessionInput(v *UpdateProxySessionInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Capabilities != nil { - ok := object.Key("Capabilities") - if err := awsRestjson1_serializeDocumentCapabilityList(v.Capabilities, ok); err != nil { - return err - } - } - - if v.ExpiryMinutes != nil { - ok := object.Key("ExpiryMinutes") - ok.Integer(*v.ExpiryMinutes) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateRoom struct { -} - -func (*awsRestjson1_serializeOpUpdateRoom) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateRoom) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateRoomInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateRoomInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateRoomInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateRoomInput(v *UpdateRoomInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} - } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateRoomInput(v *UpdateRoomInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateRoomMembership struct { -} - -func (*awsRestjson1_serializeOpUpdateRoomMembership) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateRoomMembership) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateRoomMembershipInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/rooms/{RoomId}/memberships/{MemberId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateRoomMembershipInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateRoomMembershipInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateRoomMembershipInput(v *UpdateRoomMembershipInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.MemberId == nil || len(*v.MemberId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MemberId must not be empty")} - } - if v.MemberId != nil { - if err := encoder.SetURI("MemberId").String(*v.MemberId); err != nil { - return err - } - } - - if v.RoomId == nil || len(*v.RoomId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member RoomId must not be empty")} - } - if v.RoomId != nil { - if err := encoder.SetURI("RoomId").String(*v.RoomId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateRoomMembershipInput(v *UpdateRoomMembershipInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.Role) > 0 { - ok := object.Key("Role") - ok.String(string(v.Role)) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateSipMediaApplication struct { -} - -func (*awsRestjson1_serializeOpUpdateSipMediaApplication) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateSipMediaApplication) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateSipMediaApplicationInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications/{SipMediaApplicationId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateSipMediaApplicationInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateSipMediaApplicationInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateSipMediaApplicationInput(v *UpdateSipMediaApplicationInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SipMediaApplicationId == nil || len(*v.SipMediaApplicationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipMediaApplicationId must not be empty")} - } - if v.SipMediaApplicationId != nil { - if err := encoder.SetURI("SipMediaApplicationId").String(*v.SipMediaApplicationId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateSipMediaApplicationInput(v *UpdateSipMediaApplicationInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Endpoints != nil { - ok := object.Key("Endpoints") - if err := awsRestjson1_serializeDocumentSipMediaApplicationEndpointList(v.Endpoints, ok); err != nil { - return err - } - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateSipMediaApplicationCall struct { -} - -func (*awsRestjson1_serializeOpUpdateSipMediaApplicationCall) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateSipMediaApplicationCall) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateSipMediaApplicationCallInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-media-applications/{SipMediaApplicationId}/calls/{TransactionId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateSipMediaApplicationCallInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateSipMediaApplicationCallInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateSipMediaApplicationCallInput(v *UpdateSipMediaApplicationCallInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SipMediaApplicationId == nil || len(*v.SipMediaApplicationId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipMediaApplicationId must not be empty")} - } - if v.SipMediaApplicationId != nil { - if err := encoder.SetURI("SipMediaApplicationId").String(*v.SipMediaApplicationId); err != nil { - return err - } - } - - if v.TransactionId == nil || len(*v.TransactionId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member TransactionId must not be empty")} - } - if v.TransactionId != nil { - if err := encoder.SetURI("TransactionId").String(*v.TransactionId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateSipMediaApplicationCallInput(v *UpdateSipMediaApplicationCallInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Arguments != nil { - ok := object.Key("Arguments") - if err := awsRestjson1_serializeDocumentSMAUpdateCallArgumentsMap(v.Arguments, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUpdateSipRule struct { -} - -func (*awsRestjson1_serializeOpUpdateSipRule) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateSipRule) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateSipRuleInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/sip-rules/{SipRuleId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateSipRuleInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateSipRuleInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateSipRuleInput(v *UpdateSipRuleInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.SipRuleId == nil || len(*v.SipRuleId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SipRuleId must not be empty")} - } - if v.SipRuleId != nil { - if err := encoder.SetURI("SipRuleId").String(*v.SipRuleId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateSipRuleInput(v *UpdateSipRuleInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Disabled != nil { - ok := object.Key("Disabled") - ok.Boolean(*v.Disabled) - } - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - if v.TargetApplications != nil { - ok := object.Key("TargetApplications") - if err := awsRestjson1_serializeDocumentSipRuleTargetApplicationList(v.TargetApplications, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUpdateUser struct { -} - -func (*awsRestjson1_serializeOpUpdateUser) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateUser) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateUserInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateUserInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateUserInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateUserInput(v *UpdateUserInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.UserId == nil || len(*v.UserId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} - } - if v.UserId != nil { - if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateUserInput(v *UpdateUserInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AlexaForBusinessMetadata != nil { - ok := object.Key("AlexaForBusinessMetadata") - if err := awsRestjson1_serializeDocumentAlexaForBusinessMetadata(v.AlexaForBusinessMetadata, ok); err != nil { - return err - } - } - - if len(v.LicenseType) > 0 { - ok := object.Key("LicenseType") - ok.String(string(v.LicenseType)) - } - - if len(v.UserType) > 0 { - ok := object.Key("UserType") - ok.String(string(v.UserType)) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateUserSettings struct { -} - -func (*awsRestjson1_serializeOpUpdateUserSettings) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateUserSettings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateUserSettingsInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/accounts/{AccountId}/users/{UserId}/settings") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateUserSettingsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateUserSettingsInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateUserSettingsInput(v *UpdateUserSettingsInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.AccountId == nil || len(*v.AccountId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member AccountId must not be empty")} - } - if v.AccountId != nil { - if err := encoder.SetURI("AccountId").String(*v.AccountId); err != nil { - return err - } - } - - if v.UserId == nil || len(*v.UserId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member UserId must not be empty")} - } - if v.UserId != nil { - if err := encoder.SetURI("UserId").String(*v.UserId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateUserSettingsInput(v *UpdateUserSettingsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.UserSettings != nil { - ok := object.Key("UserSettings") - if err := awsRestjson1_serializeDocumentUserSettings(v.UserSettings, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpUpdateVoiceConnector struct { -} - -func (*awsRestjson1_serializeOpUpdateVoiceConnector) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateVoiceConnector) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateVoiceConnectorInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connectors/{VoiceConnectorId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateVoiceConnectorInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateVoiceConnectorInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateVoiceConnectorInput(v *UpdateVoiceConnectorInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorId == nil || len(*v.VoiceConnectorId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorId must not be empty")} - } - if v.VoiceConnectorId != nil { - if err := encoder.SetURI("VoiceConnectorId").String(*v.VoiceConnectorId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateVoiceConnectorInput(v *UpdateVoiceConnectorInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - if v.RequireEncryption != nil { - ok := object.Key("RequireEncryption") - ok.Boolean(*v.RequireEncryption) - } - - return nil -} - -type awsRestjson1_serializeOpUpdateVoiceConnectorGroup struct { -} - -func (*awsRestjson1_serializeOpUpdateVoiceConnectorGroup) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpUpdateVoiceConnectorGroup) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*UpdateVoiceConnectorGroupInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/voice-connector-groups/{VoiceConnectorGroupId}") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "PUT" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if err := awsRestjson1_serializeOpHttpBindingsUpdateVoiceConnectorGroupInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentUpdateVoiceConnectorGroupInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsUpdateVoiceConnectorGroupInput(v *UpdateVoiceConnectorGroupInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - if v.VoiceConnectorGroupId == nil || len(*v.VoiceConnectorGroupId) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VoiceConnectorGroupId must not be empty")} - } - if v.VoiceConnectorGroupId != nil { - if err := encoder.SetURI("VoiceConnectorGroupId").String(*v.VoiceConnectorGroupId); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeOpDocumentUpdateVoiceConnectorGroupInput(v *UpdateVoiceConnectorGroupInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Name != nil { - ok := object.Key("Name") - ok.String(*v.Name) - } - - if v.VoiceConnectorItems != nil { - ok := object.Key("VoiceConnectorItems") - if err := awsRestjson1_serializeDocumentVoiceConnectorItemList(v.VoiceConnectorItems, ok); err != nil { - return err - } - } - - return nil -} - -type awsRestjson1_serializeOpValidateE911Address struct { -} - -func (*awsRestjson1_serializeOpValidateE911Address) ID() string { - return "OperationSerializer" -} - -func (m *awsRestjson1_serializeOpValidateE911Address) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - _, span := tracing.StartSpan(ctx, "OperationSerializer") - endTimer := startMetricTimer(ctx, "client.call.serialization_duration") - defer endTimer() - defer span.End() - request, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} - } - - input, ok := in.Parameters.(*ValidateE911AddressInput) - _ = input - if !ok { - return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} - } - - opPath, opQuery := httpbinding.SplitURI("/emergency-calling/address") - request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) - request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" - var restEncoder *httpbinding.Encoder - if request.URL.RawPath == "" { - restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) - } else { - request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) - restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) - } - - if err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentValidateE911AddressInput(input, jsonEncoder.Value); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - if request.Request, err = restEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - endTimer() - span.End() - return next.HandleSerialize(ctx, in) -} -func awsRestjson1_serializeOpHttpBindingsValidateE911AddressInput(v *ValidateE911AddressInput, encoder *httpbinding.Encoder) error { - if v == nil { - return fmt.Errorf("unsupported serialization of nil %T", v) - } - - return nil -} - -func awsRestjson1_serializeOpDocumentValidateE911AddressInput(v *ValidateE911AddressInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AwsAccountId != nil { - ok := object.Key("AwsAccountId") - ok.String(*v.AwsAccountId) - } - - if v.City != nil { - ok := object.Key("City") - ok.String(*v.City) - } - - if v.Country != nil { - ok := object.Key("Country") - ok.String(*v.Country) - } - - if v.PostalCode != nil { - ok := object.Key("PostalCode") - ok.String(*v.PostalCode) - } - - if v.State != nil { - ok := object.Key("State") - ok.String(*v.State) - } - - if v.StreetInfo != nil { - ok := object.Key("StreetInfo") - ok.String(*v.StreetInfo) - } - - if v.StreetNumber != nil { - ok := object.Key("StreetNumber") - ok.String(*v.StreetNumber) - } - - return nil -} - -func awsRestjson1_serializeDocumentAccountSettings(v *types.AccountSettings, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DisableRemoteControl != nil { - ok := object.Key("DisableRemoteControl") - ok.Boolean(*v.DisableRemoteControl) - } - - if v.EnableDialOut != nil { - ok := object.Key("EnableDialOut") - ok.Boolean(*v.EnableDialOut) - } - - return nil -} - -func awsRestjson1_serializeDocumentAlexaForBusinessMetadata(v *types.AlexaForBusinessMetadata, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AlexaForBusinessRoomArn != nil { - ok := object.Key("AlexaForBusinessRoomArn") - ok.String(*v.AlexaForBusinessRoomArn) - } - - if v.IsAlexaForBusinessEnabled != nil { - ok := object.Key("IsAlexaForBusinessEnabled") - ok.Boolean(*v.IsAlexaForBusinessEnabled) - } - - return nil -} - -func awsRestjson1_serializeDocumentAppInstanceRetentionSettings(v *types.AppInstanceRetentionSettings, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ChannelRetentionSettings != nil { - ok := object.Key("ChannelRetentionSettings") - if err := awsRestjson1_serializeDocumentChannelRetentionSettings(v.ChannelRetentionSettings, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentAppInstanceStreamingConfiguration(v *types.AppInstanceStreamingConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.AppInstanceDataType) > 0 { - ok := object.Key("AppInstanceDataType") - ok.String(string(v.AppInstanceDataType)) - } - - if v.ResourceArn != nil { - ok := object.Key("ResourceArn") - ok.String(*v.ResourceArn) - } - - return nil -} - -func awsRestjson1_serializeDocumentAppInstanceStreamingConfigurationList(v []types.AppInstanceStreamingConfiguration, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentAppInstanceStreamingConfiguration(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentArtifactsConfiguration(v *types.ArtifactsConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Audio != nil { - ok := object.Key("Audio") - if err := awsRestjson1_serializeDocumentAudioArtifactsConfiguration(v.Audio, ok); err != nil { - return err - } - } - - if v.Content != nil { - ok := object.Key("Content") - if err := awsRestjson1_serializeDocumentContentArtifactsConfiguration(v.Content, ok); err != nil { - return err - } - } - - if v.Video != nil { - ok := object.Key("Video") - if err := awsRestjson1_serializeDocumentVideoArtifactsConfiguration(v.Video, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentAttendeeIdList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentAttendeeTagKeyList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentAttendeeTagList(v []types.Tag, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentAudioArtifactsConfiguration(v *types.AudioArtifactsConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.MuxType) > 0 { - ok := object.Key("MuxType") - ok.String(string(v.MuxType)) - } - - return nil -} - -func awsRestjson1_serializeDocumentBusinessCallingSettings(v *types.BusinessCallingSettings, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CdrBucket != nil { - ok := object.Key("CdrBucket") - ok.String(*v.CdrBucket) - } - - return nil -} - -func awsRestjson1_serializeDocumentCallingRegionList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentCapabilityList(v []types.Capability, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(string(v[i])) - } - return nil -} - -func awsRestjson1_serializeDocumentChannelRetentionSettings(v *types.ChannelRetentionSettings, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.RetentionDays != nil { - ok := object.Key("RetentionDays") - ok.Integer(*v.RetentionDays) - } - - return nil -} - -func awsRestjson1_serializeDocumentChimeSdkMeetingConfiguration(v *types.ChimeSdkMeetingConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ArtifactsConfiguration != nil { - ok := object.Key("ArtifactsConfiguration") - if err := awsRestjson1_serializeDocumentArtifactsConfiguration(v.ArtifactsConfiguration, ok); err != nil { - return err - } - } - - if v.SourceConfiguration != nil { - ok := object.Key("SourceConfiguration") - if err := awsRestjson1_serializeDocumentSourceConfiguration(v.SourceConfiguration, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentContentArtifactsConfiguration(v *types.ContentArtifactsConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.MuxType) > 0 { - ok := object.Key("MuxType") - ok.String(string(v.MuxType)) - } - - if len(v.State) > 0 { - ok := object.Key("State") - ok.String(string(v.State)) - } - - return nil -} - -func awsRestjson1_serializeDocumentConversationRetentionSettings(v *types.ConversationRetentionSettings, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.RetentionDays != nil { - ok := object.Key("RetentionDays") - ok.Integer(*v.RetentionDays) - } - - return nil -} - -func awsRestjson1_serializeDocumentCountryList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentCreateAttendeeRequestItem(v *types.CreateAttendeeRequestItem, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ExternalUserId != nil { - ok := object.Key("ExternalUserId") - ok.String(*v.ExternalUserId) - } - - if v.Tags != nil { - ok := object.Key("Tags") - if err := awsRestjson1_serializeDocumentAttendeeTagList(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentCreateAttendeeRequestItemList(v []types.CreateAttendeeRequestItem, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentCreateAttendeeRequestItem(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentCreateMeetingWithAttendeesRequestItemList(v []types.CreateAttendeeRequestItem, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentCreateAttendeeRequestItem(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentCredential(v *types.Credential, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Password != nil { - ok := object.Key("Password") - ok.String(*v.Password) - } - - if v.Username != nil { - ok := object.Key("Username") - ok.String(*v.Username) - } - - return nil -} - -func awsRestjson1_serializeDocumentCredentialList(v []types.Credential, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentCredential(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentDNISEmergencyCallingConfiguration(v *types.DNISEmergencyCallingConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CallingCountry != nil { - ok := object.Key("CallingCountry") - ok.String(*v.CallingCountry) - } - - if v.EmergencyPhoneNumber != nil { - ok := object.Key("EmergencyPhoneNumber") - ok.String(*v.EmergencyPhoneNumber) - } - - if v.TestPhoneNumber != nil { - ok := object.Key("TestPhoneNumber") - ok.String(*v.TestPhoneNumber) - } - - return nil -} - -func awsRestjson1_serializeDocumentDNISEmergencyCallingConfigurationList(v []types.DNISEmergencyCallingConfiguration, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentDNISEmergencyCallingConfiguration(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentE164PhoneNumberList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentEmergencyCallingConfiguration(v *types.EmergencyCallingConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DNIS != nil { - ok := object.Key("DNIS") - if err := awsRestjson1_serializeDocumentDNISEmergencyCallingConfigurationList(v.DNIS, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentEngineTranscribeMedicalSettings(v *types.EngineTranscribeMedicalSettings, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.ContentIdentificationType) > 0 { - ok := object.Key("ContentIdentificationType") - ok.String(string(v.ContentIdentificationType)) - } - - if len(v.LanguageCode) > 0 { - ok := object.Key("LanguageCode") - ok.String(string(v.LanguageCode)) - } - - if len(v.Region) > 0 { - ok := object.Key("Region") - ok.String(string(v.Region)) - } - - if len(v.Specialty) > 0 { - ok := object.Key("Specialty") - ok.String(string(v.Specialty)) - } - - if len(v.Type) > 0 { - ok := object.Key("Type") - ok.String(string(v.Type)) - } - - if v.VocabularyName != nil { - ok := object.Key("VocabularyName") - ok.String(*v.VocabularyName) - } - - return nil -} - -func awsRestjson1_serializeDocumentEngineTranscribeSettings(v *types.EngineTranscribeSettings, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.ContentIdentificationType) > 0 { - ok := object.Key("ContentIdentificationType") - ok.String(string(v.ContentIdentificationType)) - } - - if len(v.ContentRedactionType) > 0 { - ok := object.Key("ContentRedactionType") - ok.String(string(v.ContentRedactionType)) - } - - if v.EnablePartialResultsStabilization != nil { - ok := object.Key("EnablePartialResultsStabilization") - ok.Boolean(*v.EnablePartialResultsStabilization) - } - - if v.IdentifyLanguage != nil { - ok := object.Key("IdentifyLanguage") - ok.Boolean(*v.IdentifyLanguage) - } - - if len(v.LanguageCode) > 0 { - ok := object.Key("LanguageCode") - ok.String(string(v.LanguageCode)) - } - - if v.LanguageModelName != nil { - ok := object.Key("LanguageModelName") - ok.String(*v.LanguageModelName) - } - - if v.LanguageOptions != nil { - ok := object.Key("LanguageOptions") - ok.String(*v.LanguageOptions) - } - - if len(v.PartialResultsStability) > 0 { - ok := object.Key("PartialResultsStability") - ok.String(string(v.PartialResultsStability)) - } - - if v.PiiEntityTypes != nil { - ok := object.Key("PiiEntityTypes") - ok.String(*v.PiiEntityTypes) - } - - if len(v.PreferredLanguage) > 0 { - ok := object.Key("PreferredLanguage") - ok.String(string(v.PreferredLanguage)) - } - - if len(v.Region) > 0 { - ok := object.Key("Region") - ok.String(string(v.Region)) - } - - if len(v.VocabularyFilterMethod) > 0 { - ok := object.Key("VocabularyFilterMethod") - ok.String(string(v.VocabularyFilterMethod)) - } - - if v.VocabularyFilterName != nil { - ok := object.Key("VocabularyFilterName") - ok.String(*v.VocabularyFilterName) - } - - if v.VocabularyFilterNames != nil { - ok := object.Key("VocabularyFilterNames") - ok.String(*v.VocabularyFilterNames) - } - - if v.VocabularyName != nil { - ok := object.Key("VocabularyName") - ok.String(*v.VocabularyName) - } - - if v.VocabularyNames != nil { - ok := object.Key("VocabularyNames") - ok.String(*v.VocabularyNames) - } - - return nil -} - -func awsRestjson1_serializeDocumentExternalUserIdList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentGeoMatchParams(v *types.GeoMatchParams, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AreaCode != nil { - ok := object.Key("AreaCode") - ok.String(*v.AreaCode) - } - - if v.Country != nil { - ok := object.Key("Country") - ok.String(*v.Country) - } - - return nil -} - -func awsRestjson1_serializeDocumentLoggingConfiguration(v *types.LoggingConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.EnableMediaMetricLogs != nil { - ok := object.Key("EnableMediaMetricLogs") - ok.Boolean(*v.EnableMediaMetricLogs) - } - - if v.EnableSIPLogs != nil { - ok := object.Key("EnableSIPLogs") - ok.Boolean(*v.EnableSIPLogs) - } - - return nil -} - -func awsRestjson1_serializeDocumentMeetingNotificationConfiguration(v *types.MeetingNotificationConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.SnsTopicArn != nil { - ok := object.Key("SnsTopicArn") - ok.String(*v.SnsTopicArn) - } - - if v.SqsQueueArn != nil { - ok := object.Key("SqsQueueArn") - ok.String(*v.SqsQueueArn) - } - - return nil -} - -func awsRestjson1_serializeDocumentMeetingTagKeyList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentMeetingTagList(v []types.Tag, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentMemberArns(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentMembershipItem(v *types.MembershipItem, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.MemberId != nil { - ok := object.Key("MemberId") - ok.String(*v.MemberId) - } - - if len(v.Role) > 0 { - ok := object.Key("Role") - ok.String(string(v.Role)) - } - - return nil -} - -func awsRestjson1_serializeDocumentMembershipItemList(v []types.MembershipItem, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentMembershipItem(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentNonEmptyStringList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentOrigination(v *types.Origination, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Disabled != nil { - ok := object.Key("Disabled") - ok.Boolean(*v.Disabled) - } - - if v.Routes != nil { - ok := object.Key("Routes") - if err := awsRestjson1_serializeDocumentOriginationRouteList(v.Routes, ok); err != nil { - return err - } - } - - return nil -} - -func awsRestjson1_serializeDocumentOriginationRoute(v *types.OriginationRoute, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Host != nil { - ok := object.Key("Host") - ok.String(*v.Host) - } - - if v.Port != nil { - ok := object.Key("Port") - ok.Integer(*v.Port) - } - - if v.Priority != nil { - ok := object.Key("Priority") - ok.Integer(*v.Priority) - } - - if len(v.Protocol) > 0 { - ok := object.Key("Protocol") - ok.String(string(v.Protocol)) - } - - if v.Weight != nil { - ok := object.Key("Weight") - ok.Integer(*v.Weight) - } - - return nil -} - -func awsRestjson1_serializeDocumentOriginationRouteList(v []types.OriginationRoute, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentOriginationRoute(&v[i], av); err != nil { + if v.UserSettings != nil { + ok := object.Key("UserSettings") + if err := awsRestjson1_serializeDocumentUserSettings(v.UserSettings, ok); err != nil { return err } } - return nil -} -func awsRestjson1_serializeDocumentParticipantPhoneNumberList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } return nil } -func awsRestjson1_serializeDocumentRetentionSettings(v *types.RetentionSettings, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentAccountSettings(v *types.AccountSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.ConversationRetentionSettings != nil { - ok := object.Key("ConversationRetentionSettings") - if err := awsRestjson1_serializeDocumentConversationRetentionSettings(v.ConversationRetentionSettings, ok); err != nil { - return err - } + if v.DisableRemoteControl != nil { + ok := object.Key("DisableRemoteControl") + ok.Boolean(*v.DisableRemoteControl) } - if v.RoomRetentionSettings != nil { - ok := object.Key("RoomRetentionSettings") - if err := awsRestjson1_serializeDocumentRoomRetentionSettings(v.RoomRetentionSettings, ok); err != nil { - return err - } + if v.EnableDialOut != nil { + ok := object.Key("EnableDialOut") + ok.Boolean(*v.EnableDialOut) } return nil } -func awsRestjson1_serializeDocumentRoomRetentionSettings(v *types.RoomRetentionSettings, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentAlexaForBusinessMetadata(v *types.AlexaForBusinessMetadata, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.RetentionDays != nil { - ok := object.Key("RetentionDays") - ok.Integer(*v.RetentionDays) + if v.AlexaForBusinessRoomArn != nil { + ok := object.Key("AlexaForBusinessRoomArn") + ok.String(*v.AlexaForBusinessRoomArn) + } + + if v.IsAlexaForBusinessEnabled != nil { + ok := object.Key("IsAlexaForBusinessEnabled") + ok.Boolean(*v.IsAlexaForBusinessEnabled) } return nil } -func awsRestjson1_serializeDocumentSelectedVideoStreams(v *types.SelectedVideoStreams, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentBusinessCallingSettings(v *types.BusinessCallingSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.AttendeeIds != nil { - ok := object.Key("AttendeeIds") - if err := awsRestjson1_serializeDocumentAttendeeIdList(v.AttendeeIds, ok); err != nil { - return err - } - } - - if v.ExternalUserIds != nil { - ok := object.Key("ExternalUserIds") - if err := awsRestjson1_serializeDocumentExternalUserIdList(v.ExternalUserIds, ok); err != nil { - return err - } + if v.CdrBucket != nil { + ok := object.Key("CdrBucket") + ok.String(*v.CdrBucket) } return nil } -func awsRestjson1_serializeDocumentSensitiveStringList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentSigninDelegateGroup(v *types.SigninDelegateGroup, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentConversationRetentionSettings(v *types.ConversationRetentionSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.GroupName != nil { - ok := object.Key("GroupName") - ok.String(*v.GroupName) + if v.RetentionDays != nil { + ok := object.Key("RetentionDays") + ok.Integer(*v.RetentionDays) } return nil } -func awsRestjson1_serializeDocumentSigninDelegateGroupList(v []types.SigninDelegateGroup, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentE164PhoneNumberList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsRestjson1_serializeDocumentSigninDelegateGroup(&v[i], av); err != nil { - return err - } + av.String(v[i]) } return nil } -func awsRestjson1_serializeDocumentSipHeadersMap(v map[string]string, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentMembershipItem(v *types.MembershipItem, value smithyjson.Value) error { object := value.Object() defer object.Close() - for key := range v { - om := object.Key(key) - om.String(v[key]) + if v.MemberId != nil { + ok := object.Key("MemberId") + ok.String(*v.MemberId) } - return nil -} - -func awsRestjson1_serializeDocumentSipMediaApplicationEndpoint(v *types.SipMediaApplicationEndpoint, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - if v.LambdaArn != nil { - ok := object.Key("LambdaArn") - ok.String(*v.LambdaArn) + if len(v.Role) > 0 { + ok := object.Key("Role") + ok.String(string(v.Role)) } return nil } -func awsRestjson1_serializeDocumentSipMediaApplicationEndpointList(v []types.SipMediaApplicationEndpoint, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentMembershipItemList(v []types.MembershipItem, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsRestjson1_serializeDocumentSipMediaApplicationEndpoint(&v[i], av); err != nil { + if err := awsRestjson1_serializeDocumentMembershipItem(&v[i], av); err != nil { return err } } return nil } -func awsRestjson1_serializeDocumentSipMediaApplicationLoggingConfiguration(v *types.SipMediaApplicationLoggingConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.EnableSipMediaApplicationMessageLogs != nil { - ok := object.Key("EnableSipMediaApplicationMessageLogs") - ok.Boolean(*v.EnableSipMediaApplicationMessageLogs) - } - - return nil -} - -func awsRestjson1_serializeDocumentSipRuleTargetApplication(v *types.SipRuleTargetApplication, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.AwsRegion != nil { - ok := object.Key("AwsRegion") - ok.String(*v.AwsRegion) - } - - if v.Priority != nil { - ok := object.Key("Priority") - ok.Integer(*v.Priority) - } - - if v.SipMediaApplicationId != nil { - ok := object.Key("SipMediaApplicationId") - ok.String(*v.SipMediaApplicationId) - } - - return nil -} - -func awsRestjson1_serializeDocumentSipRuleTargetApplicationList(v []types.SipRuleTargetApplication, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentNonEmptyStringList(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsRestjson1_serializeDocumentSipRuleTargetApplication(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsRestjson1_serializeDocumentSMAUpdateCallArgumentsMap(v map[string]string, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - for key := range v { - om := object.Key(key) - om.String(v[key]) + av.String(v[i]) } return nil } -func awsRestjson1_serializeDocumentSourceConfiguration(v *types.SourceConfiguration, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentRetentionSettings(v *types.RetentionSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.SelectedVideoStreams != nil { - ok := object.Key("SelectedVideoStreams") - if err := awsRestjson1_serializeDocumentSelectedVideoStreams(v.SelectedVideoStreams, ok); err != nil { + if v.ConversationRetentionSettings != nil { + ok := object.Key("ConversationRetentionSettings") + if err := awsRestjson1_serializeDocumentConversationRetentionSettings(v.ConversationRetentionSettings, ok); err != nil { return err } } - return nil -} - -func awsRestjson1_serializeDocumentStreamingConfiguration(v *types.StreamingConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DataRetentionInHours != nil { - ok := object.Key("DataRetentionInHours") - ok.Integer(*v.DataRetentionInHours) - } - - if v.Disabled != nil { - ok := object.Key("Disabled") - ok.Boolean(*v.Disabled) - } - - if v.StreamingNotificationTargets != nil { - ok := object.Key("StreamingNotificationTargets") - if err := awsRestjson1_serializeDocumentStreamingNotificationTargetList(v.StreamingNotificationTargets, ok); err != nil { + if v.RoomRetentionSettings != nil { + ok := object.Key("RoomRetentionSettings") + if err := awsRestjson1_serializeDocumentRoomRetentionSettings(v.RoomRetentionSettings, ok); err != nil { return err } } @@ -17485,77 +5553,37 @@ func awsRestjson1_serializeDocumentStreamingConfiguration(v *types.StreamingConf return nil } -func awsRestjson1_serializeDocumentStreamingNotificationTarget(v *types.StreamingNotificationTarget, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentRoomRetentionSettings(v *types.RoomRetentionSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() - if len(v.NotificationTarget) > 0 { - ok := object.Key("NotificationTarget") - ok.String(string(v.NotificationTarget)) - } - - return nil -} - -func awsRestjson1_serializeDocumentStreamingNotificationTargetList(v []types.StreamingNotificationTarget, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentStreamingNotificationTarget(&v[i], av); err != nil { - return err - } + if v.RetentionDays != nil { + ok := object.Key("RetentionDays") + ok.Integer(*v.RetentionDays) } - return nil -} - -func awsRestjson1_serializeDocumentStringList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - for i := range v { - av := array.Value() - av.String(v[i]) - } return nil } -func awsRestjson1_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentSigninDelegateGroup(v *types.SigninDelegateGroup, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Key != nil { - ok := object.Key("Key") - ok.String(*v.Key) - } - - if v.Value != nil { - ok := object.Key("Value") - ok.String(*v.Value) + if v.GroupName != nil { + ok := object.Key("GroupName") + ok.String(*v.GroupName) } return nil } -func awsRestjson1_serializeDocumentTagKeyList(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { +func awsRestjson1_serializeDocumentSigninDelegateGroupList(v []types.SigninDelegateGroup, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { + if err := awsRestjson1_serializeDocumentSigninDelegateGroup(&v[i], av); err != nil { return err } } @@ -17584,63 +5612,6 @@ func awsRestjson1_serializeDocumentTelephonySettings(v *types.TelephonySettings, return nil } -func awsRestjson1_serializeDocumentTermination(v *types.Termination, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CallingRegions != nil { - ok := object.Key("CallingRegions") - if err := awsRestjson1_serializeDocumentCallingRegionList(v.CallingRegions, ok); err != nil { - return err - } - } - - if v.CidrAllowedList != nil { - ok := object.Key("CidrAllowedList") - if err := awsRestjson1_serializeDocumentStringList(v.CidrAllowedList, ok); err != nil { - return err - } - } - - if v.CpsLimit != nil { - ok := object.Key("CpsLimit") - ok.Integer(*v.CpsLimit) - } - - if v.DefaultPhoneNumber != nil { - ok := object.Key("DefaultPhoneNumber") - ok.String(*v.DefaultPhoneNumber) - } - - if v.Disabled != nil { - ok := object.Key("Disabled") - ok.Boolean(*v.Disabled) - } - - return nil -} - -func awsRestjson1_serializeDocumentTranscriptionConfiguration(v *types.TranscriptionConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.EngineTranscribeMedicalSettings != nil { - ok := object.Key("EngineTranscribeMedicalSettings") - if err := awsRestjson1_serializeDocumentEngineTranscribeMedicalSettings(v.EngineTranscribeMedicalSettings, ok); err != nil { - return err - } - } - - if v.EngineTranscribeSettings != nil { - ok := object.Key("EngineTranscribeSettings") - if err := awsRestjson1_serializeDocumentEngineTranscribeSettings(v.EngineTranscribeSettings, ok); err != nil { - return err - } - } - - return nil -} - func awsRestjson1_serializeDocumentUpdatePhoneNumberRequestItem(v *types.UpdatePhoneNumberRequestItem, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -17754,53 +5725,6 @@ func awsRestjson1_serializeDocumentUserSettings(v *types.UserSettings, value smi return nil } -func awsRestjson1_serializeDocumentVideoArtifactsConfiguration(v *types.VideoArtifactsConfiguration, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if len(v.MuxType) > 0 { - ok := object.Key("MuxType") - ok.String(string(v.MuxType)) - } - - if len(v.State) > 0 { - ok := object.Key("State") - ok.String(string(v.State)) - } - - return nil -} - -func awsRestjson1_serializeDocumentVoiceConnectorItem(v *types.VoiceConnectorItem, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Priority != nil { - ok := object.Key("Priority") - ok.Integer(*v.Priority) - } - - if v.VoiceConnectorId != nil { - ok := object.Key("VoiceConnectorId") - ok.String(*v.VoiceConnectorId) - } - - return nil -} - -func awsRestjson1_serializeDocumentVoiceConnectorItemList(v []types.VoiceConnectorItem, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsRestjson1_serializeDocumentVoiceConnectorItem(&v[i], av); err != nil { - return err - } - } - return nil -} - func awsRestjson1_serializeDocumentVoiceConnectorSettings(v *types.VoiceConnectorSettings, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/chime/snapshot_test.go b/service/chime/snapshot_test.go index 153da55c535..25d3ca37559 100644 --- a/service/chime/snapshot_test.go +++ b/service/chime/snapshot_test.go @@ -62,30 +62,6 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } -func TestCheckSnapshot_AssociatePhoneNumbersWithVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.AssociatePhoneNumbersWithVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "AssociatePhoneNumbersWithVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_AssociatePhoneNumbersWithVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.AssociatePhoneNumbersWithVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "AssociatePhoneNumbersWithVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - func TestCheckSnapshot_AssociatePhoneNumberWithUser(t *testing.T) { svc := New(Options{}) _, err := svc.AssociatePhoneNumberWithUser(context.Background(), nil, func(o *Options) { @@ -110,30 +86,6 @@ func TestCheckSnapshot_AssociateSigninDelegateGroupsWithAccount(t *testing.T) { } } -func TestCheckSnapshot_BatchCreateAttendee(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchCreateAttendee(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "BatchCreateAttendee") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_BatchCreateChannelMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchCreateChannelMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "BatchCreateChannelMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - func TestCheckSnapshot_BatchCreateRoomMembership(t *testing.T) { svc := New(Options{}) _, err := svc.BatchCreateRoomMembership(context.Background(), nil, func(o *Options) { @@ -218,11 +170,11 @@ func TestCheckSnapshot_CreateAccount(t *testing.T) { } } -func TestCheckSnapshot_CreateAppInstance(t *testing.T) { +func TestCheckSnapshot_CreateBot(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateAppInstance(context.Background(), nil, func(o *Options) { + _, err := svc.CreateBot(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateAppInstance") + return testSnapshot(stack, "CreateBot") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -230,11 +182,11 @@ func TestCheckSnapshot_CreateAppInstance(t *testing.T) { } } -func TestCheckSnapshot_CreateAppInstanceAdmin(t *testing.T) { +func TestCheckSnapshot_CreateMeetingDialOut(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateAppInstanceAdmin(context.Background(), nil, func(o *Options) { + _, err := svc.CreateMeetingDialOut(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateAppInstanceAdmin") + return testSnapshot(stack, "CreateMeetingDialOut") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -242,11 +194,11 @@ func TestCheckSnapshot_CreateAppInstanceAdmin(t *testing.T) { } } -func TestCheckSnapshot_CreateAppInstanceUser(t *testing.T) { +func TestCheckSnapshot_CreatePhoneNumberOrder(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateAppInstanceUser(context.Background(), nil, func(o *Options) { + _, err := svc.CreatePhoneNumberOrder(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateAppInstanceUser") + return testSnapshot(stack, "CreatePhoneNumberOrder") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -254,11 +206,11 @@ func TestCheckSnapshot_CreateAppInstanceUser(t *testing.T) { } } -func TestCheckSnapshot_CreateAttendee(t *testing.T) { +func TestCheckSnapshot_CreateRoom(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateAttendee(context.Background(), nil, func(o *Options) { + _, err := svc.CreateRoom(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateAttendee") + return testSnapshot(stack, "CreateRoom") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -266,11 +218,11 @@ func TestCheckSnapshot_CreateAttendee(t *testing.T) { } } -func TestCheckSnapshot_CreateBot(t *testing.T) { +func TestCheckSnapshot_CreateRoomMembership(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateBot(context.Background(), nil, func(o *Options) { + _, err := svc.CreateRoomMembership(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateBot") + return testSnapshot(stack, "CreateRoomMembership") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -278,11 +230,11 @@ func TestCheckSnapshot_CreateBot(t *testing.T) { } } -func TestCheckSnapshot_CreateChannel(t *testing.T) { +func TestCheckSnapshot_CreateUser(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateChannel(context.Background(), nil, func(o *Options) { + _, err := svc.CreateUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateChannel") + return testSnapshot(stack, "CreateUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -290,11 +242,11 @@ func TestCheckSnapshot_CreateChannel(t *testing.T) { } } -func TestCheckSnapshot_CreateChannelBan(t *testing.T) { +func TestCheckSnapshot_DeleteAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateChannelBan(context.Background(), nil, func(o *Options) { + _, err := svc.DeleteAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateChannelBan") + return testSnapshot(stack, "DeleteAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -302,11 +254,11 @@ func TestCheckSnapshot_CreateChannelBan(t *testing.T) { } } -func TestCheckSnapshot_CreateChannelMembership(t *testing.T) { +func TestCheckSnapshot_DeleteEventsConfiguration(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateChannelMembership(context.Background(), nil, func(o *Options) { + _, err := svc.DeleteEventsConfiguration(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateChannelMembership") + return testSnapshot(stack, "DeleteEventsConfiguration") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -314,11 +266,11 @@ func TestCheckSnapshot_CreateChannelMembership(t *testing.T) { } } -func TestCheckSnapshot_CreateChannelModerator(t *testing.T) { +func TestCheckSnapshot_DeletePhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateChannelModerator(context.Background(), nil, func(o *Options) { + _, err := svc.DeletePhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateChannelModerator") + return testSnapshot(stack, "DeletePhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -326,11 +278,11 @@ func TestCheckSnapshot_CreateChannelModerator(t *testing.T) { } } -func TestCheckSnapshot_CreateMediaCapturePipeline(t *testing.T) { +func TestCheckSnapshot_DeleteRoom(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateMediaCapturePipeline(context.Background(), nil, func(o *Options) { + _, err := svc.DeleteRoom(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateMediaCapturePipeline") + return testSnapshot(stack, "DeleteRoom") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -338,11 +290,11 @@ func TestCheckSnapshot_CreateMediaCapturePipeline(t *testing.T) { } } -func TestCheckSnapshot_CreateMeeting(t *testing.T) { +func TestCheckSnapshot_DeleteRoomMembership(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateMeeting(context.Background(), nil, func(o *Options) { + _, err := svc.DeleteRoomMembership(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateMeeting") + return testSnapshot(stack, "DeleteRoomMembership") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -350,11 +302,11 @@ func TestCheckSnapshot_CreateMeeting(t *testing.T) { } } -func TestCheckSnapshot_CreateMeetingDialOut(t *testing.T) { +func TestCheckSnapshot_DisassociatePhoneNumberFromUser(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateMeetingDialOut(context.Background(), nil, func(o *Options) { + _, err := svc.DisassociatePhoneNumberFromUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateMeetingDialOut") + return testSnapshot(stack, "DisassociatePhoneNumberFromUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -362,11 +314,11 @@ func TestCheckSnapshot_CreateMeetingDialOut(t *testing.T) { } } -func TestCheckSnapshot_CreateMeetingWithAttendees(t *testing.T) { +func TestCheckSnapshot_DisassociateSigninDelegateGroupsFromAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateMeetingWithAttendees(context.Background(), nil, func(o *Options) { + _, err := svc.DisassociateSigninDelegateGroupsFromAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateMeetingWithAttendees") + return testSnapshot(stack, "DisassociateSigninDelegateGroupsFromAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -374,11 +326,11 @@ func TestCheckSnapshot_CreateMeetingWithAttendees(t *testing.T) { } } -func TestCheckSnapshot_CreatePhoneNumberOrder(t *testing.T) { +func TestCheckSnapshot_GetAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.CreatePhoneNumberOrder(context.Background(), nil, func(o *Options) { + _, err := svc.GetAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreatePhoneNumberOrder") + return testSnapshot(stack, "GetAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -386,11 +338,11 @@ func TestCheckSnapshot_CreatePhoneNumberOrder(t *testing.T) { } } -func TestCheckSnapshot_CreateProxySession(t *testing.T) { +func TestCheckSnapshot_GetAccountSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateProxySession(context.Background(), nil, func(o *Options) { + _, err := svc.GetAccountSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateProxySession") + return testSnapshot(stack, "GetAccountSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -398,11 +350,11 @@ func TestCheckSnapshot_CreateProxySession(t *testing.T) { } } -func TestCheckSnapshot_CreateRoom(t *testing.T) { +func TestCheckSnapshot_GetBot(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateRoom(context.Background(), nil, func(o *Options) { + _, err := svc.GetBot(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateRoom") + return testSnapshot(stack, "GetBot") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -410,11 +362,11 @@ func TestCheckSnapshot_CreateRoom(t *testing.T) { } } -func TestCheckSnapshot_CreateRoomMembership(t *testing.T) { +func TestCheckSnapshot_GetEventsConfiguration(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateRoomMembership(context.Background(), nil, func(o *Options) { + _, err := svc.GetEventsConfiguration(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateRoomMembership") + return testSnapshot(stack, "GetEventsConfiguration") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -422,11 +374,11 @@ func TestCheckSnapshot_CreateRoomMembership(t *testing.T) { } } -func TestCheckSnapshot_CreateSipMediaApplication(t *testing.T) { +func TestCheckSnapshot_GetGlobalSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateSipMediaApplication(context.Background(), nil, func(o *Options) { + _, err := svc.GetGlobalSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateSipMediaApplication") + return testSnapshot(stack, "GetGlobalSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -434,11 +386,11 @@ func TestCheckSnapshot_CreateSipMediaApplication(t *testing.T) { } } -func TestCheckSnapshot_CreateSipMediaApplicationCall(t *testing.T) { +func TestCheckSnapshot_GetPhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateSipMediaApplicationCall(context.Background(), nil, func(o *Options) { + _, err := svc.GetPhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateSipMediaApplicationCall") + return testSnapshot(stack, "GetPhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -446,11 +398,11 @@ func TestCheckSnapshot_CreateSipMediaApplicationCall(t *testing.T) { } } -func TestCheckSnapshot_CreateSipRule(t *testing.T) { +func TestCheckSnapshot_GetPhoneNumberOrder(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateSipRule(context.Background(), nil, func(o *Options) { + _, err := svc.GetPhoneNumberOrder(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateSipRule") + return testSnapshot(stack, "GetPhoneNumberOrder") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -458,11 +410,11 @@ func TestCheckSnapshot_CreateSipRule(t *testing.T) { } } -func TestCheckSnapshot_CreateUser(t *testing.T) { +func TestCheckSnapshot_GetPhoneNumberSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateUser(context.Background(), nil, func(o *Options) { + _, err := svc.GetPhoneNumberSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateUser") + return testSnapshot(stack, "GetPhoneNumberSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -470,11 +422,11 @@ func TestCheckSnapshot_CreateUser(t *testing.T) { } } -func TestCheckSnapshot_CreateVoiceConnector(t *testing.T) { +func TestCheckSnapshot_GetRetentionSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateVoiceConnector(context.Background(), nil, func(o *Options) { + _, err := svc.GetRetentionSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateVoiceConnector") + return testSnapshot(stack, "GetRetentionSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -482,11 +434,11 @@ func TestCheckSnapshot_CreateVoiceConnector(t *testing.T) { } } -func TestCheckSnapshot_CreateVoiceConnectorGroup(t *testing.T) { +func TestCheckSnapshot_GetRoom(t *testing.T) { svc := New(Options{}) - _, err := svc.CreateVoiceConnectorGroup(context.Background(), nil, func(o *Options) { + _, err := svc.GetRoom(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateVoiceConnectorGroup") + return testSnapshot(stack, "GetRoom") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -494,11 +446,11 @@ func TestCheckSnapshot_CreateVoiceConnectorGroup(t *testing.T) { } } -func TestCheckSnapshot_DeleteAccount(t *testing.T) { +func TestCheckSnapshot_GetUser(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteAccount(context.Background(), nil, func(o *Options) { + _, err := svc.GetUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteAccount") + return testSnapshot(stack, "GetUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -506,11 +458,11 @@ func TestCheckSnapshot_DeleteAccount(t *testing.T) { } } -func TestCheckSnapshot_DeleteAppInstance(t *testing.T) { +func TestCheckSnapshot_GetUserSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteAppInstance(context.Background(), nil, func(o *Options) { + _, err := svc.GetUserSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteAppInstance") + return testSnapshot(stack, "GetUserSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -518,11 +470,11 @@ func TestCheckSnapshot_DeleteAppInstance(t *testing.T) { } } -func TestCheckSnapshot_DeleteAppInstanceAdmin(t *testing.T) { +func TestCheckSnapshot_InviteUsers(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteAppInstanceAdmin(context.Background(), nil, func(o *Options) { + _, err := svc.InviteUsers(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteAppInstanceAdmin") + return testSnapshot(stack, "InviteUsers") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -530,11 +482,11 @@ func TestCheckSnapshot_DeleteAppInstanceAdmin(t *testing.T) { } } -func TestCheckSnapshot_DeleteAppInstanceStreamingConfigurations(t *testing.T) { +func TestCheckSnapshot_ListAccounts(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteAppInstanceStreamingConfigurations(context.Background(), nil, func(o *Options) { + _, err := svc.ListAccounts(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteAppInstanceStreamingConfigurations") + return testSnapshot(stack, "ListAccounts") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -542,11 +494,11 @@ func TestCheckSnapshot_DeleteAppInstanceStreamingConfigurations(t *testing.T) { } } -func TestCheckSnapshot_DeleteAppInstanceUser(t *testing.T) { +func TestCheckSnapshot_ListBots(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteAppInstanceUser(context.Background(), nil, func(o *Options) { + _, err := svc.ListBots(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteAppInstanceUser") + return testSnapshot(stack, "ListBots") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -554,11 +506,11 @@ func TestCheckSnapshot_DeleteAppInstanceUser(t *testing.T) { } } -func TestCheckSnapshot_DeleteAttendee(t *testing.T) { +func TestCheckSnapshot_ListPhoneNumberOrders(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteAttendee(context.Background(), nil, func(o *Options) { + _, err := svc.ListPhoneNumberOrders(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteAttendee") + return testSnapshot(stack, "ListPhoneNumberOrders") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -566,11 +518,11 @@ func TestCheckSnapshot_DeleteAttendee(t *testing.T) { } } -func TestCheckSnapshot_DeleteChannel(t *testing.T) { +func TestCheckSnapshot_ListPhoneNumbers(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteChannel(context.Background(), nil, func(o *Options) { + _, err := svc.ListPhoneNumbers(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteChannel") + return testSnapshot(stack, "ListPhoneNumbers") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -578,11 +530,11 @@ func TestCheckSnapshot_DeleteChannel(t *testing.T) { } } -func TestCheckSnapshot_DeleteChannelBan(t *testing.T) { +func TestCheckSnapshot_ListRoomMemberships(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteChannelBan(context.Background(), nil, func(o *Options) { + _, err := svc.ListRoomMemberships(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteChannelBan") + return testSnapshot(stack, "ListRoomMemberships") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -590,11 +542,11 @@ func TestCheckSnapshot_DeleteChannelBan(t *testing.T) { } } -func TestCheckSnapshot_DeleteChannelMembership(t *testing.T) { +func TestCheckSnapshot_ListRooms(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteChannelMembership(context.Background(), nil, func(o *Options) { + _, err := svc.ListRooms(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteChannelMembership") + return testSnapshot(stack, "ListRooms") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -602,11 +554,11 @@ func TestCheckSnapshot_DeleteChannelMembership(t *testing.T) { } } -func TestCheckSnapshot_DeleteChannelMessage(t *testing.T) { +func TestCheckSnapshot_ListSupportedPhoneNumberCountries(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteChannelMessage(context.Background(), nil, func(o *Options) { + _, err := svc.ListSupportedPhoneNumberCountries(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteChannelMessage") + return testSnapshot(stack, "ListSupportedPhoneNumberCountries") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -614,11 +566,11 @@ func TestCheckSnapshot_DeleteChannelMessage(t *testing.T) { } } -func TestCheckSnapshot_DeleteChannelModerator(t *testing.T) { +func TestCheckSnapshot_ListUsers(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteChannelModerator(context.Background(), nil, func(o *Options) { + _, err := svc.ListUsers(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteChannelModerator") + return testSnapshot(stack, "ListUsers") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -626,11 +578,11 @@ func TestCheckSnapshot_DeleteChannelModerator(t *testing.T) { } } -func TestCheckSnapshot_DeleteEventsConfiguration(t *testing.T) { +func TestCheckSnapshot_LogoutUser(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteEventsConfiguration(context.Background(), nil, func(o *Options) { + _, err := svc.LogoutUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteEventsConfiguration") + return testSnapshot(stack, "LogoutUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -638,11 +590,11 @@ func TestCheckSnapshot_DeleteEventsConfiguration(t *testing.T) { } } -func TestCheckSnapshot_DeleteMediaCapturePipeline(t *testing.T) { +func TestCheckSnapshot_PutEventsConfiguration(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteMediaCapturePipeline(context.Background(), nil, func(o *Options) { + _, err := svc.PutEventsConfiguration(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteMediaCapturePipeline") + return testSnapshot(stack, "PutEventsConfiguration") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -650,11 +602,11 @@ func TestCheckSnapshot_DeleteMediaCapturePipeline(t *testing.T) { } } -func TestCheckSnapshot_DeleteMeeting(t *testing.T) { +func TestCheckSnapshot_PutRetentionSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteMeeting(context.Background(), nil, func(o *Options) { + _, err := svc.PutRetentionSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteMeeting") + return testSnapshot(stack, "PutRetentionSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -662,11 +614,11 @@ func TestCheckSnapshot_DeleteMeeting(t *testing.T) { } } -func TestCheckSnapshot_DeletePhoneNumber(t *testing.T) { +func TestCheckSnapshot_RedactConversationMessage(t *testing.T) { svc := New(Options{}) - _, err := svc.DeletePhoneNumber(context.Background(), nil, func(o *Options) { + _, err := svc.RedactConversationMessage(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeletePhoneNumber") + return testSnapshot(stack, "RedactConversationMessage") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -674,11 +626,11 @@ func TestCheckSnapshot_DeletePhoneNumber(t *testing.T) { } } -func TestCheckSnapshot_DeleteProxySession(t *testing.T) { +func TestCheckSnapshot_RedactRoomMessage(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteProxySession(context.Background(), nil, func(o *Options) { + _, err := svc.RedactRoomMessage(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteProxySession") + return testSnapshot(stack, "RedactRoomMessage") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -686,11 +638,11 @@ func TestCheckSnapshot_DeleteProxySession(t *testing.T) { } } -func TestCheckSnapshot_DeleteRoom(t *testing.T) { +func TestCheckSnapshot_RegenerateSecurityToken(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteRoom(context.Background(), nil, func(o *Options) { + _, err := svc.RegenerateSecurityToken(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteRoom") + return testSnapshot(stack, "RegenerateSecurityToken") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -698,11 +650,11 @@ func TestCheckSnapshot_DeleteRoom(t *testing.T) { } } -func TestCheckSnapshot_DeleteRoomMembership(t *testing.T) { +func TestCheckSnapshot_ResetPersonalPIN(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteRoomMembership(context.Background(), nil, func(o *Options) { + _, err := svc.ResetPersonalPIN(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteRoomMembership") + return testSnapshot(stack, "ResetPersonalPIN") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -710,11 +662,11 @@ func TestCheckSnapshot_DeleteRoomMembership(t *testing.T) { } } -func TestCheckSnapshot_DeleteSipMediaApplication(t *testing.T) { +func TestCheckSnapshot_RestorePhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteSipMediaApplication(context.Background(), nil, func(o *Options) { + _, err := svc.RestorePhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteSipMediaApplication") + return testSnapshot(stack, "RestorePhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -722,11 +674,11 @@ func TestCheckSnapshot_DeleteSipMediaApplication(t *testing.T) { } } -func TestCheckSnapshot_DeleteSipRule(t *testing.T) { +func TestCheckSnapshot_SearchAvailablePhoneNumbers(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteSipRule(context.Background(), nil, func(o *Options) { + _, err := svc.SearchAvailablePhoneNumbers(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteSipRule") + return testSnapshot(stack, "SearchAvailablePhoneNumbers") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -734,11 +686,11 @@ func TestCheckSnapshot_DeleteSipRule(t *testing.T) { } } -func TestCheckSnapshot_DeleteVoiceConnector(t *testing.T) { +func TestCheckSnapshot_UpdateAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteVoiceConnector(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteVoiceConnector") + return testSnapshot(stack, "UpdateAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -746,11 +698,11 @@ func TestCheckSnapshot_DeleteVoiceConnector(t *testing.T) { } } -func TestCheckSnapshot_DeleteVoiceConnectorEmergencyCallingConfiguration(t *testing.T) { +func TestCheckSnapshot_UpdateAccountSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorEmergencyCallingConfiguration(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateAccountSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteVoiceConnectorEmergencyCallingConfiguration") + return testSnapshot(stack, "UpdateAccountSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -758,11 +710,11 @@ func TestCheckSnapshot_DeleteVoiceConnectorEmergencyCallingConfiguration(t *test } } -func TestCheckSnapshot_DeleteVoiceConnectorGroup(t *testing.T) { +func TestCheckSnapshot_UpdateBot(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorGroup(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateBot(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteVoiceConnectorGroup") + return testSnapshot(stack, "UpdateBot") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -770,11 +722,11 @@ func TestCheckSnapshot_DeleteVoiceConnectorGroup(t *testing.T) { } } -func TestCheckSnapshot_DeleteVoiceConnectorOrigination(t *testing.T) { +func TestCheckSnapshot_UpdateGlobalSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorOrigination(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateGlobalSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteVoiceConnectorOrigination") + return testSnapshot(stack, "UpdateGlobalSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -782,11 +734,11 @@ func TestCheckSnapshot_DeleteVoiceConnectorOrigination(t *testing.T) { } } -func TestCheckSnapshot_DeleteVoiceConnectorProxy(t *testing.T) { +func TestCheckSnapshot_UpdatePhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorProxy(context.Background(), nil, func(o *Options) { + _, err := svc.UpdatePhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteVoiceConnectorProxy") + return testSnapshot(stack, "UpdatePhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -794,11 +746,11 @@ func TestCheckSnapshot_DeleteVoiceConnectorProxy(t *testing.T) { } } -func TestCheckSnapshot_DeleteVoiceConnectorStreamingConfiguration(t *testing.T) { +func TestCheckSnapshot_UpdatePhoneNumberSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorStreamingConfiguration(context.Background(), nil, func(o *Options) { + _, err := svc.UpdatePhoneNumberSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteVoiceConnectorStreamingConfiguration") + return testSnapshot(stack, "UpdatePhoneNumberSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -806,11 +758,11 @@ func TestCheckSnapshot_DeleteVoiceConnectorStreamingConfiguration(t *testing.T) } } -func TestCheckSnapshot_DeleteVoiceConnectorTermination(t *testing.T) { +func TestCheckSnapshot_UpdateRoom(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorTermination(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateRoom(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteVoiceConnectorTermination") + return testSnapshot(stack, "UpdateRoom") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -818,11 +770,11 @@ func TestCheckSnapshot_DeleteVoiceConnectorTermination(t *testing.T) { } } -func TestCheckSnapshot_DeleteVoiceConnectorTerminationCredentials(t *testing.T) { +func TestCheckSnapshot_UpdateRoomMembership(t *testing.T) { svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorTerminationCredentials(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateRoomMembership(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteVoiceConnectorTerminationCredentials") + return testSnapshot(stack, "UpdateRoomMembership") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -830,11 +782,11 @@ func TestCheckSnapshot_DeleteVoiceConnectorTerminationCredentials(t *testing.T) } } -func TestCheckSnapshot_DescribeAppInstance(t *testing.T) { +func TestCheckSnapshot_UpdateUser(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeAppInstance(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeAppInstance") + return testSnapshot(stack, "UpdateUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -842,23 +794,22 @@ func TestCheckSnapshot_DescribeAppInstance(t *testing.T) { } } -func TestCheckSnapshot_DescribeAppInstanceAdmin(t *testing.T) { +func TestCheckSnapshot_UpdateUserSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeAppInstanceAdmin(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateUserSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeAppInstanceAdmin") + return testSnapshot(stack, "UpdateUserSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { t.Fatal(err) } } - -func TestCheckSnapshot_DescribeAppInstanceUser(t *testing.T) { +func TestUpdateSnapshot_AssociatePhoneNumberWithUser(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeAppInstanceUser(context.Background(), nil, func(o *Options) { + _, err := svc.AssociatePhoneNumberWithUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeAppInstanceUser") + return updateSnapshot(stack, "AssociatePhoneNumberWithUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -866,11 +817,11 @@ func TestCheckSnapshot_DescribeAppInstanceUser(t *testing.T) { } } -func TestCheckSnapshot_DescribeChannel(t *testing.T) { +func TestUpdateSnapshot_AssociateSigninDelegateGroupsWithAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeChannel(context.Background(), nil, func(o *Options) { + _, err := svc.AssociateSigninDelegateGroupsWithAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeChannel") + return updateSnapshot(stack, "AssociateSigninDelegateGroupsWithAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -878,11 +829,11 @@ func TestCheckSnapshot_DescribeChannel(t *testing.T) { } } -func TestCheckSnapshot_DescribeChannelBan(t *testing.T) { +func TestUpdateSnapshot_BatchCreateRoomMembership(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeChannelBan(context.Background(), nil, func(o *Options) { + _, err := svc.BatchCreateRoomMembership(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeChannelBan") + return updateSnapshot(stack, "BatchCreateRoomMembership") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -890,11 +841,11 @@ func TestCheckSnapshot_DescribeChannelBan(t *testing.T) { } } -func TestCheckSnapshot_DescribeChannelMembership(t *testing.T) { +func TestUpdateSnapshot_BatchDeletePhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeChannelMembership(context.Background(), nil, func(o *Options) { + _, err := svc.BatchDeletePhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeChannelMembership") + return updateSnapshot(stack, "BatchDeletePhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -902,11 +853,11 @@ func TestCheckSnapshot_DescribeChannelMembership(t *testing.T) { } } -func TestCheckSnapshot_DescribeChannelMembershipForAppInstanceUser(t *testing.T) { +func TestUpdateSnapshot_BatchSuspendUser(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeChannelMembershipForAppInstanceUser(context.Background(), nil, func(o *Options) { + _, err := svc.BatchSuspendUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeChannelMembershipForAppInstanceUser") + return updateSnapshot(stack, "BatchSuspendUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -914,11 +865,11 @@ func TestCheckSnapshot_DescribeChannelMembershipForAppInstanceUser(t *testing.T) } } -func TestCheckSnapshot_DescribeChannelModeratedByAppInstanceUser(t *testing.T) { +func TestUpdateSnapshot_BatchUnsuspendUser(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeChannelModeratedByAppInstanceUser(context.Background(), nil, func(o *Options) { + _, err := svc.BatchUnsuspendUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeChannelModeratedByAppInstanceUser") + return updateSnapshot(stack, "BatchUnsuspendUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -926,11 +877,11 @@ func TestCheckSnapshot_DescribeChannelModeratedByAppInstanceUser(t *testing.T) { } } -func TestCheckSnapshot_DescribeChannelModerator(t *testing.T) { +func TestUpdateSnapshot_BatchUpdatePhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.DescribeChannelModerator(context.Background(), nil, func(o *Options) { + _, err := svc.BatchUpdatePhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeChannelModerator") + return updateSnapshot(stack, "BatchUpdatePhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -938,11 +889,11 @@ func TestCheckSnapshot_DescribeChannelModerator(t *testing.T) { } } -func TestCheckSnapshot_DisassociatePhoneNumberFromUser(t *testing.T) { +func TestUpdateSnapshot_BatchUpdateUser(t *testing.T) { svc := New(Options{}) - _, err := svc.DisassociatePhoneNumberFromUser(context.Background(), nil, func(o *Options) { + _, err := svc.BatchUpdateUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DisassociatePhoneNumberFromUser") + return updateSnapshot(stack, "BatchUpdateUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -950,2974 +901,11 @@ func TestCheckSnapshot_DisassociatePhoneNumberFromUser(t *testing.T) { } } -func TestCheckSnapshot_DisassociatePhoneNumbersFromVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociatePhoneNumbersFromVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DisassociatePhoneNumbersFromVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DisassociatePhoneNumbersFromVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociatePhoneNumbersFromVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DisassociatePhoneNumbersFromVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DisassociateSigninDelegateGroupsFromAccount(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociateSigninDelegateGroupsFromAccount(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DisassociateSigninDelegateGroupsFromAccount") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetAccount(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAccount(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetAccount") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetAccountSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAccountSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetAccountSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetAppInstanceRetentionSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAppInstanceRetentionSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetAppInstanceRetentionSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetAppInstanceStreamingConfigurations(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAppInstanceStreamingConfigurations(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetAppInstanceStreamingConfigurations") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetAttendee(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAttendee(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetAttendee") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetBot(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetBot(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetBot") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetChannelMessage(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetChannelMessage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetChannelMessage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetEventsConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetEventsConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetEventsConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetGlobalSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetGlobalSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetGlobalSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetMediaCapturePipeline(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetMediaCapturePipeline(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetMediaCapturePipeline") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetMeeting(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetMeeting(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetMeeting") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetMessagingSessionEndpoint(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetMessagingSessionEndpoint(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetMessagingSessionEndpoint") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetPhoneNumber(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetPhoneNumber(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetPhoneNumber") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetPhoneNumberOrder(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetPhoneNumberOrder(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetPhoneNumberOrder") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetPhoneNumberSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetPhoneNumberSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetPhoneNumberSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetProxySession(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetProxySession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetProxySession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetRetentionSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetRetentionSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetRetentionSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetRoom(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetRoom(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetRoom") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetSipMediaApplication(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetSipMediaApplication(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetSipMediaApplication") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetSipMediaApplicationLoggingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetSipMediaApplicationLoggingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetSipMediaApplicationLoggingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetSipRule(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetSipRule(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetSipRule") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetUserSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetUserSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetUserSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnectorEmergencyCallingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorEmergencyCallingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnectorEmergencyCallingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnectorLoggingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorLoggingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnectorLoggingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnectorOrigination(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorOrigination(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnectorOrigination") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnectorProxy(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorProxy(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnectorProxy") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnectorStreamingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorStreamingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnectorStreamingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnectorTermination(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorTermination(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnectorTermination") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_GetVoiceConnectorTerminationHealth(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorTerminationHealth(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "GetVoiceConnectorTerminationHealth") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_InviteUsers(t *testing.T) { - svc := New(Options{}) - _, err := svc.InviteUsers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "InviteUsers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListAccounts(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAccounts(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListAccounts") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListAppInstanceAdmins(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAppInstanceAdmins(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListAppInstanceAdmins") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListAppInstances(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAppInstances(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListAppInstances") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListAppInstanceUsers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAppInstanceUsers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListAppInstanceUsers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListAttendees(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAttendees(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListAttendees") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListAttendeeTags(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAttendeeTags(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListAttendeeTags") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListBots(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListBots(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListBots") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListChannelBans(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelBans(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListChannelBans") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListChannelMemberships(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelMemberships(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListChannelMemberships") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListChannelMembershipsForAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelMembershipsForAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListChannelMembershipsForAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListChannelMessages(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelMessages(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListChannelMessages") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListChannelModerators(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelModerators(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListChannelModerators") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListChannels(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannels(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListChannels") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListChannelsModeratedByAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelsModeratedByAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListChannelsModeratedByAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListMediaCapturePipelines(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListMediaCapturePipelines(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListMediaCapturePipelines") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListMeetings(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListMeetings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListMeetings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListMeetingTags(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListMeetingTags(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListMeetingTags") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListPhoneNumberOrders(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListPhoneNumberOrders(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListPhoneNumberOrders") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListPhoneNumbers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListPhoneNumbers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListPhoneNumbers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListProxySessions(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListProxySessions(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListProxySessions") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListRoomMemberships(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListRoomMemberships(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListRoomMemberships") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListRooms(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListRooms(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListRooms") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListSipMediaApplications(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListSipMediaApplications(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListSipMediaApplications") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListSipRules(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListSipRules(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListSipRules") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListSupportedPhoneNumberCountries(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListSupportedPhoneNumberCountries(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListSupportedPhoneNumberCountries") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListTagsForResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListTagsForResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListUsers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListUsers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListUsers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListVoiceConnectorGroups(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListVoiceConnectorGroups(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListVoiceConnectorGroups") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListVoiceConnectors(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListVoiceConnectors(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListVoiceConnectors") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListVoiceConnectorTerminationCredentials(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListVoiceConnectorTerminationCredentials(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListVoiceConnectorTerminationCredentials") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_LogoutUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.LogoutUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "LogoutUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutAppInstanceRetentionSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutAppInstanceRetentionSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutAppInstanceRetentionSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutAppInstanceStreamingConfigurations(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutAppInstanceStreamingConfigurations(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutAppInstanceStreamingConfigurations") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutEventsConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutEventsConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutEventsConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutRetentionSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutRetentionSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutRetentionSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutSipMediaApplicationLoggingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutSipMediaApplicationLoggingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutSipMediaApplicationLoggingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutVoiceConnectorEmergencyCallingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutVoiceConnectorEmergencyCallingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutVoiceConnectorEmergencyCallingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutVoiceConnectorLoggingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutVoiceConnectorLoggingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutVoiceConnectorLoggingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutVoiceConnectorOrigination(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutVoiceConnectorOrigination(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutVoiceConnectorOrigination") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutVoiceConnectorProxy(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutVoiceConnectorProxy(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutVoiceConnectorProxy") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutVoiceConnectorStreamingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutVoiceConnectorStreamingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutVoiceConnectorStreamingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutVoiceConnectorTermination(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutVoiceConnectorTermination(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutVoiceConnectorTermination") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_PutVoiceConnectorTerminationCredentials(t *testing.T) { - svc := New(Options{}) - _, err := svc.PutVoiceConnectorTerminationCredentials(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "PutVoiceConnectorTerminationCredentials") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_RedactChannelMessage(t *testing.T) { - svc := New(Options{}) - _, err := svc.RedactChannelMessage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "RedactChannelMessage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_RedactConversationMessage(t *testing.T) { - svc := New(Options{}) - _, err := svc.RedactConversationMessage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "RedactConversationMessage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_RedactRoomMessage(t *testing.T) { - svc := New(Options{}) - _, err := svc.RedactRoomMessage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "RedactRoomMessage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_RegenerateSecurityToken(t *testing.T) { - svc := New(Options{}) - _, err := svc.RegenerateSecurityToken(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "RegenerateSecurityToken") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ResetPersonalPIN(t *testing.T) { - svc := New(Options{}) - _, err := svc.ResetPersonalPIN(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ResetPersonalPIN") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_RestorePhoneNumber(t *testing.T) { - svc := New(Options{}) - _, err := svc.RestorePhoneNumber(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "RestorePhoneNumber") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_SearchAvailablePhoneNumbers(t *testing.T) { - svc := New(Options{}) - _, err := svc.SearchAvailablePhoneNumbers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "SearchAvailablePhoneNumbers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_SendChannelMessage(t *testing.T) { - svc := New(Options{}) - _, err := svc.SendChannelMessage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "SendChannelMessage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_StartMeetingTranscription(t *testing.T) { - svc := New(Options{}) - _, err := svc.StartMeetingTranscription(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "StartMeetingTranscription") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_StopMeetingTranscription(t *testing.T) { - svc := New(Options{}) - _, err := svc.StopMeetingTranscription(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "StopMeetingTranscription") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_TagAttendee(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagAttendee(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "TagAttendee") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_TagMeeting(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagMeeting(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "TagMeeting") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_TagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "TagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UntagAttendee(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagAttendee(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UntagAttendee") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UntagMeeting(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagMeeting(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UntagMeeting") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UntagResource(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UntagResource") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateAccount(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateAccount(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateAccount") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateAccountSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateAccountSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateAccountSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateAppInstance(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateAppInstance(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateAppInstance") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateBot(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateBot(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateBot") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateChannel(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateChannel(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateChannel") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateChannelMessage(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateChannelMessage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateChannelMessage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateChannelReadMarker(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateChannelReadMarker(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateChannelReadMarker") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateGlobalSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateGlobalSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateGlobalSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdatePhoneNumber(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdatePhoneNumber(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdatePhoneNumber") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdatePhoneNumberSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdatePhoneNumberSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdatePhoneNumberSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateProxySession(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateProxySession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateProxySession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateRoom(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateRoom(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateRoom") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateRoomMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateRoomMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateRoomMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateSipMediaApplication(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateSipMediaApplication(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateSipMediaApplication") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateSipMediaApplicationCall(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateSipMediaApplicationCall(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateSipMediaApplicationCall") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateSipRule(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateSipRule(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateSipRule") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateUserSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateUserSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateUserSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ValidateE911Address(t *testing.T) { - svc := New(Options{}) - _, err := svc.ValidateE911Address(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ValidateE911Address") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} -func TestUpdateSnapshot_AssociatePhoneNumbersWithVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.AssociatePhoneNumbersWithVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "AssociatePhoneNumbersWithVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_AssociatePhoneNumbersWithVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.AssociatePhoneNumbersWithVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "AssociatePhoneNumbersWithVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_AssociatePhoneNumberWithUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.AssociatePhoneNumberWithUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "AssociatePhoneNumberWithUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_AssociateSigninDelegateGroupsWithAccount(t *testing.T) { - svc := New(Options{}) - _, err := svc.AssociateSigninDelegateGroupsWithAccount(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "AssociateSigninDelegateGroupsWithAccount") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchCreateAttendee(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchCreateAttendee(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchCreateAttendee") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchCreateChannelMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchCreateChannelMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchCreateChannelMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchCreateRoomMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchCreateRoomMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchCreateRoomMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchDeletePhoneNumber(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchDeletePhoneNumber(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchDeletePhoneNumber") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchSuspendUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchSuspendUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchSuspendUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchUnsuspendUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchUnsuspendUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchUnsuspendUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchUpdatePhoneNumber(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchUpdatePhoneNumber(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchUpdatePhoneNumber") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_BatchUpdateUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.BatchUpdateUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "BatchUpdateUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateAccount(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateAccount(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateAccount") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateAppInstance(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateAppInstance(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateAppInstance") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateAppInstanceAdmin(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateAppInstanceAdmin(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateAppInstanceAdmin") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateAttendee(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateAttendee(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateAttendee") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateBot(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateBot(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateBot") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateChannel(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateChannel(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateChannel") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateChannelBan(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateChannelBan(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateChannelBan") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateChannelMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateChannelMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateChannelMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateChannelModerator(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateChannelModerator(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateChannelModerator") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateMediaCapturePipeline(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateMediaCapturePipeline(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateMediaCapturePipeline") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateMeeting(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateMeeting(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateMeeting") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateMeetingDialOut(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateMeetingDialOut(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateMeetingDialOut") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateMeetingWithAttendees(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateMeetingWithAttendees(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateMeetingWithAttendees") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreatePhoneNumberOrder(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreatePhoneNumberOrder(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreatePhoneNumberOrder") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateProxySession(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateProxySession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateProxySession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateRoom(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateRoom(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateRoom") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateRoomMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateRoomMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateRoomMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateSipMediaApplication(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateSipMediaApplication(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateSipMediaApplication") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateSipMediaApplicationCall(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateSipMediaApplicationCall(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateSipMediaApplicationCall") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateSipRule(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateSipRule(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateSipRule") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteAccount(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteAccount(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteAccount") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteAppInstance(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteAppInstance(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteAppInstance") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteAppInstanceAdmin(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteAppInstanceAdmin(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteAppInstanceAdmin") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteAppInstanceStreamingConfigurations(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteAppInstanceStreamingConfigurations(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteAppInstanceStreamingConfigurations") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteAttendee(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteAttendee(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteAttendee") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteChannel(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteChannel(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteChannel") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteChannelBan(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteChannelBan(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteChannelBan") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteChannelMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteChannelMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteChannelMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteChannelMessage(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteChannelMessage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteChannelMessage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteChannelModerator(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteChannelModerator(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteChannelModerator") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteEventsConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteEventsConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteEventsConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteMediaCapturePipeline(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteMediaCapturePipeline(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteMediaCapturePipeline") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteMeeting(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteMeeting(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteMeeting") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeletePhoneNumber(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeletePhoneNumber(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeletePhoneNumber") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteProxySession(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteProxySession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteProxySession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteRoom(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteRoom(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteRoom") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteRoomMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteRoomMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteRoomMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteSipMediaApplication(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteSipMediaApplication(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteSipMediaApplication") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteSipRule(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteSipRule(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteSipRule") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteVoiceConnectorEmergencyCallingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorEmergencyCallingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteVoiceConnectorEmergencyCallingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteVoiceConnectorOrigination(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorOrigination(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteVoiceConnectorOrigination") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteVoiceConnectorProxy(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorProxy(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteVoiceConnectorProxy") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteVoiceConnectorStreamingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorStreamingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteVoiceConnectorStreamingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteVoiceConnectorTermination(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorTermination(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteVoiceConnectorTermination") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteVoiceConnectorTerminationCredentials(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteVoiceConnectorTerminationCredentials(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteVoiceConnectorTerminationCredentials") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeAppInstance(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeAppInstance(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeAppInstance") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeAppInstanceAdmin(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeAppInstanceAdmin(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeAppInstanceAdmin") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeChannel(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeChannel(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeChannel") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeChannelBan(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeChannelBan(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeChannelBan") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeChannelMembership(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeChannelMembership(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeChannelMembership") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeChannelMembershipForAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeChannelMembershipForAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeChannelMembershipForAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeChannelModeratedByAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeChannelModeratedByAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeChannelModeratedByAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeChannelModerator(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeChannelModerator(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeChannelModerator") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DisassociatePhoneNumberFromUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociatePhoneNumberFromUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DisassociatePhoneNumberFromUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DisassociatePhoneNumbersFromVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociatePhoneNumbersFromVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DisassociatePhoneNumbersFromVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DisassociatePhoneNumbersFromVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociatePhoneNumbersFromVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DisassociatePhoneNumbersFromVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DisassociateSigninDelegateGroupsFromAccount(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociateSigninDelegateGroupsFromAccount(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DisassociateSigninDelegateGroupsFromAccount") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetAccount(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAccount(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetAccount") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetAccountSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAccountSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetAccountSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetAppInstanceRetentionSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAppInstanceRetentionSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetAppInstanceRetentionSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetAppInstanceStreamingConfigurations(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAppInstanceStreamingConfigurations(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetAppInstanceStreamingConfigurations") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetAttendee(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetAttendee(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetAttendee") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetBot(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetBot(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetBot") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetChannelMessage(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetChannelMessage(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetChannelMessage") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetEventsConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetEventsConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetEventsConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetGlobalSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetGlobalSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetGlobalSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetMediaCapturePipeline(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetMediaCapturePipeline(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetMediaCapturePipeline") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetMeeting(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetMeeting(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetMeeting") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetMessagingSessionEndpoint(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetMessagingSessionEndpoint(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetMessagingSessionEndpoint") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetPhoneNumber(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetPhoneNumber(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetPhoneNumber") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetPhoneNumberOrder(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetPhoneNumberOrder(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetPhoneNumberOrder") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetPhoneNumberSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetPhoneNumberSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetPhoneNumberSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetProxySession(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetProxySession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetProxySession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetRetentionSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetRetentionSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetRetentionSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetRoom(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetRoom(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetRoom") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetSipMediaApplication(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetSipMediaApplication(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetSipMediaApplication") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetSipMediaApplicationLoggingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetSipMediaApplicationLoggingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetSipMediaApplicationLoggingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetSipRule(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetSipRule(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetSipRule") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetUserSettings(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetUserSettings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetUserSettings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnectorEmergencyCallingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorEmergencyCallingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnectorEmergencyCallingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnectorLoggingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorLoggingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnectorLoggingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnectorOrigination(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorOrigination(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnectorOrigination") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnectorProxy(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorProxy(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnectorProxy") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnectorStreamingConfiguration(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorStreamingConfiguration(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnectorStreamingConfiguration") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnectorTermination(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorTermination(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnectorTermination") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_GetVoiceConnectorTerminationHealth(t *testing.T) { - svc := New(Options{}) - _, err := svc.GetVoiceConnectorTerminationHealth(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "GetVoiceConnectorTerminationHealth") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_InviteUsers(t *testing.T) { - svc := New(Options{}) - _, err := svc.InviteUsers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "InviteUsers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListAccounts(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAccounts(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListAccounts") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListAppInstanceAdmins(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAppInstanceAdmins(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListAppInstanceAdmins") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListAppInstances(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAppInstances(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListAppInstances") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListAppInstanceUsers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAppInstanceUsers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListAppInstanceUsers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListAttendees(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAttendees(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListAttendees") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListAttendeeTags(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListAttendeeTags(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListAttendeeTags") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListBots(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListBots(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListBots") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListChannelBans(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelBans(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListChannelBans") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListChannelMemberships(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelMemberships(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListChannelMemberships") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListChannelMembershipsForAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelMembershipsForAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListChannelMembershipsForAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListChannelMessages(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelMessages(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListChannelMessages") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListChannelModerators(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelModerators(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListChannelModerators") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListChannels(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannels(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListChannels") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListChannelsModeratedByAppInstanceUser(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListChannelsModeratedByAppInstanceUser(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListChannelsModeratedByAppInstanceUser") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListMediaCapturePipelines(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListMediaCapturePipelines(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListMediaCapturePipelines") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListMeetings(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListMeetings(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListMeetings") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListMeetingTags(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListMeetingTags(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListMeetingTags") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListPhoneNumberOrders(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListPhoneNumberOrders(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListPhoneNumberOrders") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListPhoneNumbers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListPhoneNumbers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListPhoneNumbers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListProxySessions(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListProxySessions(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListProxySessions") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListRoomMemberships(t *testing.T) { +func TestUpdateSnapshot_CreateAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.ListRoomMemberships(context.Background(), nil, func(o *Options) { + _, err := svc.CreateAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListRoomMemberships") + return updateSnapshot(stack, "CreateAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -3925,11 +913,11 @@ func TestUpdateSnapshot_ListRoomMemberships(t *testing.T) { } } -func TestUpdateSnapshot_ListRooms(t *testing.T) { +func TestUpdateSnapshot_CreateBot(t *testing.T) { svc := New(Options{}) - _, err := svc.ListRooms(context.Background(), nil, func(o *Options) { + _, err := svc.CreateBot(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListRooms") + return updateSnapshot(stack, "CreateBot") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -3937,11 +925,11 @@ func TestUpdateSnapshot_ListRooms(t *testing.T) { } } -func TestUpdateSnapshot_ListSipMediaApplications(t *testing.T) { +func TestUpdateSnapshot_CreateMeetingDialOut(t *testing.T) { svc := New(Options{}) - _, err := svc.ListSipMediaApplications(context.Background(), nil, func(o *Options) { + _, err := svc.CreateMeetingDialOut(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListSipMediaApplications") + return updateSnapshot(stack, "CreateMeetingDialOut") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -3949,11 +937,11 @@ func TestUpdateSnapshot_ListSipMediaApplications(t *testing.T) { } } -func TestUpdateSnapshot_ListSipRules(t *testing.T) { +func TestUpdateSnapshot_CreatePhoneNumberOrder(t *testing.T) { svc := New(Options{}) - _, err := svc.ListSipRules(context.Background(), nil, func(o *Options) { + _, err := svc.CreatePhoneNumberOrder(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListSipRules") + return updateSnapshot(stack, "CreatePhoneNumberOrder") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -3961,11 +949,11 @@ func TestUpdateSnapshot_ListSipRules(t *testing.T) { } } -func TestUpdateSnapshot_ListSupportedPhoneNumberCountries(t *testing.T) { +func TestUpdateSnapshot_CreateRoom(t *testing.T) { svc := New(Options{}) - _, err := svc.ListSupportedPhoneNumberCountries(context.Background(), nil, func(o *Options) { + _, err := svc.CreateRoom(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListSupportedPhoneNumberCountries") + return updateSnapshot(stack, "CreateRoom") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -3973,11 +961,11 @@ func TestUpdateSnapshot_ListSupportedPhoneNumberCountries(t *testing.T) { } } -func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { +func TestUpdateSnapshot_CreateRoomMembership(t *testing.T) { svc := New(Options{}) - _, err := svc.ListTagsForResource(context.Background(), nil, func(o *Options) { + _, err := svc.CreateRoomMembership(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListTagsForResource") + return updateSnapshot(stack, "CreateRoomMembership") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -3985,11 +973,11 @@ func TestUpdateSnapshot_ListTagsForResource(t *testing.T) { } } -func TestUpdateSnapshot_ListUsers(t *testing.T) { +func TestUpdateSnapshot_CreateUser(t *testing.T) { svc := New(Options{}) - _, err := svc.ListUsers(context.Background(), nil, func(o *Options) { + _, err := svc.CreateUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListUsers") + return updateSnapshot(stack, "CreateUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -3997,11 +985,11 @@ func TestUpdateSnapshot_ListUsers(t *testing.T) { } } -func TestUpdateSnapshot_ListVoiceConnectorGroups(t *testing.T) { +func TestUpdateSnapshot_DeleteAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.ListVoiceConnectorGroups(context.Background(), nil, func(o *Options) { + _, err := svc.DeleteAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListVoiceConnectorGroups") + return updateSnapshot(stack, "DeleteAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4009,11 +997,11 @@ func TestUpdateSnapshot_ListVoiceConnectorGroups(t *testing.T) { } } -func TestUpdateSnapshot_ListVoiceConnectors(t *testing.T) { +func TestUpdateSnapshot_DeleteEventsConfiguration(t *testing.T) { svc := New(Options{}) - _, err := svc.ListVoiceConnectors(context.Background(), nil, func(o *Options) { + _, err := svc.DeleteEventsConfiguration(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListVoiceConnectors") + return updateSnapshot(stack, "DeleteEventsConfiguration") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4021,11 +1009,11 @@ func TestUpdateSnapshot_ListVoiceConnectors(t *testing.T) { } } -func TestUpdateSnapshot_ListVoiceConnectorTerminationCredentials(t *testing.T) { +func TestUpdateSnapshot_DeletePhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.ListVoiceConnectorTerminationCredentials(context.Background(), nil, func(o *Options) { + _, err := svc.DeletePhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListVoiceConnectorTerminationCredentials") + return updateSnapshot(stack, "DeletePhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4033,11 +1021,11 @@ func TestUpdateSnapshot_ListVoiceConnectorTerminationCredentials(t *testing.T) { } } -func TestUpdateSnapshot_LogoutUser(t *testing.T) { +func TestUpdateSnapshot_DeleteRoom(t *testing.T) { svc := New(Options{}) - _, err := svc.LogoutUser(context.Background(), nil, func(o *Options) { + _, err := svc.DeleteRoom(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "LogoutUser") + return updateSnapshot(stack, "DeleteRoom") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4045,11 +1033,11 @@ func TestUpdateSnapshot_LogoutUser(t *testing.T) { } } -func TestUpdateSnapshot_PutAppInstanceRetentionSettings(t *testing.T) { +func TestUpdateSnapshot_DeleteRoomMembership(t *testing.T) { svc := New(Options{}) - _, err := svc.PutAppInstanceRetentionSettings(context.Background(), nil, func(o *Options) { + _, err := svc.DeleteRoomMembership(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutAppInstanceRetentionSettings") + return updateSnapshot(stack, "DeleteRoomMembership") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4057,11 +1045,11 @@ func TestUpdateSnapshot_PutAppInstanceRetentionSettings(t *testing.T) { } } -func TestUpdateSnapshot_PutAppInstanceStreamingConfigurations(t *testing.T) { +func TestUpdateSnapshot_DisassociatePhoneNumberFromUser(t *testing.T) { svc := New(Options{}) - _, err := svc.PutAppInstanceStreamingConfigurations(context.Background(), nil, func(o *Options) { + _, err := svc.DisassociatePhoneNumberFromUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutAppInstanceStreamingConfigurations") + return updateSnapshot(stack, "DisassociatePhoneNumberFromUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4069,11 +1057,11 @@ func TestUpdateSnapshot_PutAppInstanceStreamingConfigurations(t *testing.T) { } } -func TestUpdateSnapshot_PutEventsConfiguration(t *testing.T) { +func TestUpdateSnapshot_DisassociateSigninDelegateGroupsFromAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.PutEventsConfiguration(context.Background(), nil, func(o *Options) { + _, err := svc.DisassociateSigninDelegateGroupsFromAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutEventsConfiguration") + return updateSnapshot(stack, "DisassociateSigninDelegateGroupsFromAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4081,11 +1069,11 @@ func TestUpdateSnapshot_PutEventsConfiguration(t *testing.T) { } } -func TestUpdateSnapshot_PutRetentionSettings(t *testing.T) { +func TestUpdateSnapshot_GetAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.PutRetentionSettings(context.Background(), nil, func(o *Options) { + _, err := svc.GetAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutRetentionSettings") + return updateSnapshot(stack, "GetAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4093,11 +1081,11 @@ func TestUpdateSnapshot_PutRetentionSettings(t *testing.T) { } } -func TestUpdateSnapshot_PutSipMediaApplicationLoggingConfiguration(t *testing.T) { +func TestUpdateSnapshot_GetAccountSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.PutSipMediaApplicationLoggingConfiguration(context.Background(), nil, func(o *Options) { + _, err := svc.GetAccountSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutSipMediaApplicationLoggingConfiguration") + return updateSnapshot(stack, "GetAccountSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4105,11 +1093,11 @@ func TestUpdateSnapshot_PutSipMediaApplicationLoggingConfiguration(t *testing.T) } } -func TestUpdateSnapshot_PutVoiceConnectorEmergencyCallingConfiguration(t *testing.T) { +func TestUpdateSnapshot_GetBot(t *testing.T) { svc := New(Options{}) - _, err := svc.PutVoiceConnectorEmergencyCallingConfiguration(context.Background(), nil, func(o *Options) { + _, err := svc.GetBot(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutVoiceConnectorEmergencyCallingConfiguration") + return updateSnapshot(stack, "GetBot") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4117,11 +1105,11 @@ func TestUpdateSnapshot_PutVoiceConnectorEmergencyCallingConfiguration(t *testin } } -func TestUpdateSnapshot_PutVoiceConnectorLoggingConfiguration(t *testing.T) { +func TestUpdateSnapshot_GetEventsConfiguration(t *testing.T) { svc := New(Options{}) - _, err := svc.PutVoiceConnectorLoggingConfiguration(context.Background(), nil, func(o *Options) { + _, err := svc.GetEventsConfiguration(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutVoiceConnectorLoggingConfiguration") + return updateSnapshot(stack, "GetEventsConfiguration") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4129,11 +1117,11 @@ func TestUpdateSnapshot_PutVoiceConnectorLoggingConfiguration(t *testing.T) { } } -func TestUpdateSnapshot_PutVoiceConnectorOrigination(t *testing.T) { +func TestUpdateSnapshot_GetGlobalSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.PutVoiceConnectorOrigination(context.Background(), nil, func(o *Options) { + _, err := svc.GetGlobalSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutVoiceConnectorOrigination") + return updateSnapshot(stack, "GetGlobalSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4141,11 +1129,11 @@ func TestUpdateSnapshot_PutVoiceConnectorOrigination(t *testing.T) { } } -func TestUpdateSnapshot_PutVoiceConnectorProxy(t *testing.T) { +func TestUpdateSnapshot_GetPhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.PutVoiceConnectorProxy(context.Background(), nil, func(o *Options) { + _, err := svc.GetPhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutVoiceConnectorProxy") + return updateSnapshot(stack, "GetPhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4153,11 +1141,11 @@ func TestUpdateSnapshot_PutVoiceConnectorProxy(t *testing.T) { } } -func TestUpdateSnapshot_PutVoiceConnectorStreamingConfiguration(t *testing.T) { +func TestUpdateSnapshot_GetPhoneNumberOrder(t *testing.T) { svc := New(Options{}) - _, err := svc.PutVoiceConnectorStreamingConfiguration(context.Background(), nil, func(o *Options) { + _, err := svc.GetPhoneNumberOrder(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutVoiceConnectorStreamingConfiguration") + return updateSnapshot(stack, "GetPhoneNumberOrder") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4165,11 +1153,11 @@ func TestUpdateSnapshot_PutVoiceConnectorStreamingConfiguration(t *testing.T) { } } -func TestUpdateSnapshot_PutVoiceConnectorTermination(t *testing.T) { +func TestUpdateSnapshot_GetPhoneNumberSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.PutVoiceConnectorTermination(context.Background(), nil, func(o *Options) { + _, err := svc.GetPhoneNumberSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutVoiceConnectorTermination") + return updateSnapshot(stack, "GetPhoneNumberSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4177,11 +1165,11 @@ func TestUpdateSnapshot_PutVoiceConnectorTermination(t *testing.T) { } } -func TestUpdateSnapshot_PutVoiceConnectorTerminationCredentials(t *testing.T) { +func TestUpdateSnapshot_GetRetentionSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.PutVoiceConnectorTerminationCredentials(context.Background(), nil, func(o *Options) { + _, err := svc.GetRetentionSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "PutVoiceConnectorTerminationCredentials") + return updateSnapshot(stack, "GetRetentionSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4189,11 +1177,11 @@ func TestUpdateSnapshot_PutVoiceConnectorTerminationCredentials(t *testing.T) { } } -func TestUpdateSnapshot_RedactChannelMessage(t *testing.T) { +func TestUpdateSnapshot_GetRoom(t *testing.T) { svc := New(Options{}) - _, err := svc.RedactChannelMessage(context.Background(), nil, func(o *Options) { + _, err := svc.GetRoom(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "RedactChannelMessage") + return updateSnapshot(stack, "GetRoom") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4201,11 +1189,11 @@ func TestUpdateSnapshot_RedactChannelMessage(t *testing.T) { } } -func TestUpdateSnapshot_RedactConversationMessage(t *testing.T) { +func TestUpdateSnapshot_GetUser(t *testing.T) { svc := New(Options{}) - _, err := svc.RedactConversationMessage(context.Background(), nil, func(o *Options) { + _, err := svc.GetUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "RedactConversationMessage") + return updateSnapshot(stack, "GetUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4213,11 +1201,11 @@ func TestUpdateSnapshot_RedactConversationMessage(t *testing.T) { } } -func TestUpdateSnapshot_RedactRoomMessage(t *testing.T) { +func TestUpdateSnapshot_GetUserSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.RedactRoomMessage(context.Background(), nil, func(o *Options) { + _, err := svc.GetUserSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "RedactRoomMessage") + return updateSnapshot(stack, "GetUserSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4225,11 +1213,11 @@ func TestUpdateSnapshot_RedactRoomMessage(t *testing.T) { } } -func TestUpdateSnapshot_RegenerateSecurityToken(t *testing.T) { +func TestUpdateSnapshot_InviteUsers(t *testing.T) { svc := New(Options{}) - _, err := svc.RegenerateSecurityToken(context.Background(), nil, func(o *Options) { + _, err := svc.InviteUsers(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "RegenerateSecurityToken") + return updateSnapshot(stack, "InviteUsers") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4237,11 +1225,11 @@ func TestUpdateSnapshot_RegenerateSecurityToken(t *testing.T) { } } -func TestUpdateSnapshot_ResetPersonalPIN(t *testing.T) { +func TestUpdateSnapshot_ListAccounts(t *testing.T) { svc := New(Options{}) - _, err := svc.ResetPersonalPIN(context.Background(), nil, func(o *Options) { + _, err := svc.ListAccounts(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ResetPersonalPIN") + return updateSnapshot(stack, "ListAccounts") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4249,11 +1237,11 @@ func TestUpdateSnapshot_ResetPersonalPIN(t *testing.T) { } } -func TestUpdateSnapshot_RestorePhoneNumber(t *testing.T) { +func TestUpdateSnapshot_ListBots(t *testing.T) { svc := New(Options{}) - _, err := svc.RestorePhoneNumber(context.Background(), nil, func(o *Options) { + _, err := svc.ListBots(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "RestorePhoneNumber") + return updateSnapshot(stack, "ListBots") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4261,11 +1249,11 @@ func TestUpdateSnapshot_RestorePhoneNumber(t *testing.T) { } } -func TestUpdateSnapshot_SearchAvailablePhoneNumbers(t *testing.T) { +func TestUpdateSnapshot_ListPhoneNumberOrders(t *testing.T) { svc := New(Options{}) - _, err := svc.SearchAvailablePhoneNumbers(context.Background(), nil, func(o *Options) { + _, err := svc.ListPhoneNumberOrders(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "SearchAvailablePhoneNumbers") + return updateSnapshot(stack, "ListPhoneNumberOrders") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4273,11 +1261,11 @@ func TestUpdateSnapshot_SearchAvailablePhoneNumbers(t *testing.T) { } } -func TestUpdateSnapshot_SendChannelMessage(t *testing.T) { +func TestUpdateSnapshot_ListPhoneNumbers(t *testing.T) { svc := New(Options{}) - _, err := svc.SendChannelMessage(context.Background(), nil, func(o *Options) { + _, err := svc.ListPhoneNumbers(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "SendChannelMessage") + return updateSnapshot(stack, "ListPhoneNumbers") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4285,11 +1273,11 @@ func TestUpdateSnapshot_SendChannelMessage(t *testing.T) { } } -func TestUpdateSnapshot_StartMeetingTranscription(t *testing.T) { +func TestUpdateSnapshot_ListRoomMemberships(t *testing.T) { svc := New(Options{}) - _, err := svc.StartMeetingTranscription(context.Background(), nil, func(o *Options) { + _, err := svc.ListRoomMemberships(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "StartMeetingTranscription") + return updateSnapshot(stack, "ListRoomMemberships") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4297,11 +1285,11 @@ func TestUpdateSnapshot_StartMeetingTranscription(t *testing.T) { } } -func TestUpdateSnapshot_StopMeetingTranscription(t *testing.T) { +func TestUpdateSnapshot_ListRooms(t *testing.T) { svc := New(Options{}) - _, err := svc.StopMeetingTranscription(context.Background(), nil, func(o *Options) { + _, err := svc.ListRooms(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "StopMeetingTranscription") + return updateSnapshot(stack, "ListRooms") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4309,11 +1297,11 @@ func TestUpdateSnapshot_StopMeetingTranscription(t *testing.T) { } } -func TestUpdateSnapshot_TagAttendee(t *testing.T) { +func TestUpdateSnapshot_ListSupportedPhoneNumberCountries(t *testing.T) { svc := New(Options{}) - _, err := svc.TagAttendee(context.Background(), nil, func(o *Options) { + _, err := svc.ListSupportedPhoneNumberCountries(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "TagAttendee") + return updateSnapshot(stack, "ListSupportedPhoneNumberCountries") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4321,11 +1309,11 @@ func TestUpdateSnapshot_TagAttendee(t *testing.T) { } } -func TestUpdateSnapshot_TagMeeting(t *testing.T) { +func TestUpdateSnapshot_ListUsers(t *testing.T) { svc := New(Options{}) - _, err := svc.TagMeeting(context.Background(), nil, func(o *Options) { + _, err := svc.ListUsers(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "TagMeeting") + return updateSnapshot(stack, "ListUsers") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4333,11 +1321,11 @@ func TestUpdateSnapshot_TagMeeting(t *testing.T) { } } -func TestUpdateSnapshot_TagResource(t *testing.T) { +func TestUpdateSnapshot_LogoutUser(t *testing.T) { svc := New(Options{}) - _, err := svc.TagResource(context.Background(), nil, func(o *Options) { + _, err := svc.LogoutUser(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "TagResource") + return updateSnapshot(stack, "LogoutUser") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4345,11 +1333,11 @@ func TestUpdateSnapshot_TagResource(t *testing.T) { } } -func TestUpdateSnapshot_UntagAttendee(t *testing.T) { +func TestUpdateSnapshot_PutEventsConfiguration(t *testing.T) { svc := New(Options{}) - _, err := svc.UntagAttendee(context.Background(), nil, func(o *Options) { + _, err := svc.PutEventsConfiguration(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UntagAttendee") + return updateSnapshot(stack, "PutEventsConfiguration") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4357,11 +1345,11 @@ func TestUpdateSnapshot_UntagAttendee(t *testing.T) { } } -func TestUpdateSnapshot_UntagMeeting(t *testing.T) { +func TestUpdateSnapshot_PutRetentionSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.UntagMeeting(context.Background(), nil, func(o *Options) { + _, err := svc.PutRetentionSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UntagMeeting") + return updateSnapshot(stack, "PutRetentionSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4369,11 +1357,11 @@ func TestUpdateSnapshot_UntagMeeting(t *testing.T) { } } -func TestUpdateSnapshot_UntagResource(t *testing.T) { +func TestUpdateSnapshot_RedactConversationMessage(t *testing.T) { svc := New(Options{}) - _, err := svc.UntagResource(context.Background(), nil, func(o *Options) { + _, err := svc.RedactConversationMessage(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UntagResource") + return updateSnapshot(stack, "RedactConversationMessage") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4381,11 +1369,11 @@ func TestUpdateSnapshot_UntagResource(t *testing.T) { } } -func TestUpdateSnapshot_UpdateAccount(t *testing.T) { +func TestUpdateSnapshot_RedactRoomMessage(t *testing.T) { svc := New(Options{}) - _, err := svc.UpdateAccount(context.Background(), nil, func(o *Options) { + _, err := svc.RedactRoomMessage(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateAccount") + return updateSnapshot(stack, "RedactRoomMessage") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4393,11 +1381,11 @@ func TestUpdateSnapshot_UpdateAccount(t *testing.T) { } } -func TestUpdateSnapshot_UpdateAccountSettings(t *testing.T) { +func TestUpdateSnapshot_RegenerateSecurityToken(t *testing.T) { svc := New(Options{}) - _, err := svc.UpdateAccountSettings(context.Background(), nil, func(o *Options) { + _, err := svc.RegenerateSecurityToken(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateAccountSettings") + return updateSnapshot(stack, "RegenerateSecurityToken") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4405,11 +1393,11 @@ func TestUpdateSnapshot_UpdateAccountSettings(t *testing.T) { } } -func TestUpdateSnapshot_UpdateAppInstance(t *testing.T) { +func TestUpdateSnapshot_ResetPersonalPIN(t *testing.T) { svc := New(Options{}) - _, err := svc.UpdateAppInstance(context.Background(), nil, func(o *Options) { + _, err := svc.ResetPersonalPIN(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateAppInstance") + return updateSnapshot(stack, "ResetPersonalPIN") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4417,11 +1405,11 @@ func TestUpdateSnapshot_UpdateAppInstance(t *testing.T) { } } -func TestUpdateSnapshot_UpdateAppInstanceUser(t *testing.T) { +func TestUpdateSnapshot_RestorePhoneNumber(t *testing.T) { svc := New(Options{}) - _, err := svc.UpdateAppInstanceUser(context.Background(), nil, func(o *Options) { + _, err := svc.RestorePhoneNumber(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateAppInstanceUser") + return updateSnapshot(stack, "RestorePhoneNumber") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4429,11 +1417,11 @@ func TestUpdateSnapshot_UpdateAppInstanceUser(t *testing.T) { } } -func TestUpdateSnapshot_UpdateBot(t *testing.T) { +func TestUpdateSnapshot_SearchAvailablePhoneNumbers(t *testing.T) { svc := New(Options{}) - _, err := svc.UpdateBot(context.Background(), nil, func(o *Options) { + _, err := svc.SearchAvailablePhoneNumbers(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateBot") + return updateSnapshot(stack, "SearchAvailablePhoneNumbers") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4441,11 +1429,11 @@ func TestUpdateSnapshot_UpdateBot(t *testing.T) { } } -func TestUpdateSnapshot_UpdateChannel(t *testing.T) { +func TestUpdateSnapshot_UpdateAccount(t *testing.T) { svc := New(Options{}) - _, err := svc.UpdateChannel(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateAccount(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateChannel") + return updateSnapshot(stack, "UpdateAccount") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4453,11 +1441,11 @@ func TestUpdateSnapshot_UpdateChannel(t *testing.T) { } } -func TestUpdateSnapshot_UpdateChannelMessage(t *testing.T) { +func TestUpdateSnapshot_UpdateAccountSettings(t *testing.T) { svc := New(Options{}) - _, err := svc.UpdateChannelMessage(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateAccountSettings(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateChannelMessage") + return updateSnapshot(stack, "UpdateAccountSettings") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4465,11 +1453,11 @@ func TestUpdateSnapshot_UpdateChannelMessage(t *testing.T) { } } -func TestUpdateSnapshot_UpdateChannelReadMarker(t *testing.T) { +func TestUpdateSnapshot_UpdateBot(t *testing.T) { svc := New(Options{}) - _, err := svc.UpdateChannelReadMarker(context.Background(), nil, func(o *Options) { + _, err := svc.UpdateBot(context.Background(), nil, func(o *Options) { o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateChannelReadMarker") + return updateSnapshot(stack, "UpdateBot") }) }) if _, ok := err.(snapshotOK); !ok && err != nil { @@ -4513,18 +1501,6 @@ func TestUpdateSnapshot_UpdatePhoneNumberSettings(t *testing.T) { } } -func TestUpdateSnapshot_UpdateProxySession(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateProxySession(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateProxySession") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - func TestUpdateSnapshot_UpdateRoom(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateRoom(context.Background(), nil, func(o *Options) { @@ -4549,42 +1525,6 @@ func TestUpdateSnapshot_UpdateRoomMembership(t *testing.T) { } } -func TestUpdateSnapshot_UpdateSipMediaApplication(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateSipMediaApplication(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateSipMediaApplication") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateSipMediaApplicationCall(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateSipMediaApplicationCall(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateSipMediaApplicationCall") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateSipRule(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateSipRule(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateSipRule") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - func TestUpdateSnapshot_UpdateUser(t *testing.T) { svc := New(Options{}) _, err := svc.UpdateUser(context.Background(), nil, func(o *Options) { @@ -4608,39 +1548,3 @@ func TestUpdateSnapshot_UpdateUserSettings(t *testing.T) { t.Fatal(err) } } - -func TestUpdateSnapshot_UpdateVoiceConnector(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateVoiceConnector(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateVoiceConnector") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateVoiceConnectorGroup(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateVoiceConnectorGroup(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateVoiceConnectorGroup") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ValidateE911Address(t *testing.T) { - svc := New(Options{}) - _, err := svc.ValidateE911Address(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ValidateE911Address") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} diff --git a/service/chime/types/enums.go b/service/chime/types/enums.go index 2ada837b1a2..1018b02e4c7 100644 --- a/service/chime/types/enums.go +++ b/service/chime/types/enums.go @@ -44,63 +44,6 @@ func (AccountType) Values() []AccountType { } } -type AppInstanceDataType string - -// Enum values for AppInstanceDataType -const ( - AppInstanceDataTypeChannel AppInstanceDataType = "Channel" - AppInstanceDataTypeChannelMessage AppInstanceDataType = "ChannelMessage" -) - -// Values returns all known values for AppInstanceDataType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (AppInstanceDataType) Values() []AppInstanceDataType { - return []AppInstanceDataType{ - "Channel", - "ChannelMessage", - } -} - -type ArtifactsState string - -// Enum values for ArtifactsState -const ( - ArtifactsStateEnabled ArtifactsState = "Enabled" - ArtifactsStateDisabled ArtifactsState = "Disabled" -) - -// Values returns all known values for ArtifactsState. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ArtifactsState) Values() []ArtifactsState { - return []ArtifactsState{ - "Enabled", - "Disabled", - } -} - -type AudioMuxType string - -// Enum values for AudioMuxType -const ( - AudioMuxTypeAudioOnly AudioMuxType = "AudioOnly" - AudioMuxTypeAudioWithActiveSpeakerVideo AudioMuxType = "AudioWithActiveSpeakerVideo" -) - -// Values returns all known values for AudioMuxType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (AudioMuxType) Values() []AudioMuxType { - return []AudioMuxType{ - "AudioOnly", - "AudioWithActiveSpeakerVideo", - } -} - type BotType string // Enum values for BotType @@ -141,138 +84,6 @@ func (CallingNameStatus) Values() []CallingNameStatus { } } -type Capability string - -// Enum values for Capability -const ( - CapabilityVoice Capability = "Voice" - CapabilitySms Capability = "SMS" -) - -// Values returns all known values for Capability. Note that this can be expanded -// in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (Capability) Values() []Capability { - return []Capability{ - "Voice", - "SMS", - } -} - -type ChannelMembershipType string - -// Enum values for ChannelMembershipType -const ( - ChannelMembershipTypeDefault ChannelMembershipType = "DEFAULT" - ChannelMembershipTypeHidden ChannelMembershipType = "HIDDEN" -) - -// Values returns all known values for ChannelMembershipType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ChannelMembershipType) Values() []ChannelMembershipType { - return []ChannelMembershipType{ - "DEFAULT", - "HIDDEN", - } -} - -type ChannelMessagePersistenceType string - -// Enum values for ChannelMessagePersistenceType -const ( - ChannelMessagePersistenceTypePersistent ChannelMessagePersistenceType = "PERSISTENT" - ChannelMessagePersistenceTypeNonPersistent ChannelMessagePersistenceType = "NON_PERSISTENT" -) - -// Values returns all known values for ChannelMessagePersistenceType. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ChannelMessagePersistenceType) Values() []ChannelMessagePersistenceType { - return []ChannelMessagePersistenceType{ - "PERSISTENT", - "NON_PERSISTENT", - } -} - -type ChannelMessageType string - -// Enum values for ChannelMessageType -const ( - ChannelMessageTypeStandard ChannelMessageType = "STANDARD" - ChannelMessageTypeControl ChannelMessageType = "CONTROL" -) - -// Values returns all known values for ChannelMessageType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ChannelMessageType) Values() []ChannelMessageType { - return []ChannelMessageType{ - "STANDARD", - "CONTROL", - } -} - -type ChannelMode string - -// Enum values for ChannelMode -const ( - ChannelModeUnrestricted ChannelMode = "UNRESTRICTED" - ChannelModeRestricted ChannelMode = "RESTRICTED" -) - -// Values returns all known values for ChannelMode. Note that this can be expanded -// in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ChannelMode) Values() []ChannelMode { - return []ChannelMode{ - "UNRESTRICTED", - "RESTRICTED", - } -} - -type ChannelPrivacy string - -// Enum values for ChannelPrivacy -const ( - ChannelPrivacyPublic ChannelPrivacy = "PUBLIC" - ChannelPrivacyPrivate ChannelPrivacy = "PRIVATE" -) - -// Values returns all known values for ChannelPrivacy. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ChannelPrivacy) Values() []ChannelPrivacy { - return []ChannelPrivacy{ - "PUBLIC", - "PRIVATE", - } -} - -type ContentMuxType string - -// Enum values for ContentMuxType -const ( - ContentMuxTypeContentOnly ContentMuxType = "ContentOnly" -) - -// Values returns all known values for ContentMuxType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ContentMuxType) Values() []ContentMuxType { - return []ContentMuxType{ - "ContentOnly", - } -} - type EmailStatus string // Enum values for EmailStatus @@ -339,25 +150,6 @@ func (ErrorCode) Values() []ErrorCode { } } -type GeoMatchLevel string - -// Enum values for GeoMatchLevel -const ( - GeoMatchLevelCountry GeoMatchLevel = "Country" - GeoMatchLevelAreaCode GeoMatchLevel = "AreaCode" -) - -// Values returns all known values for GeoMatchLevel. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (GeoMatchLevel) Values() []GeoMatchLevel { - return []GeoMatchLevel{ - "Country", - "AreaCode", - } -} - type InviteStatus string // Enum values for InviteStatus @@ -402,65 +194,6 @@ func (License) Values() []License { } } -type MediaPipelineSinkType string - -// Enum values for MediaPipelineSinkType -const ( - MediaPipelineSinkTypeS3Bucket MediaPipelineSinkType = "S3Bucket" -) - -// Values returns all known values for MediaPipelineSinkType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (MediaPipelineSinkType) Values() []MediaPipelineSinkType { - return []MediaPipelineSinkType{ - "S3Bucket", - } -} - -type MediaPipelineSourceType string - -// Enum values for MediaPipelineSourceType -const ( - MediaPipelineSourceTypeChimeSdkMeeting MediaPipelineSourceType = "ChimeSdkMeeting" -) - -// Values returns all known values for MediaPipelineSourceType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (MediaPipelineSourceType) Values() []MediaPipelineSourceType { - return []MediaPipelineSourceType{ - "ChimeSdkMeeting", - } -} - -type MediaPipelineStatus string - -// Enum values for MediaPipelineStatus -const ( - MediaPipelineStatusInitializing MediaPipelineStatus = "Initializing" - MediaPipelineStatusInProgress MediaPipelineStatus = "InProgress" - MediaPipelineStatusFailed MediaPipelineStatus = "Failed" - MediaPipelineStatusStopping MediaPipelineStatus = "Stopping" - MediaPipelineStatusStopped MediaPipelineStatus = "Stopped" -) - -// Values returns all known values for MediaPipelineStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (MediaPipelineStatus) Values() []MediaPipelineStatus { - return []MediaPipelineStatus{ - "Initializing", - "InProgress", - "Failed", - "Stopping", - "Stopped", - } -} - type MemberType string // Enum values for MemberType @@ -482,46 +215,6 @@ func (MemberType) Values() []MemberType { } } -type NotificationTarget string - -// Enum values for NotificationTarget -const ( - NotificationTargetEventBridge NotificationTarget = "EventBridge" - NotificationTargetSns NotificationTarget = "SNS" - NotificationTargetSqs NotificationTarget = "SQS" -) - -// Values returns all known values for NotificationTarget. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (NotificationTarget) Values() []NotificationTarget { - return []NotificationTarget{ - "EventBridge", - "SNS", - "SQS", - } -} - -type NumberSelectionBehavior string - -// Enum values for NumberSelectionBehavior -const ( - NumberSelectionBehaviorPreferSticky NumberSelectionBehavior = "PreferSticky" - NumberSelectionBehaviorAvoidSticky NumberSelectionBehavior = "AvoidSticky" -) - -// Values returns all known values for NumberSelectionBehavior. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (NumberSelectionBehavior) Values() []NumberSelectionBehavior { - return []NumberSelectionBehavior{ - "PreferSticky", - "AvoidSticky", - } -} - type OrderedPhoneNumberStatus string // Enum values for OrderedPhoneNumberStatus @@ -543,25 +236,6 @@ func (OrderedPhoneNumberStatus) Values() []OrderedPhoneNumberStatus { } } -type OriginationRouteProtocol string - -// Enum values for OriginationRouteProtocol -const ( - OriginationRouteProtocolTcp OriginationRouteProtocol = "TCP" - OriginationRouteProtocolUdp OriginationRouteProtocol = "UDP" -) - -// Values returns all known values for OriginationRouteProtocol. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (OriginationRouteProtocol) Values() []OriginationRouteProtocol { - return []OriginationRouteProtocol{ - "TCP", - "UDP", - } -} - type PhoneNumberAssociationName string // Enum values for PhoneNumberAssociationName @@ -681,27 +355,6 @@ func (PhoneNumberType) Values() []PhoneNumberType { } } -type ProxySessionStatus string - -// Enum values for ProxySessionStatus -const ( - ProxySessionStatusOpen ProxySessionStatus = "Open" - ProxySessionStatusInProgress ProxySessionStatus = "InProgress" - ProxySessionStatusClosed ProxySessionStatus = "Closed" -) - -// Values returns all known values for ProxySessionStatus. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (ProxySessionStatus) Values() []ProxySessionStatus { - return []ProxySessionStatus{ - "Open", - "InProgress", - "Closed", - } -} - type RegistrationStatus string // Enum values for RegistrationStatus @@ -742,317 +395,6 @@ func (RoomMembershipRole) Values() []RoomMembershipRole { } } -type SipRuleTriggerType string - -// Enum values for SipRuleTriggerType -const ( - SipRuleTriggerTypeToPhoneNumber SipRuleTriggerType = "ToPhoneNumber" - SipRuleTriggerTypeRequestUriHostname SipRuleTriggerType = "RequestUriHostname" -) - -// Values returns all known values for SipRuleTriggerType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (SipRuleTriggerType) Values() []SipRuleTriggerType { - return []SipRuleTriggerType{ - "ToPhoneNumber", - "RequestUriHostname", - } -} - -type SortOrder string - -// Enum values for SortOrder -const ( - SortOrderAscending SortOrder = "ASCENDING" - SortOrderDescending SortOrder = "DESCENDING" -) - -// Values returns all known values for SortOrder. Note that this can be expanded -// in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (SortOrder) Values() []SortOrder { - return []SortOrder{ - "ASCENDING", - "DESCENDING", - } -} - -type TranscribeContentIdentificationType string - -// Enum values for TranscribeContentIdentificationType -const ( - TranscribeContentIdentificationTypePii TranscribeContentIdentificationType = "PII" -) - -// Values returns all known values for TranscribeContentIdentificationType. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeContentIdentificationType) Values() []TranscribeContentIdentificationType { - return []TranscribeContentIdentificationType{ - "PII", - } -} - -type TranscribeContentRedactionType string - -// Enum values for TranscribeContentRedactionType -const ( - TranscribeContentRedactionTypePii TranscribeContentRedactionType = "PII" -) - -// Values returns all known values for TranscribeContentRedactionType. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeContentRedactionType) Values() []TranscribeContentRedactionType { - return []TranscribeContentRedactionType{ - "PII", - } -} - -type TranscribeLanguageCode string - -// Enum values for TranscribeLanguageCode -const ( - TranscribeLanguageCodeEnUs TranscribeLanguageCode = "en-US" - TranscribeLanguageCodeEnGb TranscribeLanguageCode = "en-GB" - TranscribeLanguageCodeEsUs TranscribeLanguageCode = "es-US" - TranscribeLanguageCodeFrCa TranscribeLanguageCode = "fr-CA" - TranscribeLanguageCodeFrFr TranscribeLanguageCode = "fr-FR" - TranscribeLanguageCodeEnAu TranscribeLanguageCode = "en-AU" - TranscribeLanguageCodeItIt TranscribeLanguageCode = "it-IT" - TranscribeLanguageCodeDeDe TranscribeLanguageCode = "de-DE" - TranscribeLanguageCodePtBr TranscribeLanguageCode = "pt-BR" - TranscribeLanguageCodeJaJp TranscribeLanguageCode = "ja-JP" - TranscribeLanguageCodeKoKr TranscribeLanguageCode = "ko-KR" - TranscribeLanguageCodeZhCn TranscribeLanguageCode = "zh-CN" - TranscribeLanguageCodeThTh TranscribeLanguageCode = "th-TH" - TranscribeLanguageCodeHiIn TranscribeLanguageCode = "hi-IN" -) - -// Values returns all known values for TranscribeLanguageCode. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeLanguageCode) Values() []TranscribeLanguageCode { - return []TranscribeLanguageCode{ - "en-US", - "en-GB", - "es-US", - "fr-CA", - "fr-FR", - "en-AU", - "it-IT", - "de-DE", - "pt-BR", - "ja-JP", - "ko-KR", - "zh-CN", - "th-TH", - "hi-IN", - } -} - -type TranscribeMedicalContentIdentificationType string - -// Enum values for TranscribeMedicalContentIdentificationType -const ( - TranscribeMedicalContentIdentificationTypePhi TranscribeMedicalContentIdentificationType = "PHI" -) - -// Values returns all known values for TranscribeMedicalContentIdentificationType. -// Note that this can be expanded in the future, and so it is only as up to date as -// the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeMedicalContentIdentificationType) Values() []TranscribeMedicalContentIdentificationType { - return []TranscribeMedicalContentIdentificationType{ - "PHI", - } -} - -type TranscribeMedicalLanguageCode string - -// Enum values for TranscribeMedicalLanguageCode -const ( - TranscribeMedicalLanguageCodeEnUs TranscribeMedicalLanguageCode = "en-US" -) - -// Values returns all known values for TranscribeMedicalLanguageCode. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeMedicalLanguageCode) Values() []TranscribeMedicalLanguageCode { - return []TranscribeMedicalLanguageCode{ - "en-US", - } -} - -type TranscribeMedicalRegion string - -// Enum values for TranscribeMedicalRegion -const ( - TranscribeMedicalRegionUsEast1 TranscribeMedicalRegion = "us-east-1" - TranscribeMedicalRegionUsEast2 TranscribeMedicalRegion = "us-east-2" - TranscribeMedicalRegionUsWest2 TranscribeMedicalRegion = "us-west-2" - TranscribeMedicalRegionApSoutheast2 TranscribeMedicalRegion = "ap-southeast-2" - TranscribeMedicalRegionCaCentral1 TranscribeMedicalRegion = "ca-central-1" - TranscribeMedicalRegionEuWest1 TranscribeMedicalRegion = "eu-west-1" - TranscribeMedicalRegionAuto TranscribeMedicalRegion = "auto" -) - -// Values returns all known values for TranscribeMedicalRegion. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeMedicalRegion) Values() []TranscribeMedicalRegion { - return []TranscribeMedicalRegion{ - "us-east-1", - "us-east-2", - "us-west-2", - "ap-southeast-2", - "ca-central-1", - "eu-west-1", - "auto", - } -} - -type TranscribeMedicalSpecialty string - -// Enum values for TranscribeMedicalSpecialty -const ( - TranscribeMedicalSpecialtyPrimaryCare TranscribeMedicalSpecialty = "PRIMARYCARE" - TranscribeMedicalSpecialtyCardiology TranscribeMedicalSpecialty = "CARDIOLOGY" - TranscribeMedicalSpecialtyNeurology TranscribeMedicalSpecialty = "NEUROLOGY" - TranscribeMedicalSpecialtyOncology TranscribeMedicalSpecialty = "ONCOLOGY" - TranscribeMedicalSpecialtyRadiology TranscribeMedicalSpecialty = "RADIOLOGY" - TranscribeMedicalSpecialtyUrology TranscribeMedicalSpecialty = "UROLOGY" -) - -// Values returns all known values for TranscribeMedicalSpecialty. Note that this -// can be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeMedicalSpecialty) Values() []TranscribeMedicalSpecialty { - return []TranscribeMedicalSpecialty{ - "PRIMARYCARE", - "CARDIOLOGY", - "NEUROLOGY", - "ONCOLOGY", - "RADIOLOGY", - "UROLOGY", - } -} - -type TranscribeMedicalType string - -// Enum values for TranscribeMedicalType -const ( - TranscribeMedicalTypeConversation TranscribeMedicalType = "CONVERSATION" - TranscribeMedicalTypeDictation TranscribeMedicalType = "DICTATION" -) - -// Values returns all known values for TranscribeMedicalType. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeMedicalType) Values() []TranscribeMedicalType { - return []TranscribeMedicalType{ - "CONVERSATION", - "DICTATION", - } -} - -type TranscribePartialResultsStability string - -// Enum values for TranscribePartialResultsStability -const ( - TranscribePartialResultsStabilityLow TranscribePartialResultsStability = "low" - TranscribePartialResultsStabilityMedium TranscribePartialResultsStability = "medium" - TranscribePartialResultsStabilityHigh TranscribePartialResultsStability = "high" -) - -// Values returns all known values for TranscribePartialResultsStability. Note -// that this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribePartialResultsStability) Values() []TranscribePartialResultsStability { - return []TranscribePartialResultsStability{ - "low", - "medium", - "high", - } -} - -type TranscribeRegion string - -// Enum values for TranscribeRegion -const ( - TranscribeRegionUsEast2 TranscribeRegion = "us-east-2" - TranscribeRegionUsEast1 TranscribeRegion = "us-east-1" - TranscribeRegionUsWest2 TranscribeRegion = "us-west-2" - TranscribeRegionApNortheast2 TranscribeRegion = "ap-northeast-2" - TranscribeRegionApSoutheast2 TranscribeRegion = "ap-southeast-2" - TranscribeRegionApNortheast1 TranscribeRegion = "ap-northeast-1" - TranscribeRegionCaCentral1 TranscribeRegion = "ca-central-1" - TranscribeRegionEuCentral1 TranscribeRegion = "eu-central-1" - TranscribeRegionEuWest1 TranscribeRegion = "eu-west-1" - TranscribeRegionEuWest2 TranscribeRegion = "eu-west-2" - TranscribeRegionSaEast1 TranscribeRegion = "sa-east-1" - TranscribeRegionAuto TranscribeRegion = "auto" -) - -// Values returns all known values for TranscribeRegion. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeRegion) Values() []TranscribeRegion { - return []TranscribeRegion{ - "us-east-2", - "us-east-1", - "us-west-2", - "ap-northeast-2", - "ap-southeast-2", - "ap-northeast-1", - "ca-central-1", - "eu-central-1", - "eu-west-1", - "eu-west-2", - "sa-east-1", - "auto", - } -} - -type TranscribeVocabularyFilterMethod string - -// Enum values for TranscribeVocabularyFilterMethod -const ( - TranscribeVocabularyFilterMethodRemove TranscribeVocabularyFilterMethod = "remove" - TranscribeVocabularyFilterMethodMask TranscribeVocabularyFilterMethod = "mask" - TranscribeVocabularyFilterMethodTag TranscribeVocabularyFilterMethod = "tag" -) - -// Values returns all known values for TranscribeVocabularyFilterMethod. Note that -// this can be expanded in the future, and so it is only as up to date as the -// client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (TranscribeVocabularyFilterMethod) Values() []TranscribeVocabularyFilterMethod { - return []TranscribeVocabularyFilterMethod{ - "remove", - "mask", - "tag", - } -} - type UserType string // Enum values for UserType @@ -1071,39 +413,3 @@ func (UserType) Values() []UserType { "SharedDevice", } } - -type VideoMuxType string - -// Enum values for VideoMuxType -const ( - VideoMuxTypeVideoOnly VideoMuxType = "VideoOnly" -) - -// Values returns all known values for VideoMuxType. Note that this can be -// expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (VideoMuxType) Values() []VideoMuxType { - return []VideoMuxType{ - "VideoOnly", - } -} - -type VoiceConnectorAwsRegion string - -// Enum values for VoiceConnectorAwsRegion -const ( - VoiceConnectorAwsRegionUsEast1 VoiceConnectorAwsRegion = "us-east-1" - VoiceConnectorAwsRegionUsWest2 VoiceConnectorAwsRegion = "us-west-2" -) - -// Values returns all known values for VoiceConnectorAwsRegion. Note that this can -// be expanded in the future, and so it is only as up to date as the client. -// -// The ordering of this slice is not guaranteed to be stable across updates. -func (VoiceConnectorAwsRegion) Values() []VoiceConnectorAwsRegion { - return []VoiceConnectorAwsRegion{ - "us-east-1", - "us-west-2", - } -} diff --git a/service/chime/types/types.go b/service/chime/types/types.go index 478cc783cc7..93d370da8c0 100644 --- a/service/chime/types/types.go +++ b/service/chime/types/types.go @@ -70,42 +70,6 @@ type AccountSettings struct { noSmithyDocumentSerde } -// A validated address. -type Address struct { - - // The city of an address. - City *string - - // The country of an address. - Country *string - - // An address suffix location, such as the S. Unit A in Central Park S. Unit A . - PostDirectional *string - - // The postal code of an address. - PostalCode *string - - // The Zip + 4 or postal code + 4 of an address. - PostalCodePlus4 *string - - // An address prefix location, such as the N in N. Third St. . - PreDirectional *string - - // The state of an address. - State *string - - // The address street, such as 8th Avenue . - StreetName *string - - // The numeric portion of an address. - StreetNumber *string - - // The address suffix, such as the N in 8th Avenue N . - StreetSuffix *string - - noSmithyDocumentSerde -} - // The Alexa for Business metadata associated with an Amazon Chime user, used to // integrate Alexa for Business with a device. type AlexaForBusinessMetadata struct { @@ -119,230 +83,6 @@ type AlexaForBusinessMetadata struct { noSmithyDocumentSerde } -// The details of an AppInstance , an instance of an Amazon Chime SDK messaging -// application. -type AppInstance struct { - - // The ARN of the messaging instance. - AppInstanceArn *string - - // The time at which an AppInstance was created. In epoch milliseconds. - CreatedTimestamp *time.Time - - // The time an AppInstance was last updated. In epoch milliseconds. - LastUpdatedTimestamp *time.Time - - // The metadata of an AppInstance . - Metadata *string - - // The name of an AppInstance . - Name *string - - noSmithyDocumentSerde -} - -// The details of an AppInstanceAdmin . -type AppInstanceAdmin struct { - - // The AppInstanceAdmin data. - Admin *Identity - - // The ARN of the AppInstance for which the user is an administrator. - AppInstanceArn *string - - // The time at which an administrator was created. - CreatedTimestamp *time.Time - - noSmithyDocumentSerde -} - -// Summary of the details of an AppInstanceAdmin . -type AppInstanceAdminSummary struct { - - // The details of the AppInstanceAdmin . - Admin *Identity - - noSmithyDocumentSerde -} - -// The details of the data-retention settings for an AppInstance . -type AppInstanceRetentionSettings struct { - - // The length of time in days to retain the messages in a channel. - ChannelRetentionSettings *ChannelRetentionSettings - - noSmithyDocumentSerde -} - -// The details of the streaming configuration of an AppInstance . -type AppInstanceStreamingConfiguration struct { - - // The type of data to be streamed. - // - // This member is required. - AppInstanceDataType AppInstanceDataType - - // The resource ARN. - // - // This member is required. - ResourceArn *string - - noSmithyDocumentSerde -} - -// Summary of the data for an AppInstance . -type AppInstanceSummary struct { - - // The AppInstance ARN. - AppInstanceArn *string - - // The metadata of the AppInstance . - Metadata *string - - // The name of the AppInstance . - Name *string - - noSmithyDocumentSerde -} - -// The details of an AppInstanceUser . -type AppInstanceUser struct { - - // The ARN of the AppInstanceUser . - AppInstanceUserArn *string - - // The time at which the AppInstanceUser was created. - CreatedTimestamp *time.Time - - // The time at which the AppInstanceUser was last updated. - LastUpdatedTimestamp *time.Time - - // The metadata of the AppInstanceUser . - Metadata *string - - // The name of the AppInstanceUser . - Name *string - - noSmithyDocumentSerde -} - -// Summary of the membership details of an AppInstanceUser . -type AppInstanceUserMembershipSummary struct { - - // The time at which a message was last read. - ReadMarkerTimestamp *time.Time - - // The type of ChannelMembership . - Type ChannelMembershipType - - noSmithyDocumentSerde -} - -// Summary of the details of an AppInstanceUser . -type AppInstanceUserSummary struct { - - // The ARN of the AppInstanceUser . - AppInstanceUserArn *string - - // The metadata of the AppInstanceUser . - Metadata *string - - // The name of an AppInstanceUser . - Name *string - - noSmithyDocumentSerde -} - -// The configuration for the artifacts. -type ArtifactsConfiguration struct { - - // The configuration for the audio artifacts. - // - // This member is required. - Audio *AudioArtifactsConfiguration - - // The configuration for the content artifacts. - // - // This member is required. - Content *ContentArtifactsConfiguration - - // The configuration for the video artifacts. - // - // This member is required. - Video *VideoArtifactsConfiguration - - noSmithyDocumentSerde -} - -// An Amazon Chime SDK meeting attendee. Includes a unique AttendeeId and -// -// JoinToken . The JoinToken allows a client to authenticate and join as the -// specified attendee. The JoinToken expires when the meeting ends or when DeleteAttendee is -// called. After that, the attendee is unable to join the meeting. -// -// We recommend securely transferring each JoinToken from your server application -// to the client so that no other client has access to the token except for the one -// authorized to represent the attendee. -type Attendee struct { - - // The Amazon Chime SDK attendee ID. - AttendeeId *string - - // The Amazon Chime SDK external user ID. An idempotency token. Links the attendee - // to an identity managed by a builder application. - ExternalUserId *string - - // The join token used by the Amazon Chime SDK attendee. - JoinToken *string - - noSmithyDocumentSerde -} - -// The audio artifact configuration object. -type AudioArtifactsConfiguration struct { - - // The MUX type of the audio artifact configuration object. - // - // This member is required. - MuxType AudioMuxType - - noSmithyDocumentSerde -} - -// The membership information, including member ARNs, the channel ARN, and -// membership types. -type BatchChannelMemberships struct { - - // The ARN of the channel to which you're adding users. - ChannelArn *string - - // The identifier of the member who invited another member. - InvitedBy *Identity - - // The users successfully added to the request. - Members []Identity - - // The membership types set for the channel users. - Type ChannelMembershipType - - noSmithyDocumentSerde -} - -// A list of failed member ARNs, error codes, and error messages. -type BatchCreateChannelMembershipError struct { - - // The error code. - ErrorCode ErrorCode - - // The error message. - ErrorMessage *string - - // The ARN of the member that the service couldn't add. - MemberArn *string - - noSmithyDocumentSerde -} - // A resource that allows Enterprise account administrators to configure an // interface to receive events from Amazon Chime. type Bot struct { @@ -378,798 +118,57 @@ type Bot struct { noSmithyDocumentSerde } -// The Amazon Chime Business Calling settings for the administrator's AWS account. -// Includes any Amazon S3 buckets designated for storing call detail records. -type BusinessCallingSettings struct { - - // The Amazon S3 bucket designated for call detail record storage. - CdrBucket *string - - noSmithyDocumentSerde -} - -// A suggested address. -type CandidateAddress struct { - - // The city of a candidate address. - City *string - - // The country of a candidate address. - Country *string - - // The postal code of a candidate address. - PostalCode *string - - // The Zip + 4 or postal code + 4 of a candidate address. - PostalCodePlus4 *string - - // The state of a candidate address. - State *string - - // The street information of a candidate address - StreetInfo *string - - // The numeric portion of a candidate address. - StreetNumber *string - - noSmithyDocumentSerde -} - -// The details of a channel. -type Channel struct { - - // The ARN of the channel. - ChannelArn *string - - // The AppInstanceUser who created the channel. - CreatedBy *Identity - - // The time at which the AppInstanceUser created the channel. - CreatedTimestamp *time.Time - - // The time at which a member sent the last message in the channel. - LastMessageTimestamp *time.Time - - // The time at which a channel was last updated. - LastUpdatedTimestamp *time.Time - - // The channel's metadata. - Metadata *string - - // The mode of the channel. - Mode ChannelMode - - // The name of the channel. - Name *string - - // The channel's privacy setting. - Privacy ChannelPrivacy - - noSmithyDocumentSerde -} - -// The details of a channel ban. -type ChannelBan struct { - - // The ARN of the channel from which a member is being banned. - ChannelArn *string - - // The AppInstanceUser who created the ban. - CreatedBy *Identity - - // The time at which the ban was created. - CreatedTimestamp *time.Time - - // The member being banned from the channel. - Member *Identity - - noSmithyDocumentSerde -} - -// Summary of the details of a ChannelBan . -type ChannelBanSummary struct { - - // The member being banned from a channel. - Member *Identity - - noSmithyDocumentSerde -} - -// The details of a channel member. -type ChannelMembership struct { - - // The ARN of the member's channel. - ChannelArn *string - - // The time at which the channel membership was created. - CreatedTimestamp *time.Time - - // The identifier of the member who invited another member. - InvitedBy *Identity - - // The time at which a channel membership was last updated. - LastUpdatedTimestamp *time.Time - - // The data of the channel member. - Member *Identity - - // The membership type set for the channel member. - Type ChannelMembershipType - - noSmithyDocumentSerde -} - -// Summary of the channel membership details of an AppInstanceUser . -type ChannelMembershipForAppInstanceUserSummary struct { - - // Summary of the membership details of an AppInstanceUser . - AppInstanceUserMembershipSummary *AppInstanceUserMembershipSummary - - // Summary of the details of a Channel . - ChannelSummary *ChannelSummary - - noSmithyDocumentSerde -} - -// Summary of the details of a ChannelMembership . -type ChannelMembershipSummary struct { - - // A member's summary data. - Member *Identity - - noSmithyDocumentSerde -} - -// The details of a message in a channel. -type ChannelMessage struct { - - // The ARN of the channel. - ChannelArn *string - - // The message content. - Content *string - - // The time at which the message was created. - CreatedTimestamp *time.Time - - // The time at which a message was edited. - LastEditedTimestamp *time.Time - - // The time at which a message was updated. - LastUpdatedTimestamp *time.Time - - // The ID of a message. - MessageId *string - - // The message metadata. - Metadata *string - - // The persistence setting for a channel message. - Persistence ChannelMessagePersistenceType - - // Hides the content of a message. - Redacted bool - - // The message sender. - Sender *Identity - - // The message type. - Type ChannelMessageType - - noSmithyDocumentSerde -} - -// Summary of the messages in a Channel . -type ChannelMessageSummary struct { - - // The content of the message. - Content *string - - // The time at which the message summary was created. - CreatedTimestamp *time.Time - - // The time at which a message was last edited. - LastEditedTimestamp *time.Time - - // The time at which a message was last updated. - LastUpdatedTimestamp *time.Time - - // The ID of the message. - MessageId *string - - // The metadata of the message. - Metadata *string - - // Indicates whether a message was redacted. - Redacted bool - - // The message sender. - Sender *Identity - - // The type of message. - Type ChannelMessageType - - noSmithyDocumentSerde -} - -// Summary of the details of a moderated channel. -type ChannelModeratedByAppInstanceUserSummary struct { - - // Summary of the details of a Channel . - ChannelSummary *ChannelSummary - - noSmithyDocumentSerde -} - -// The details of a channel moderator. -type ChannelModerator struct { - - // The ARN of the moderator's channel. - ChannelArn *string - - // The AppInstanceUser who created the moderator. - CreatedBy *Identity - - // The time at which the moderator was created. - CreatedTimestamp *time.Time - - // The moderator's data. - Moderator *Identity - - noSmithyDocumentSerde -} - -// Summary of the details of a ChannelModerator . -type ChannelModeratorSummary struct { - - // The data for a moderator. - Moderator *Identity - - noSmithyDocumentSerde -} - -// The details of the retention settings for a channel. -type ChannelRetentionSettings struct { - - // The time in days to retain the messages in a channel. - RetentionDays *int32 - - noSmithyDocumentSerde -} - -// Summary of the details of a Channel . -type ChannelSummary struct { - - // The ARN of the channel. - ChannelArn *string - - // The time at which the last message in a channel was sent. - LastMessageTimestamp *time.Time - - // The metadata of the channel. - Metadata *string - - // The mode of the channel. - Mode ChannelMode - - // The name of the channel. - Name *string - - // The privacy setting of the channel. - Privacy ChannelPrivacy - - noSmithyDocumentSerde -} - -// The configuration object of the Amazon Chime SDK meeting for a specified media -// capture pipeline. SourceType must be ChimeSdkMeeting . -type ChimeSdkMeetingConfiguration struct { - - // The configuration for the artifacts in an Amazon Chime SDK meeting. - ArtifactsConfiguration *ArtifactsConfiguration - - // The source configuration for a specified media capture pipeline. - SourceConfiguration *SourceConfiguration - - noSmithyDocumentSerde -} - -// The content artifact object. -type ContentArtifactsConfiguration struct { - - // Indicates whether the content artifact is enabled or disabled. - // - // This member is required. - State ArtifactsState - - // The MUX type of the artifact configuration. - MuxType ContentMuxType - - noSmithyDocumentSerde -} - -// The retention settings that determine how long to retain conversation messages -// for an Amazon Chime Enterprise account. -type ConversationRetentionSettings struct { - - // The number of days for which to retain conversation messages. - RetentionDays *int32 - - noSmithyDocumentSerde -} - -// The list of errors returned when errors are encountered during the -// BatchCreateAttendee and CreateAttendee actions. This includes external user IDs, -// error codes, and error messages. -type CreateAttendeeError struct { - - // The error code. - ErrorCode *string - - // The error message. - ErrorMessage *string - - // The Amazon Chime SDK external user ID. An idempotency token. Links the attendee - // to an identity managed by a builder application. - ExternalUserId *string - - noSmithyDocumentSerde -} - -// The Amazon Chime SDK attendee fields to create, used with the -// BatchCreateAttendee action. -type CreateAttendeeRequestItem struct { - - // The Amazon Chime SDK external user ID. An idempotency token. Links the attendee - // to an identity managed by a builder application. - // - // This member is required. - ExternalUserId *string - - // The tag key-value pairs. - Tags []Tag - - noSmithyDocumentSerde -} - -// The SIP credentials used to authenticate requests to your Amazon Chime Voice -// Connector. -type Credential struct { - - // The RFC2617 compliant password associated with the SIP credentials, in US-ASCII - // format. - Password *string - - // The RFC2617 compliant user name associated with the SIP credentials, in - // US-ASCII format. - Username *string - - noSmithyDocumentSerde -} - -// The Dialed Number Identification Service (DNIS) emergency calling configuration -// details associated with an Amazon Chime Voice Connector's emergency calling -// configuration. -type DNISEmergencyCallingConfiguration struct { - - // The country from which emergency calls are allowed, in ISO 3166-1 alpha-2 - // format. - // - // This member is required. - CallingCountry *string - - // The DNIS phone number to route emergency calls to, in E.164 format. - // - // This member is required. - EmergencyPhoneNumber *string - - // The DNIS phone number to route test emergency calls to, in E.164 format. - TestPhoneNumber *string - - noSmithyDocumentSerde -} - -// The emergency calling configuration details associated with an Amazon Chime -// Voice Connector. -type EmergencyCallingConfiguration struct { - - // The Dialed Number Identification Service (DNIS) emergency calling configuration - // details. - DNIS []DNISEmergencyCallingConfiguration - - noSmithyDocumentSerde -} - -// Settings specific to the Amazon Transcribe Medical engine. -type EngineTranscribeMedicalSettings struct { - - // The language code specified for the Amazon Transcribe Medical engine. - // - // This member is required. - LanguageCode TranscribeMedicalLanguageCode - - // The specialty specified for the Amazon Transcribe Medical engine. - // - // This member is required. - Specialty TranscribeMedicalSpecialty - - // The type of transcription. - // - // This member is required. - Type TranscribeMedicalType - - // Labels all personally identifiable information (PII) identified in your - // transcript. If you don't include PiiEntityTypes , all PII is identified. - // - // You can’t set ContentIdentificationType and ContentRedactionType . - ContentIdentificationType TranscribeMedicalContentIdentificationType - - // The AWS Region passed to Amazon Transcribe Medical. If you don't specify a - // Region, Amazon Chime uses the meeting's Region. - Region TranscribeMedicalRegion - - // The name of the vocabulary passed to Amazon Transcribe Medical. - VocabularyName *string - - noSmithyDocumentSerde -} - -// Settings specific for Amazon Transcribe as the live transcription engine. -// -// If you specify an invalid combination of parameters, a TranscriptFailed event -// will be sent with the contents of the BadRequestException generated by Amazon -// Transcribe. For more information on each parameter and which combinations are -// valid, refer to the [StartStreamTranscription]API in the Amazon Transcribe Developer Guide. -// -// [StartStreamTranscription]: https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html -type EngineTranscribeSettings struct { - - // Labels all personally identifiable information (PII) identified in your - // transcript. If you don't include PiiEntityTypes , all PII is identified. - // - // You can’t set ContentIdentificationType and ContentRedactionType . - ContentIdentificationType TranscribeContentIdentificationType - - // Content redaction is performed at the segment level. If you don't include - // PiiEntityTypes , all PII is redacted. - // - // You can’t set ContentIdentificationType and ContentRedactionType . - ContentRedactionType TranscribeContentRedactionType - - // Enables partial result stabilization for your transcription. Partial result - // stabilization can reduce latency in your output, but may impact accuracy. - EnablePartialResultsStabilization *bool - - // Enables automatic language identification for your transcription. - // - // If you include IdentifyLanguage , you can optionally use LanguageOptions to - // include a list of language codes that you think may be present in your audio - // stream. Including language options can improve transcription accuracy. - // - // You can also use PreferredLanguage to include a preferred language. Doing so - // can help Amazon Transcribe identify the language faster. - // - // You must include either LanguageCode or IdentifyLanguage . - // - // Language identification can't be combined with custom language models or - // redaction. - IdentifyLanguage *bool - - // Specify the language code that represents the language spoken. - // - // If you're unsure of the language spoken in your audio, consider using - // IdentifyLanguage to enable automatic language identification. - LanguageCode TranscribeLanguageCode - - // Specify the name of the custom language model that you want to use when - // processing your transcription. Note that language model names are case - // sensitive. - // - // The language of the specified language model must match the language code. If - // the languages don't match, the custom language model isn't applied. There are no - // errors or warnings associated with a language mismatch. - // - // If you use Amazon Transcribe in multiple Regions, the custom language model - // must be available in Amazon Transcribe in each Region. - LanguageModelName *string - - // Specify two or more language codes that represent the languages you think may - // be present in your media; including more than five is not recommended. If you're - // unsure what languages are present, do not include this parameter. - // - // Including language options can improve the accuracy of language identification. - // - // If you include LanguageOptions , you must also include IdentifyLanguage . - // - // You can only include one language dialect per language. For example, you cannot - // include en-US and en-AU . - LanguageOptions *string - - // Specify the level of stability to use when you enable partial results - // stabilization ( EnablePartialResultsStabilization ). - // - // Low stability provides the highest accuracy. High stability transcribes faster, - // but with slightly lower accuracy. - PartialResultsStability TranscribePartialResultsStability - - // Specify which types of personally identifiable information (PII) you want to - // redact in your transcript. You can include as many types as you'd like, or you - // can select ALL . - // - // Values must be comma-separated and can include: ADDRESS , BANK_ACCOUNT_NUMBER , - // BANK_ROUTING , CREDIT_DEBIT_CVV , CREDIT_DEBIT_EXPIRY CREDIT_DEBIT_NUMBER , - // EMAIL , NAME , PHONE , PIN , SSN , or ALL . - // - // Note that if you include PiiEntityTypes , you must also include - // ContentIdentificationType or ContentRedactionType . - // - // If you include ContentRedactionType or ContentIdentificationType , but do not - // include PiiEntityTypes , all PII is redacted or identified. - PiiEntityTypes *string - - // Specify a preferred language from the subset of languages codes you specified - // in LanguageOptions . - // - // You can only use this parameter if you include IdentifyLanguage and - // LanguageOptions . - PreferredLanguage TranscribeLanguageCode - - // The AWS Region in which to use Amazon Transcribe. - // - // If you don't specify a Region, then the MediaRegion parameter of the [CreateMeeting.html] API will - // be used. However, if Amazon Transcribe is not available in the MediaRegion , - // then a TranscriptFailed event is sent. - // - // Use auto to use Amazon Transcribe in a Region near the meeting’s MediaRegion . - // For more information, refer to [Choosing a transcription Region]in the Amazon Chime SDK Developer Guide. - // - // [CreateMeeting.html]: https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_CreateMeeting.html - // [Choosing a transcription Region]: https://docs.aws.amazon.com/chime-sdk/latest/dg/transcription-options.html#choose-region - Region TranscribeRegion - - // Specify how you want your vocabulary filter applied to your transcript. - // - // To replace words with *** , choose mask . - // - // To delete words, choose remove . - // - // To flag words without changing them, choose tag . - VocabularyFilterMethod TranscribeVocabularyFilterMethod - - // Specify the name of the custom vocabulary filter that you want to use when - // processing your transcription. Note that vocabulary filter names are case - // sensitive. - // - // If you use Amazon Transcribe in multiple Regions, the vocabulary filter must be - // available in Amazon Transcribe in each Region. - // - // If you include IdentifyLanguage and want to use one or more vocabulary filters - // with your transcription, use the VocabularyFilterNames parameter instead. - VocabularyFilterName *string - - // Specify the names of the custom vocabulary filters that you want to use when - // processing your transcription. Note that vocabulary filter names are case - // sensitive. - // - // If you use Amazon Transcribe in multiple Regions, the vocabulary filter must be - // available in Amazon Transcribe in each Region. - // - // If you're not including IdentifyLanguage and want to use a custom vocabulary - // filter with your transcription, use the VocabularyFilterName parameter instead. - VocabularyFilterNames *string - - // Specify the name of the custom vocabulary that you want to use when processing - // your transcription. Note that vocabulary names are case sensitive. - // - // If you use Amazon Transcribe multiple Regions, the vocabulary must be available - // in Amazon Transcribe in each Region. - // - // If you include IdentifyLanguage and want to use one or more custom vocabularies - // with your transcription, use the VocabularyNames parameter instead. - VocabularyName *string - - // Specify the names of the custom vocabularies that you want to use when - // processing your transcription. Note that vocabulary names are case sensitive. - // - // If you use Amazon Transcribe in multiple Regions, the vocabulary must be - // available in Amazon Transcribe in each Region. - // - // If you don't include IdentifyLanguage and want to use a custom vocabulary with - // your transcription, use the VocabularyName parameter instead. - VocabularyNames *string - - noSmithyDocumentSerde -} - -// The configuration that allows a bot to receive outgoing events. Can be either -// an HTTPS endpoint or a Lambda function ARN. -type EventsConfiguration struct { - - // The bot ID. - BotId *string - - // Lambda function ARN that allows a bot to receive outgoing events. - LambdaFunctionArn *string - - // HTTPS endpoint that allows a bot to receive outgoing events. - OutboundEventsHTTPSEndpoint *string - - noSmithyDocumentSerde -} - -// The country and area code for a proxy phone number in a proxy phone session. -type GeoMatchParams struct { - - // The area code. - // - // This member is required. - AreaCode *string - - // The country. - // - // This member is required. - Country *string - - noSmithyDocumentSerde -} - -// The details of a user. -type Identity struct { - - // The ARN in an Identity. - Arn *string - - // The name in an Identity. - Name *string - - noSmithyDocumentSerde -} - -// Invitation object returned after emailing users to invite them to join the -// Amazon Chime Team account. -type Invite struct { - - // The email address to which the invite is sent. - EmailAddress *string - - // The status of the invite email. - EmailStatus EmailStatus - - // The invite ID. - InviteId *string - - // The status of the invite. - Status InviteStatus - - noSmithyDocumentSerde -} - -// The logging configuration associated with an Amazon Chime Voice Connector. -// Specifies whether SIP message logs are enabled for sending to Amazon CloudWatch -// Logs. -type LoggingConfiguration struct { - - // Boolean that enables logging of detailed media metrics for Voice Connectors to - // Amazon CloudWatch logs. - EnableMediaMetricLogs *bool - - // Boolean that enables SIP message logs to Amazon CloudWatch logs. - EnableSIPLogs *bool - - noSmithyDocumentSerde -} - -// A media capture pipeline object consisting of an ID, source type, source ARN, a -// sink type, a sink ARN, and a configuration object. -type MediaCapturePipeline struct { - - // The configuration for a specified media capture pipeline. SourceType must be - // ChimeSdkMeeting . - ChimeSdkMeetingConfiguration *ChimeSdkMeetingConfiguration - - // The time at which the capture pipeline was created, in ISO 8601 format. - CreatedTimestamp *time.Time - - // The ID of a media capture pipeline. - MediaPipelineId *string - - // ARN of the destination to which the media artifacts are saved. - SinkArn *string - - // Destination type to which the media artifacts are saved. You must use an S3 - // Bucket. - SinkType MediaPipelineSinkType - - // ARN of the source from which the media artifacts will be saved. - SourceArn *string - - // Source type from which media artifacts are saved. You must use ChimeMeeting . - SourceType MediaPipelineSourceType - - // The status of the media capture pipeline. - Status MediaPipelineStatus - - // The time at which the capture pipeline was updated, in ISO 8601 format. - UpdatedTimestamp *time.Time - - noSmithyDocumentSerde -} - -// A set of endpoints used by clients to connect to the media service group for an -// Amazon Chime SDK meeting. -type MediaPlacement struct { - - // The audio fallback URL. - AudioFallbackUrl *string - - // The audio host URL. - AudioHostUrl *string - - // The event ingestion URL to which you send client meeting events. - EventIngestionUrl *string - - // The screen data URL. - // - // This parameter is is no longer supported and no longer used by the Amazon Chime - // SDK. - ScreenDataUrl *string +// The Amazon Chime Business Calling settings for the administrator's AWS account. +// Includes any Amazon S3 buckets designated for storing call detail records. +type BusinessCallingSettings struct { - // The screen sharing URL. - // - // This parameter is is no longer supported and no longer used by the Amazon Chime - // SDK.. - ScreenSharingUrl *string + // The Amazon S3 bucket designated for call detail record storage. + CdrBucket *string - // The screen viewing URL. - // - // This parameter is is no longer supported and no longer used by the Amazon Chime - // SDK. - ScreenViewingUrl *string + noSmithyDocumentSerde +} - // The signaling URL. - SignalingUrl *string +// The retention settings that determine how long to retain conversation messages +// for an Amazon Chime Enterprise account. +type ConversationRetentionSettings struct { - // The turn control URL. - // - // This parameter is is no longer supported and no longer used by the Amazon Chime - // SDK. - TurnControlUrl *string + // The number of days for which to retain conversation messages. + RetentionDays *int32 noSmithyDocumentSerde } -// A meeting created using the Amazon Chime SDK. -type Meeting struct { - - // The external meeting ID. - ExternalMeetingId *string +// The configuration that allows a bot to receive outgoing events. Can be either +// an HTTPS endpoint or a Lambda function ARN. +type EventsConfiguration struct { - // The media placement for the meeting. - MediaPlacement *MediaPlacement + // The bot ID. + BotId *string - // The Region in which you create the meeting. Available values: af-south-1 , - // ap-northeast-1 , ap-northeast-2 , ap-south-1 , ap-southeast-1 , ap-southeast-2 , - // ca-central-1 , eu-central-1 , eu-north-1 , eu-south-1 , eu-west-1 , eu-west-2 , - // eu-west-3 , sa-east-1 , us-east-1 , us-east-2 , us-west-1 , us-west-2 . - MediaRegion *string + // Lambda function ARN that allows a bot to receive outgoing events. + LambdaFunctionArn *string - // The Amazon Chime SDK meeting ID. - MeetingId *string + // HTTPS endpoint that allows a bot to receive outgoing events. + OutboundEventsHTTPSEndpoint *string noSmithyDocumentSerde } -// The resource target configurations for receiving Amazon Chime SDK meeting and -// -// attendee event notifications. The Amazon Chime SDK supports resource targets -// located in the US East (N. Virginia) AWS Region ( us-east-1 ). -type MeetingNotificationConfiguration struct { +// Invitation object returned after emailing users to invite them to join the +// Amazon Chime Team account. +type Invite struct { + + // The email address to which the invite is sent. + EmailAddress *string + + // The status of the invite email. + EmailStatus EmailStatus - // The SNS topic ARN. - SnsTopicArn *string + // The invite ID. + InviteId *string - // The SQS queue ARN. - SqsQueueArn *string + // The status of the invite. + Status InviteStatus noSmithyDocumentSerde } @@ -1222,15 +221,6 @@ type MembershipItem struct { noSmithyDocumentSerde } -// The websocket endpoint used to connect to Amazon Chime SDK messaging. -type MessagingSessionEndpoint struct { - - // The endpoint to which you establish a websocket connection. - Url *string - - noSmithyDocumentSerde -} - // A phone number for which an order has been placed. type OrderedPhoneNumber struct { @@ -1243,66 +233,6 @@ type OrderedPhoneNumber struct { noSmithyDocumentSerde } -// Origination settings enable your SIP hosts to receive inbound calls using your -// Amazon Chime Voice Connector. -// -// The parameters listed below are not required, but you must use at least one. -type Origination struct { - - // When origination settings are disabled, inbound calls are not enabled for your - // Amazon Chime Voice Connector. This parameter is not required, but you must - // specify this parameter or Routes . - Disabled *bool - - // The call distribution properties defined for your SIP hosts. Valid range: - // Minimum value of 1. Maximum value of 20. This parameter is not required, but you - // must specify this parameter or Disabled . - Routes []OriginationRoute - - noSmithyDocumentSerde -} - -// Origination routes define call distribution properties for your SIP hosts to -// receive inbound calls using your Amazon Chime Voice Connector. Limit: Ten -// origination routes for each Amazon Chime Voice Connector. -// -// The parameters listed below are not required, but you must use at least one. -type OriginationRoute struct { - - // The FQDN or IP address to contact for origination traffic. - Host *string - - // The designated origination route port. Defaults to 5060. - Port *int32 - - // The priority associated with the host, with 1 being the highest priority. - // Higher priority hosts are attempted first. - Priority *int32 - - // The protocol to use for the origination route. Encryption-enabled Amazon Chime - // Voice Connectors use TCP protocol by default. - Protocol OriginationRouteProtocol - - // The weight associated with the host. If hosts are equal in priority, calls are - // redistributed among them based on their relative weight. - Weight *int32 - - noSmithyDocumentSerde -} - -// The phone number and proxy phone number for a participant in an Amazon Chime -// Voice Connector proxy session. -type Participant struct { - - // The participant's phone number. - PhoneNumber *string - - // The participant's proxy phone number. - ProxyPhoneNumber *string - - noSmithyDocumentSerde -} - // A phone number used for Amazon Chime Business Calling or an Amazon Chime Voice // Connector. type PhoneNumber struct { @@ -1446,72 +376,6 @@ type PhoneNumberOrder struct { noSmithyDocumentSerde } -// The proxy configuration for an Amazon Chime Voice Connector. -type Proxy struct { - - // The default number of minutes allowed for proxy sessions. - DefaultSessionExpiryMinutes *int32 - - // When true, stops proxy sessions from being created on the specified Amazon - // Chime Voice Connector. - Disabled *bool - - // The phone number to route calls to after a proxy session expires. - FallBackPhoneNumber *string - - // The countries for proxy phone numbers to be selected from. - PhoneNumberCountries []string - - noSmithyDocumentSerde -} - -// The proxy session for an Amazon Chime Voice Connector. -type ProxySession struct { - - // The proxy session capabilities. - Capabilities []Capability - - // The created time stamp, in ISO 8601 format. - CreatedTimestamp *time.Time - - // The ended time stamp, in ISO 8601 format. - EndedTimestamp *time.Time - - // The number of minutes allowed for the proxy session. - ExpiryMinutes *int32 - - // The preference for matching the country or area code of the proxy phone number - // with that of the first participant. - GeoMatchLevel GeoMatchLevel - - // The country and area code for the proxy phone number. - GeoMatchParams *GeoMatchParams - - // The name of the proxy session. - Name *string - - // The preference for proxy phone number reuse, or stickiness, between the same - // participants across sessions. - NumberSelectionBehavior NumberSelectionBehavior - - // The proxy session participants. - Participants []Participant - - // The proxy session ID. - ProxySessionId *string - - // The status of the proxy session. - Status ProxySessionStatus - - // The updated time stamp, in ISO 8601 format. - UpdatedTimestamp *time.Time - - // The Amazon Chime voice connector ID. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - // The retention settings for an Amazon Chime Enterprise account that determine // how long to retain items such as chat-room messages and chat-conversation // messages. @@ -1581,19 +445,6 @@ type RoomRetentionSettings struct { noSmithyDocumentSerde } -// The video streams to capture for a specified media capture pipeline. The total -// number of video streams can't exceed 25. -type SelectedVideoStreams struct { - - // The attendee IDs of the streams selected for a media capture pipeline. - AttendeeIds []string - - // The external user IDs of the streams selected for a media capture pipeline. - ExternalUserIds []string - - noSmithyDocumentSerde -} - // An Active Directory (AD) group whose members are granted permission to act as // delegates. type SigninDelegateGroup struct { @@ -1604,172 +455,6 @@ type SigninDelegateGroup struct { noSmithyDocumentSerde } -// The details of the SIP media application, including name and endpoints. An AWS -// account can have multiple SIP media applications. -type SipMediaApplication struct { - - // The AWS Region in which the SIP media application is created. - AwsRegion *string - - // The SIP media application creation timestamp, in ISO 8601 format. - CreatedTimestamp *time.Time - - // List of endpoints for SIP media application. Currently, only one endpoint per - // SIP media application is permitted. - Endpoints []SipMediaApplicationEndpoint - - // The name of the SIP media application. - Name *string - - // The SIP media application ID. - SipMediaApplicationId *string - - // The SIP media application updated timestamp, in ISO 8601 format. - UpdatedTimestamp *time.Time - - noSmithyDocumentSerde -} - -// A Call instance for a SIP media application. -type SipMediaApplicationCall struct { - - // The transaction ID of a call. - TransactionId *string - - noSmithyDocumentSerde -} - -// The endpoint assigned to the SIP media application. -type SipMediaApplicationEndpoint struct { - - // Valid Amazon Resource Name (ARN) of the Lambda function, version, or alias. The - // function must be created in the same AWS Region as the SIP media application. - LambdaArn *string - - noSmithyDocumentSerde -} - -// Logging configuration of the SIP media application. -type SipMediaApplicationLoggingConfiguration struct { - - // Enables application message logs for the SIP media application. - EnableSipMediaApplicationMessageLogs *bool - - noSmithyDocumentSerde -} - -// The SIP rule details, including name, triggers, and target applications. An AWS -// account can have multiple SIP rules. -type SipRule struct { - - // The time at which the SIP rule was created, in ISO 8601 format. - CreatedTimestamp *time.Time - - // Indicates whether the SIP rule is enabled or disabled. You must disable a rule - // before you can delete it. - Disabled *bool - - // The name of the SIP rule. - Name *string - - // The SIP rule ID. - SipRuleId *string - - // Target SIP media application and other details, such as priority and AWS - // Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be - // provided. - TargetApplications []SipRuleTargetApplication - - // The type of trigger assigned to the SIP rule in TriggerValue , currently - // RequestUriHostname or ToPhoneNumber . - TriggerType SipRuleTriggerType - - // If TriggerType is RequestUriHostname , then the value can be the outbound host - // name of the Amazon Chime Voice Connector. If TriggerType is ToPhoneNumber , then - // the value can be a customer-owned phone number in E164 format. SipRule is - // triggered when a SIP rule requests host name or ToPhoneNumber matches in the - // incoming SIP request. - TriggerValue *string - - // The time at which the SIP rule was last updated, in ISO 8601 format. - UpdatedTimestamp *time.Time - - noSmithyDocumentSerde -} - -// Target SIP media application and other details, such as priority and AWS -// Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be -// provided. -type SipRuleTargetApplication struct { - - // The AWS Region of the target application. - AwsRegion *string - - // Priority of the SIP media application in the target list. - Priority *int32 - - // The SIP media application ID. - SipMediaApplicationId *string - - noSmithyDocumentSerde -} - -// Source configuration for a specified media capture pipeline. -type SourceConfiguration struct { - - // The selected video streams to capture for a specified media capture pipeline. - // The number of video streams can't exceed 25. - SelectedVideoStreams *SelectedVideoStreams - - noSmithyDocumentSerde -} - -// The streaming configuration associated with an Amazon Chime Voice Connector. -// Specifies whether media streaming is enabled for sending to Amazon Kinesis, and -// shows the retention period for the Amazon Kinesis data, in hours. -type StreamingConfiguration struct { - - // The retention period, in hours, for the Amazon Kinesis data. - // - // This member is required. - DataRetentionInHours *int32 - - // When true, media streaming to Amazon Kinesis is turned off. - Disabled *bool - - // The streaming notification targets. - StreamingNotificationTargets []StreamingNotificationTarget - - noSmithyDocumentSerde -} - -// The targeted recipient for a streaming configuration notification. -type StreamingNotificationTarget struct { - - // The streaming notification target. - // - // This member is required. - NotificationTarget NotificationTarget - - noSmithyDocumentSerde -} - -// Describes a tag applied to a resource. -type Tag struct { - - // The key of the tag. - // - // This member is required. - Key *string - - // The value of the tag. - // - // This member is required. - Value *string - - noSmithyDocumentSerde -} - // Settings that allow management of telephony permissions for an Amazon Chime // user, such as inbound and outbound calling and text messaging. type TelephonySettings struct { @@ -1792,56 +477,6 @@ type TelephonySettings struct { noSmithyDocumentSerde } -// Termination settings enable your SIP hosts to make outbound calls using your -// Amazon Chime Voice Connector. -type Termination struct { - - // The countries to which calls are allowed, in ISO 3166-1 alpha-2 format. - // Required. - CallingRegions []string - - // The IP addresses allowed to make calls, in CIDR format. Required. - CidrAllowedList []string - - // The limit on calls per second. Max value based on account service quota. - // Default value of 1. - CpsLimit *int32 - - // The default caller ID phone number. - DefaultPhoneNumber *string - - // When termination settings are disabled, outbound calls can not be made. - Disabled *bool - - noSmithyDocumentSerde -} - -// The termination health details, including the source IP address and timestamp -// of the last successful SIP OPTIONS message from your SIP infrastructure. -type TerminationHealth struct { - - // The source IP address. - Source *string - - // The timestamp, in ISO 8601 format. - Timestamp *time.Time - - noSmithyDocumentSerde -} - -// The configuration for the current transcription operation. Must contain -// EngineTranscribeSettings or EngineTranscribeMedicalSettings . -type TranscriptionConfiguration struct { - - // The transcription configuration settings passed to Amazon Transcribe Medical. - EngineTranscribeMedicalSettings *EngineTranscribeMedicalSettings - - // The transcription configuration settings passed to Amazon Transcribe. - EngineTranscribeSettings *EngineTranscribeSettings - - noSmithyDocumentSerde -} - // The phone number ID, product type, or calling name fields to update, used with // the BatchUpdatePhoneNumberand UpdatePhoneNumber actions. type UpdatePhoneNumberRequestItem struct { @@ -1956,99 +591,6 @@ type UserSettings struct { noSmithyDocumentSerde } -// The video artifact configuration object. -type VideoArtifactsConfiguration struct { - - // Indicates whether the video artifact is enabled or disabled. - // - // This member is required. - State ArtifactsState - - // The MUX type of the video artifact configuration object. - MuxType VideoMuxType - - noSmithyDocumentSerde -} - -// The Amazon Chime Voice Connector configuration, including outbound host name -// and encryption settings. -type VoiceConnector struct { - - // The AWS Region in which the Amazon Chime Voice Connector is created. Default: - // us-east-1 . - AwsRegion VoiceConnectorAwsRegion - - // The Amazon Chime Voice Connector creation timestamp, in ISO 8601 format. - CreatedTimestamp *time.Time - - // The name of the Amazon Chime Voice Connector. - Name *string - - // The outbound host name for the Amazon Chime Voice Connector. - OutboundHostName *string - - // Designates whether encryption is required for the Amazon Chime Voice Connector. - RequireEncryption *bool - - // The updated Amazon Chime Voice Connector timestamp, in ISO 8601 format. - UpdatedTimestamp *time.Time - - // The ARN of the specified Amazon Chime Voice Connector. - VoiceConnectorArn *string - - // The Amazon Chime Voice Connector ID. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - -// The Amazon Chime Voice Connector group configuration, including associated -// Amazon Chime Voice Connectors. You can include Amazon Chime Voice Connectors -// from different AWS Regions in your group. This creates a fault tolerant -// mechanism for fallback in case of availability events. -type VoiceConnectorGroup struct { - - // The Amazon Chime Voice Connector group creation time stamp, in ISO 8601 format. - CreatedTimestamp *time.Time - - // The name of the Amazon Chime Voice Connector group. - Name *string - - // The updated Amazon Chime Voice Connector group time stamp, in ISO 8601 format. - UpdatedTimestamp *time.Time - - // The ARN of the specified Amazon Chime Voice Connector group. - VoiceConnectorGroupArn *string - - // The Amazon Chime Voice Connector group ID. - VoiceConnectorGroupId *string - - // The Amazon Chime Voice Connectors to which to route inbound calls. - VoiceConnectorItems []VoiceConnectorItem - - noSmithyDocumentSerde -} - -// For Amazon Chime Voice Connector groups, the Amazon Chime Voice Connectors to -// which to route inbound calls. Includes priority configuration settings. Limit: 3 -// VoiceConnectorItems per Amazon Chime Voice Connector group. -type VoiceConnectorItem struct { - - // The priority associated with the Amazon Chime Voice Connector, with 1 being the - // highest priority. Higher priority Amazon Chime Voice Connectors are attempted - // first. - // - // This member is required. - Priority *int32 - - // The Amazon Chime Voice Connector ID. - // - // This member is required. - VoiceConnectorId *string - - noSmithyDocumentSerde -} - // The Amazon Chime Voice Connector settings. Includes any Amazon S3 buckets // designated for storing call detail records. type VoiceConnectorSettings struct { diff --git a/service/chime/validators.go b/service/chime/validators.go index 205bece4fc8..4fa3cb520eb 100644 --- a/service/chime/validators.go +++ b/service/chime/validators.go @@ -10,46 +10,6 @@ import ( "github.com/aws/smithy-go/middleware" ) -type validateOpAssociatePhoneNumbersWithVoiceConnectorGroup struct { -} - -func (*validateOpAssociatePhoneNumbersWithVoiceConnectorGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociatePhoneNumbersWithVoiceConnectorGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociatePhoneNumbersWithVoiceConnectorGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociatePhoneNumbersWithVoiceConnectorGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpAssociatePhoneNumbersWithVoiceConnector struct { -} - -func (*validateOpAssociatePhoneNumbersWithVoiceConnector) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociatePhoneNumbersWithVoiceConnector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociatePhoneNumbersWithVoiceConnectorInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociatePhoneNumbersWithVoiceConnectorInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpAssociatePhoneNumberWithUser struct { } @@ -90,46 +50,6 @@ func (m *validateOpAssociateSigninDelegateGroupsWithAccount) HandleInitialize(ct return next.HandleInitialize(ctx, in) } -type validateOpBatchCreateAttendee struct { -} - -func (*validateOpBatchCreateAttendee) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpBatchCreateAttendee) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*BatchCreateAttendeeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpBatchCreateAttendeeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpBatchCreateChannelMembership struct { -} - -func (*validateOpBatchCreateChannelMembership) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpBatchCreateChannelMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*BatchCreateChannelMembershipInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpBatchCreateChannelMembershipInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - type validateOpBatchCreateRoomMembership struct { } @@ -270,6424 +190,1159 @@ func (m *validateOpCreateAccount) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } -type validateOpCreateAppInstanceAdmin struct { +type validateOpCreateBot struct { } -func (*validateOpCreateAppInstanceAdmin) ID() string { +func (*validateOpCreateBot) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateAppInstanceAdmin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateBot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateAppInstanceAdminInput) + input, ok := in.Parameters.(*CreateBotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateAppInstanceAdminInput(input); err != nil { + if err := validateOpCreateBotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateAppInstance struct { +type validateOpCreateMeetingDialOut struct { } -func (*validateOpCreateAppInstance) ID() string { +func (*validateOpCreateMeetingDialOut) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateMeetingDialOut) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateAppInstanceInput) + input, ok := in.Parameters.(*CreateMeetingDialOutInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateAppInstanceInput(input); err != nil { + if err := validateOpCreateMeetingDialOutInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateAppInstanceUser struct { +type validateOpCreatePhoneNumberOrder struct { } -func (*validateOpCreateAppInstanceUser) ID() string { +func (*validateOpCreatePhoneNumberOrder) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreatePhoneNumberOrder) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateAppInstanceUserInput) + input, ok := in.Parameters.(*CreatePhoneNumberOrderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateAppInstanceUserInput(input); err != nil { + if err := validateOpCreatePhoneNumberOrderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateAttendee struct { +type validateOpCreateRoom struct { } -func (*validateOpCreateAttendee) ID() string { +func (*validateOpCreateRoom) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateAttendee) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateRoom) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateAttendeeInput) + input, ok := in.Parameters.(*CreateRoomInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateAttendeeInput(input); err != nil { + if err := validateOpCreateRoomInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateBot struct { +type validateOpCreateRoomMembership struct { } -func (*validateOpCreateBot) ID() string { +func (*validateOpCreateRoomMembership) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateBot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateRoomMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateBotInput) + input, ok := in.Parameters.(*CreateRoomMembershipInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateBotInput(input); err != nil { + if err := validateOpCreateRoomMembershipInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateChannelBan struct { +type validateOpCreateUser struct { } -func (*validateOpCreateChannelBan) ID() string { +func (*validateOpCreateUser) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateChannelBan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateChannelBanInput) + input, ok := in.Parameters.(*CreateUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateChannelBanInput(input); err != nil { + if err := validateOpCreateUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateChannel struct { +type validateOpDeleteAccount struct { } -func (*validateOpCreateChannel) ID() string { +func (*validateOpDeleteAccount) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateChannelInput) + input, ok := in.Parameters.(*DeleteAccountInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateChannelInput(input); err != nil { + if err := validateOpDeleteAccountInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateChannelMembership struct { +type validateOpDeleteEventsConfiguration struct { } -func (*validateOpCreateChannelMembership) ID() string { +func (*validateOpDeleteEventsConfiguration) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateChannelMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteEventsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateChannelMembershipInput) + input, ok := in.Parameters.(*DeleteEventsConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateChannelMembershipInput(input); err != nil { + if err := validateOpDeleteEventsConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateChannelModerator struct { +type validateOpDeletePhoneNumber struct { } -func (*validateOpCreateChannelModerator) ID() string { +func (*validateOpDeletePhoneNumber) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateChannelModerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeletePhoneNumber) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateChannelModeratorInput) + input, ok := in.Parameters.(*DeletePhoneNumberInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateChannelModeratorInput(input); err != nil { + if err := validateOpDeletePhoneNumberInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateMediaCapturePipeline struct { +type validateOpDeleteRoom struct { } -func (*validateOpCreateMediaCapturePipeline) ID() string { +func (*validateOpDeleteRoom) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateMediaCapturePipeline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteRoom) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateMediaCapturePipelineInput) + input, ok := in.Parameters.(*DeleteRoomInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateMediaCapturePipelineInput(input); err != nil { + if err := validateOpDeleteRoomInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateMeetingDialOut struct { +type validateOpDeleteRoomMembership struct { } -func (*validateOpCreateMeetingDialOut) ID() string { +func (*validateOpDeleteRoomMembership) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateMeetingDialOut) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDeleteRoomMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateMeetingDialOutInput) + input, ok := in.Parameters.(*DeleteRoomMembershipInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateMeetingDialOutInput(input); err != nil { + if err := validateOpDeleteRoomMembershipInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateMeeting struct { +type validateOpDisassociatePhoneNumberFromUser struct { } -func (*validateOpCreateMeeting) ID() string { +func (*validateOpDisassociatePhoneNumberFromUser) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateMeeting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDisassociatePhoneNumberFromUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateMeetingInput) + input, ok := in.Parameters.(*DisassociatePhoneNumberFromUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateMeetingInput(input); err != nil { + if err := validateOpDisassociatePhoneNumberFromUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateMeetingWithAttendees struct { +type validateOpDisassociateSigninDelegateGroupsFromAccount struct { } -func (*validateOpCreateMeetingWithAttendees) ID() string { +func (*validateOpDisassociateSigninDelegateGroupsFromAccount) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateMeetingWithAttendees) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpDisassociateSigninDelegateGroupsFromAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateMeetingWithAttendeesInput) + input, ok := in.Parameters.(*DisassociateSigninDelegateGroupsFromAccountInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateMeetingWithAttendeesInput(input); err != nil { + if err := validateOpDisassociateSigninDelegateGroupsFromAccountInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreatePhoneNumberOrder struct { +type validateOpGetAccount struct { } -func (*validateOpCreatePhoneNumberOrder) ID() string { +func (*validateOpGetAccount) ID() string { return "OperationInputValidation" } -func (m *validateOpCreatePhoneNumberOrder) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreatePhoneNumberOrderInput) + input, ok := in.Parameters.(*GetAccountInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreatePhoneNumberOrderInput(input); err != nil { + if err := validateOpGetAccountInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateProxySession struct { +type validateOpGetAccountSettings struct { } -func (*validateOpCreateProxySession) ID() string { +func (*validateOpGetAccountSettings) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateProxySession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetAccountSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateProxySessionInput) + input, ok := in.Parameters.(*GetAccountSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateProxySessionInput(input); err != nil { + if err := validateOpGetAccountSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateRoom struct { +type validateOpGetBot struct { } -func (*validateOpCreateRoom) ID() string { +func (*validateOpGetBot) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateRoom) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetBot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateRoomInput) + input, ok := in.Parameters.(*GetBotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateRoomInput(input); err != nil { + if err := validateOpGetBotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateRoomMembership struct { +type validateOpGetEventsConfiguration struct { } -func (*validateOpCreateRoomMembership) ID() string { +func (*validateOpGetEventsConfiguration) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateRoomMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetEventsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateRoomMembershipInput) + input, ok := in.Parameters.(*GetEventsConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateRoomMembershipInput(input); err != nil { + if err := validateOpGetEventsConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateSipMediaApplicationCall struct { +type validateOpGetPhoneNumber struct { } -func (*validateOpCreateSipMediaApplicationCall) ID() string { +func (*validateOpGetPhoneNumber) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateSipMediaApplicationCall) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetPhoneNumber) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateSipMediaApplicationCallInput) + input, ok := in.Parameters.(*GetPhoneNumberInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateSipMediaApplicationCallInput(input); err != nil { + if err := validateOpGetPhoneNumberInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateSipMediaApplication struct { +type validateOpGetPhoneNumberOrder struct { } -func (*validateOpCreateSipMediaApplication) ID() string { +func (*validateOpGetPhoneNumberOrder) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateSipMediaApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetPhoneNumberOrder) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateSipMediaApplicationInput) + input, ok := in.Parameters.(*GetPhoneNumberOrderInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateSipMediaApplicationInput(input); err != nil { + if err := validateOpGetPhoneNumberOrderInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateSipRule struct { +type validateOpGetRetentionSettings struct { } -func (*validateOpCreateSipRule) ID() string { +func (*validateOpGetRetentionSettings) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateSipRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetRetentionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateSipRuleInput) + input, ok := in.Parameters.(*GetRetentionSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateSipRuleInput(input); err != nil { + if err := validateOpGetRetentionSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateUser struct { +type validateOpGetRoom struct { } -func (*validateOpCreateUser) ID() string { +func (*validateOpGetRoom) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetRoom) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateUserInput) + input, ok := in.Parameters.(*GetRoomInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateUserInput(input); err != nil { + if err := validateOpGetRoomInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateVoiceConnectorGroup struct { +type validateOpGetUser struct { } -func (*validateOpCreateVoiceConnectorGroup) ID() string { +func (*validateOpGetUser) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateVoiceConnectorGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateVoiceConnectorGroupInput) + input, ok := in.Parameters.(*GetUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateVoiceConnectorGroupInput(input); err != nil { + if err := validateOpGetUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpCreateVoiceConnector struct { +type validateOpGetUserSettings struct { } -func (*validateOpCreateVoiceConnector) ID() string { +func (*validateOpGetUserSettings) ID() string { return "OperationInputValidation" } -func (m *validateOpCreateVoiceConnector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpGetUserSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*CreateVoiceConnectorInput) + input, ok := in.Parameters.(*GetUserSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpCreateVoiceConnectorInput(input); err != nil { + if err := validateOpGetUserSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteAccount struct { +type validateOpInviteUsers struct { } -func (*validateOpDeleteAccount) ID() string { +func (*validateOpInviteUsers) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpInviteUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteAccountInput) + input, ok := in.Parameters.(*InviteUsersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteAccountInput(input); err != nil { + if err := validateOpInviteUsersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteAppInstanceAdmin struct { +type validateOpListBots struct { } -func (*validateOpDeleteAppInstanceAdmin) ID() string { +func (*validateOpListBots) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteAppInstanceAdmin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListBots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteAppInstanceAdminInput) + input, ok := in.Parameters.(*ListBotsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteAppInstanceAdminInput(input); err != nil { + if err := validateOpListBotsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteAppInstance struct { +type validateOpListRoomMemberships struct { } -func (*validateOpDeleteAppInstance) ID() string { +func (*validateOpListRoomMemberships) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListRoomMemberships) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteAppInstanceInput) + input, ok := in.Parameters.(*ListRoomMembershipsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteAppInstanceInput(input); err != nil { + if err := validateOpListRoomMembershipsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteAppInstanceStreamingConfigurations struct { +type validateOpListRooms struct { } -func (*validateOpDeleteAppInstanceStreamingConfigurations) ID() string { +func (*validateOpListRooms) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteAppInstanceStreamingConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListRooms) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteAppInstanceStreamingConfigurationsInput) + input, ok := in.Parameters.(*ListRoomsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteAppInstanceStreamingConfigurationsInput(input); err != nil { + if err := validateOpListRoomsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteAppInstanceUser struct { +type validateOpListSupportedPhoneNumberCountries struct { } -func (*validateOpDeleteAppInstanceUser) ID() string { +func (*validateOpListSupportedPhoneNumberCountries) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListSupportedPhoneNumberCountries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteAppInstanceUserInput) + input, ok := in.Parameters.(*ListSupportedPhoneNumberCountriesInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteAppInstanceUserInput(input); err != nil { + if err := validateOpListSupportedPhoneNumberCountriesInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteAttendee struct { +type validateOpListUsers struct { } -func (*validateOpDeleteAttendee) ID() string { +func (*validateOpListUsers) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteAttendee) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpListUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteAttendeeInput) + input, ok := in.Parameters.(*ListUsersInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteAttendeeInput(input); err != nil { + if err := validateOpListUsersInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteChannelBan struct { +type validateOpLogoutUser struct { } -func (*validateOpDeleteChannelBan) ID() string { +func (*validateOpLogoutUser) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteChannelBan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpLogoutUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteChannelBanInput) + input, ok := in.Parameters.(*LogoutUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteChannelBanInput(input); err != nil { + if err := validateOpLogoutUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteChannel struct { +type validateOpPutEventsConfiguration struct { } -func (*validateOpDeleteChannel) ID() string { +func (*validateOpPutEventsConfiguration) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpPutEventsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteChannelInput) + input, ok := in.Parameters.(*PutEventsConfigurationInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteChannelInput(input); err != nil { + if err := validateOpPutEventsConfigurationInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteChannelMembership struct { +type validateOpPutRetentionSettings struct { } -func (*validateOpDeleteChannelMembership) ID() string { +func (*validateOpPutRetentionSettings) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteChannelMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpPutRetentionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteChannelMembershipInput) + input, ok := in.Parameters.(*PutRetentionSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteChannelMembershipInput(input); err != nil { + if err := validateOpPutRetentionSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteChannelMessage struct { +type validateOpRedactConversationMessage struct { } -func (*validateOpDeleteChannelMessage) ID() string { +func (*validateOpRedactConversationMessage) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpRedactConversationMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteChannelMessageInput) + input, ok := in.Parameters.(*RedactConversationMessageInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteChannelMessageInput(input); err != nil { + if err := validateOpRedactConversationMessageInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteChannelModerator struct { +type validateOpRedactRoomMessage struct { } -func (*validateOpDeleteChannelModerator) ID() string { +func (*validateOpRedactRoomMessage) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteChannelModerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpRedactRoomMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteChannelModeratorInput) + input, ok := in.Parameters.(*RedactRoomMessageInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteChannelModeratorInput(input); err != nil { + if err := validateOpRedactRoomMessageInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteEventsConfiguration struct { +type validateOpRegenerateSecurityToken struct { } -func (*validateOpDeleteEventsConfiguration) ID() string { +func (*validateOpRegenerateSecurityToken) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteEventsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpRegenerateSecurityToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteEventsConfigurationInput) + input, ok := in.Parameters.(*RegenerateSecurityTokenInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteEventsConfigurationInput(input); err != nil { + if err := validateOpRegenerateSecurityTokenInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteMediaCapturePipeline struct { +type validateOpResetPersonalPIN struct { } -func (*validateOpDeleteMediaCapturePipeline) ID() string { +func (*validateOpResetPersonalPIN) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteMediaCapturePipeline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpResetPersonalPIN) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteMediaCapturePipelineInput) + input, ok := in.Parameters.(*ResetPersonalPINInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteMediaCapturePipelineInput(input); err != nil { + if err := validateOpResetPersonalPINInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteMeeting struct { +type validateOpRestorePhoneNumber struct { } -func (*validateOpDeleteMeeting) ID() string { +func (*validateOpRestorePhoneNumber) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteMeeting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpRestorePhoneNumber) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteMeetingInput) + input, ok := in.Parameters.(*RestorePhoneNumberInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteMeetingInput(input); err != nil { + if err := validateOpRestorePhoneNumberInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeletePhoneNumber struct { +type validateOpUpdateAccount struct { } -func (*validateOpDeletePhoneNumber) ID() string { +func (*validateOpUpdateAccount) ID() string { return "OperationInputValidation" } -func (m *validateOpDeletePhoneNumber) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdateAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeletePhoneNumberInput) + input, ok := in.Parameters.(*UpdateAccountInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeletePhoneNumberInput(input); err != nil { + if err := validateOpUpdateAccountInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteProxySession struct { +type validateOpUpdateAccountSettings struct { } -func (*validateOpDeleteProxySession) ID() string { +func (*validateOpUpdateAccountSettings) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteProxySession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdateAccountSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteProxySessionInput) + input, ok := in.Parameters.(*UpdateAccountSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteProxySessionInput(input); err != nil { + if err := validateOpUpdateAccountSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteRoom struct { +type validateOpUpdateBot struct { } -func (*validateOpDeleteRoom) ID() string { +func (*validateOpUpdateBot) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteRoom) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdateBot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteRoomInput) + input, ok := in.Parameters.(*UpdateBotInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteRoomInput(input); err != nil { + if err := validateOpUpdateBotInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteRoomMembership struct { +type validateOpUpdatePhoneNumber struct { } -func (*validateOpDeleteRoomMembership) ID() string { +func (*validateOpUpdatePhoneNumber) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteRoomMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdatePhoneNumber) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteRoomMembershipInput) + input, ok := in.Parameters.(*UpdatePhoneNumberInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteRoomMembershipInput(input); err != nil { + if err := validateOpUpdatePhoneNumberInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteSipMediaApplication struct { +type validateOpUpdatePhoneNumberSettings struct { } -func (*validateOpDeleteSipMediaApplication) ID() string { +func (*validateOpUpdatePhoneNumberSettings) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteSipMediaApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdatePhoneNumberSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteSipMediaApplicationInput) + input, ok := in.Parameters.(*UpdatePhoneNumberSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteSipMediaApplicationInput(input); err != nil { + if err := validateOpUpdatePhoneNumberSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteSipRule struct { +type validateOpUpdateRoom struct { } -func (*validateOpDeleteSipRule) ID() string { +func (*validateOpUpdateRoom) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteSipRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdateRoom) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteSipRuleInput) + input, ok := in.Parameters.(*UpdateRoomInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteSipRuleInput(input); err != nil { + if err := validateOpUpdateRoomInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteVoiceConnectorEmergencyCallingConfiguration struct { +type validateOpUpdateRoomMembership struct { } -func (*validateOpDeleteVoiceConnectorEmergencyCallingConfiguration) ID() string { +func (*validateOpUpdateRoomMembership) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteVoiceConnectorEmergencyCallingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdateRoomMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteVoiceConnectorEmergencyCallingConfigurationInput) + input, ok := in.Parameters.(*UpdateRoomMembershipInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteVoiceConnectorEmergencyCallingConfigurationInput(input); err != nil { + if err := validateOpUpdateRoomMembershipInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteVoiceConnectorGroup struct { +type validateOpUpdateUser struct { } -func (*validateOpDeleteVoiceConnectorGroup) ID() string { +func (*validateOpUpdateUser) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteVoiceConnectorGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteVoiceConnectorGroupInput) + input, ok := in.Parameters.(*UpdateUserInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteVoiceConnectorGroupInput(input); err != nil { + if err := validateOpUpdateUserInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteVoiceConnector struct { +type validateOpUpdateUserSettings struct { } -func (*validateOpDeleteVoiceConnector) ID() string { +func (*validateOpUpdateUserSettings) ID() string { return "OperationInputValidation" } -func (m *validateOpDeleteVoiceConnector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( +func (m *validateOpUpdateUserSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( out middleware.InitializeOutput, metadata middleware.Metadata, err error, ) { - input, ok := in.Parameters.(*DeleteVoiceConnectorInput) + input, ok := in.Parameters.(*UpdateUserSettingsInput) if !ok { return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) } - if err := validateOpDeleteVoiceConnectorInput(input); err != nil { + if err := validateOpUpdateUserSettingsInput(input); err != nil { return out, metadata, err } return next.HandleInitialize(ctx, in) } -type validateOpDeleteVoiceConnectorOrigination struct { +func addOpAssociatePhoneNumberWithUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociatePhoneNumberWithUser{}, middleware.After) } -func (*validateOpDeleteVoiceConnectorOrigination) ID() string { - return "OperationInputValidation" +func addOpAssociateSigninDelegateGroupsWithAccountValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAssociateSigninDelegateGroupsWithAccount{}, middleware.After) } -func (m *validateOpDeleteVoiceConnectorOrigination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVoiceConnectorOriginationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVoiceConnectorOriginationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpBatchCreateRoomMembershipValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchCreateRoomMembership{}, middleware.After) } -type validateOpDeleteVoiceConnectorProxy struct { +func addOpBatchDeletePhoneNumberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchDeletePhoneNumber{}, middleware.After) } -func (*validateOpDeleteVoiceConnectorProxy) ID() string { - return "OperationInputValidation" +func addOpBatchSuspendUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchSuspendUser{}, middleware.After) } -func (m *validateOpDeleteVoiceConnectorProxy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVoiceConnectorProxyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVoiceConnectorProxyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpBatchUnsuspendUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchUnsuspendUser{}, middleware.After) } -type validateOpDeleteVoiceConnectorStreamingConfiguration struct { +func addOpBatchUpdatePhoneNumberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchUpdatePhoneNumber{}, middleware.After) } -func (*validateOpDeleteVoiceConnectorStreamingConfiguration) ID() string { - return "OperationInputValidation" +func addOpBatchUpdateUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpBatchUpdateUser{}, middleware.After) } -func (m *validateOpDeleteVoiceConnectorStreamingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVoiceConnectorStreamingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVoiceConnectorStreamingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpCreateAccountValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateAccount{}, middleware.After) } -type validateOpDeleteVoiceConnectorTerminationCredentials struct { +func addOpCreateBotValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateBot{}, middleware.After) } -func (*validateOpDeleteVoiceConnectorTerminationCredentials) ID() string { - return "OperationInputValidation" +func addOpCreateMeetingDialOutValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateMeetingDialOut{}, middleware.After) } -func (m *validateOpDeleteVoiceConnectorTerminationCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVoiceConnectorTerminationCredentialsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVoiceConnectorTerminationCredentialsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpCreatePhoneNumberOrderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreatePhoneNumberOrder{}, middleware.After) } -type validateOpDeleteVoiceConnectorTermination struct { +func addOpCreateRoomValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRoom{}, middleware.After) } -func (*validateOpDeleteVoiceConnectorTermination) ID() string { - return "OperationInputValidation" +func addOpCreateRoomMembershipValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateRoomMembership{}, middleware.After) } -func (m *validateOpDeleteVoiceConnectorTermination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteVoiceConnectorTerminationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteVoiceConnectorTerminationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) } -type validateOpDescribeAppInstanceAdmin struct { +func addOpDeleteAccountValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteAccount{}, middleware.After) } -func (*validateOpDescribeAppInstanceAdmin) ID() string { - return "OperationInputValidation" +func addOpDeleteEventsConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteEventsConfiguration{}, middleware.After) } -func (m *validateOpDescribeAppInstanceAdmin) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeAppInstanceAdminInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeAppInstanceAdminInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpDeletePhoneNumberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeletePhoneNumber{}, middleware.After) } -type validateOpDescribeAppInstance struct { +func addOpDeleteRoomValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRoom{}, middleware.After) } -func (*validateOpDescribeAppInstance) ID() string { - return "OperationInputValidation" +func addOpDeleteRoomMembershipValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteRoomMembership{}, middleware.After) } -func (m *validateOpDescribeAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeAppInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeAppInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpDisassociatePhoneNumberFromUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociatePhoneNumberFromUser{}, middleware.After) } -type validateOpDescribeAppInstanceUser struct { +func addOpDisassociateSigninDelegateGroupsFromAccountValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDisassociateSigninDelegateGroupsFromAccount{}, middleware.After) } -func (*validateOpDescribeAppInstanceUser) ID() string { - return "OperationInputValidation" +func addOpGetAccountValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAccount{}, middleware.After) } -func (m *validateOpDescribeAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeAppInstanceUserInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeAppInstanceUserInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpGetAccountSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetAccountSettings{}, middleware.After) } -type validateOpDescribeChannelBan struct { +func addOpGetBotValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetBot{}, middleware.After) } -func (*validateOpDescribeChannelBan) ID() string { - return "OperationInputValidation" +func addOpGetEventsConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetEventsConfiguration{}, middleware.After) } -func (m *validateOpDescribeChannelBan) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeChannelBanInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeChannelBanInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpGetPhoneNumberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPhoneNumber{}, middleware.After) } -type validateOpDescribeChannel struct { +func addOpGetPhoneNumberOrderValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetPhoneNumberOrder{}, middleware.After) } -func (*validateOpDescribeChannel) ID() string { - return "OperationInputValidation" +func addOpGetRetentionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRetentionSettings{}, middleware.After) } -func (m *validateOpDescribeChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeChannelInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeChannelInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpGetRoomValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetRoom{}, middleware.After) } -type validateOpDescribeChannelMembershipForAppInstanceUser struct { +func addOpGetUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetUser{}, middleware.After) } -func (*validateOpDescribeChannelMembershipForAppInstanceUser) ID() string { - return "OperationInputValidation" +func addOpGetUserSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetUserSettings{}, middleware.After) } -func (m *validateOpDescribeChannelMembershipForAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeChannelMembershipForAppInstanceUserInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeChannelMembershipForAppInstanceUserInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpInviteUsersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpInviteUsers{}, middleware.After) } -type validateOpDescribeChannelMembership struct { +func addOpListBotsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListBots{}, middleware.After) } -func (*validateOpDescribeChannelMembership) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeChannelMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeChannelMembershipInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeChannelMembershipInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeChannelModeratedByAppInstanceUser struct { -} - -func (*validateOpDescribeChannelModeratedByAppInstanceUser) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeChannelModeratedByAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeChannelModeratedByAppInstanceUserInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeChannelModeratedByAppInstanceUserInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeChannelModerator struct { -} - -func (*validateOpDescribeChannelModerator) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeChannelModerator) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeChannelModeratorInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeChannelModeratorInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociatePhoneNumberFromUser struct { -} - -func (*validateOpDisassociatePhoneNumberFromUser) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociatePhoneNumberFromUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociatePhoneNumberFromUserInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociatePhoneNumberFromUserInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociatePhoneNumbersFromVoiceConnectorGroup struct { -} - -func (*validateOpDisassociatePhoneNumbersFromVoiceConnectorGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociatePhoneNumbersFromVoiceConnectorGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociatePhoneNumbersFromVoiceConnectorGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociatePhoneNumbersFromVoiceConnectorGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociatePhoneNumbersFromVoiceConnector struct { -} - -func (*validateOpDisassociatePhoneNumbersFromVoiceConnector) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociatePhoneNumbersFromVoiceConnector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociatePhoneNumbersFromVoiceConnectorInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociatePhoneNumbersFromVoiceConnectorInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateSigninDelegateGroupsFromAccount struct { -} - -func (*validateOpDisassociateSigninDelegateGroupsFromAccount) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateSigninDelegateGroupsFromAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateSigninDelegateGroupsFromAccountInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateSigninDelegateGroupsFromAccountInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetAccount struct { -} - -func (*validateOpGetAccount) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAccountInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAccountInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpListRoomMembershipsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRoomMemberships{}, middleware.After) } -type validateOpGetAccountSettings struct { +func addOpListRoomsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListRooms{}, middleware.After) } -func (*validateOpGetAccountSettings) ID() string { - return "OperationInputValidation" +func addOpListSupportedPhoneNumberCountriesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListSupportedPhoneNumberCountries{}, middleware.After) } -func (m *validateOpGetAccountSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAccountSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAccountSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) } -type validateOpGetAppInstanceRetentionSettings struct { +func addOpLogoutUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpLogoutUser{}, middleware.After) } -func (*validateOpGetAppInstanceRetentionSettings) ID() string { - return "OperationInputValidation" +func addOpPutEventsConfigurationValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutEventsConfiguration{}, middleware.After) } -func (m *validateOpGetAppInstanceRetentionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAppInstanceRetentionSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAppInstanceRetentionSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpPutRetentionSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutRetentionSettings{}, middleware.After) } -type validateOpGetAppInstanceStreamingConfigurations struct { +func addOpRedactConversationMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRedactConversationMessage{}, middleware.After) } -func (*validateOpGetAppInstanceStreamingConfigurations) ID() string { - return "OperationInputValidation" +func addOpRedactRoomMessageValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRedactRoomMessage{}, middleware.After) } -func (m *validateOpGetAppInstanceStreamingConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAppInstanceStreamingConfigurationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAppInstanceStreamingConfigurationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpRegenerateSecurityTokenValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRegenerateSecurityToken{}, middleware.After) } -type validateOpGetAttendee struct { +func addOpResetPersonalPINValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpResetPersonalPIN{}, middleware.After) } -func (*validateOpGetAttendee) ID() string { - return "OperationInputValidation" +func addOpRestorePhoneNumberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRestorePhoneNumber{}, middleware.After) } -func (m *validateOpGetAttendee) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetAttendeeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetAttendeeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpUpdateAccountValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAccount{}, middleware.After) } -type validateOpGetBot struct { +func addOpUpdateAccountSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateAccountSettings{}, middleware.After) } -func (*validateOpGetBot) ID() string { - return "OperationInputValidation" +func addOpUpdateBotValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBot{}, middleware.After) } -func (m *validateOpGetBot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetBotInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetBotInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpUpdatePhoneNumberValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdatePhoneNumber{}, middleware.After) } -type validateOpGetChannelMessage struct { +func addOpUpdatePhoneNumberSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdatePhoneNumberSettings{}, middleware.After) } -func (*validateOpGetChannelMessage) ID() string { - return "OperationInputValidation" +func addOpUpdateRoomValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRoom{}, middleware.After) } -func (m *validateOpGetChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetChannelMessageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetChannelMessageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) +func addOpUpdateRoomMembershipValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateRoomMembership{}, middleware.After) } -type validateOpGetEventsConfiguration struct { +func addOpUpdateUserValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateUser{}, middleware.After) } -func (*validateOpGetEventsConfiguration) ID() string { - return "OperationInputValidation" +func addOpUpdateUserSettingsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateUserSettings{}, middleware.After) } -func (m *validateOpGetEventsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetEventsConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) +func validateTelephonySettings(v *types.TelephonySettings) error { + if v == nil { + return nil } - if err := validateOpGetEventsConfigurationInput(input); err != nil { - return out, metadata, err + invalidParams := smithy.InvalidParamsError{Context: "TelephonySettings"} + if v.InboundCalling == nil { + invalidParams.Add(smithy.NewErrParamRequired("InboundCalling")) } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetMediaCapturePipeline struct { -} - -func (*validateOpGetMediaCapturePipeline) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetMediaCapturePipeline) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetMediaCapturePipelineInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetMediaCapturePipelineInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetMeeting struct { -} - -func (*validateOpGetMeeting) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetMeeting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetMeetingInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetMeetingInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetPhoneNumber struct { -} - -func (*validateOpGetPhoneNumber) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetPhoneNumber) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetPhoneNumberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetPhoneNumberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetPhoneNumberOrder struct { -} - -func (*validateOpGetPhoneNumberOrder) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetPhoneNumberOrder) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetPhoneNumberOrderInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetPhoneNumberOrderInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetProxySession struct { -} - -func (*validateOpGetProxySession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetProxySession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetProxySessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetProxySessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetRetentionSettings struct { -} - -func (*validateOpGetRetentionSettings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetRetentionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetRetentionSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetRetentionSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetRoom struct { -} - -func (*validateOpGetRoom) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetRoom) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetRoomInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetRoomInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetSipMediaApplication struct { -} - -func (*validateOpGetSipMediaApplication) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetSipMediaApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetSipMediaApplicationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetSipMediaApplicationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetSipMediaApplicationLoggingConfiguration struct { -} - -func (*validateOpGetSipMediaApplicationLoggingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetSipMediaApplicationLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetSipMediaApplicationLoggingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetSipMediaApplicationLoggingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetSipRule struct { -} - -func (*validateOpGetSipRule) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetSipRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetSipRuleInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetSipRuleInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetUser struct { -} - -func (*validateOpGetUser) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetUserInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetUserInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetUserSettings struct { -} - -func (*validateOpGetUserSettings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetUserSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetUserSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetUserSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnectorEmergencyCallingConfiguration struct { -} - -func (*validateOpGetVoiceConnectorEmergencyCallingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnectorEmergencyCallingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorEmergencyCallingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorEmergencyCallingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnectorGroup struct { -} - -func (*validateOpGetVoiceConnectorGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnectorGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnector struct { -} - -func (*validateOpGetVoiceConnector) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnectorLoggingConfiguration struct { -} - -func (*validateOpGetVoiceConnectorLoggingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnectorLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorLoggingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorLoggingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnectorOrigination struct { -} - -func (*validateOpGetVoiceConnectorOrigination) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnectorOrigination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorOriginationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorOriginationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnectorProxy struct { -} - -func (*validateOpGetVoiceConnectorProxy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnectorProxy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorProxyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorProxyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnectorStreamingConfiguration struct { -} - -func (*validateOpGetVoiceConnectorStreamingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnectorStreamingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorStreamingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorStreamingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnectorTerminationHealth struct { -} - -func (*validateOpGetVoiceConnectorTerminationHealth) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnectorTerminationHealth) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorTerminationHealthInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorTerminationHealthInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpGetVoiceConnectorTermination struct { -} - -func (*validateOpGetVoiceConnectorTermination) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpGetVoiceConnectorTermination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*GetVoiceConnectorTerminationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpGetVoiceConnectorTerminationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpInviteUsers struct { -} - -func (*validateOpInviteUsers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpInviteUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*InviteUsersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpInviteUsersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListAppInstanceAdmins struct { -} - -func (*validateOpListAppInstanceAdmins) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListAppInstanceAdmins) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListAppInstanceAdminsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListAppInstanceAdminsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListAppInstanceUsers struct { -} - -func (*validateOpListAppInstanceUsers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListAppInstanceUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListAppInstanceUsersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListAppInstanceUsersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListAttendees struct { -} - -func (*validateOpListAttendees) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListAttendees) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListAttendeesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListAttendeesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListAttendeeTags struct { -} - -func (*validateOpListAttendeeTags) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListAttendeeTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListAttendeeTagsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListAttendeeTagsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListBots struct { -} - -func (*validateOpListBots) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListBots) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListBotsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListBotsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListChannelBans struct { -} - -func (*validateOpListChannelBans) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListChannelBans) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListChannelBansInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListChannelBansInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListChannelMemberships struct { -} - -func (*validateOpListChannelMemberships) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListChannelMemberships) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListChannelMembershipsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListChannelMembershipsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListChannelMessages struct { -} - -func (*validateOpListChannelMessages) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListChannelMessages) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListChannelMessagesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListChannelMessagesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListChannelModerators struct { -} - -func (*validateOpListChannelModerators) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListChannelModerators) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListChannelModeratorsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListChannelModeratorsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListChannels struct { -} - -func (*validateOpListChannels) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListChannels) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListChannelsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListChannelsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListMeetingTags struct { -} - -func (*validateOpListMeetingTags) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListMeetingTags) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListMeetingTagsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListMeetingTagsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListProxySessions struct { -} - -func (*validateOpListProxySessions) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListProxySessions) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListProxySessionsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListProxySessionsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListRoomMemberships struct { -} - -func (*validateOpListRoomMemberships) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListRoomMemberships) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListRoomMembershipsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListRoomMembershipsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListRooms struct { -} - -func (*validateOpListRooms) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListRooms) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListRoomsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListRoomsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListSupportedPhoneNumberCountries struct { -} - -func (*validateOpListSupportedPhoneNumberCountries) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListSupportedPhoneNumberCountries) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListSupportedPhoneNumberCountriesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListSupportedPhoneNumberCountriesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTagsForResource struct { -} - -func (*validateOpListTagsForResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTagsForResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTagsForResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListUsers struct { -} - -func (*validateOpListUsers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListUsers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListUsersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListUsersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListVoiceConnectorTerminationCredentials struct { -} - -func (*validateOpListVoiceConnectorTerminationCredentials) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListVoiceConnectorTerminationCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListVoiceConnectorTerminationCredentialsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListVoiceConnectorTerminationCredentialsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpLogoutUser struct { -} - -func (*validateOpLogoutUser) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpLogoutUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*LogoutUserInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpLogoutUserInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutAppInstanceRetentionSettings struct { -} - -func (*validateOpPutAppInstanceRetentionSettings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutAppInstanceRetentionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutAppInstanceRetentionSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutAppInstanceRetentionSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutAppInstanceStreamingConfigurations struct { -} - -func (*validateOpPutAppInstanceStreamingConfigurations) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutAppInstanceStreamingConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutAppInstanceStreamingConfigurationsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutAppInstanceStreamingConfigurationsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutEventsConfiguration struct { -} - -func (*validateOpPutEventsConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutEventsConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutEventsConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutEventsConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutRetentionSettings struct { -} - -func (*validateOpPutRetentionSettings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutRetentionSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutRetentionSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutRetentionSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutSipMediaApplicationLoggingConfiguration struct { -} - -func (*validateOpPutSipMediaApplicationLoggingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutSipMediaApplicationLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutSipMediaApplicationLoggingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutSipMediaApplicationLoggingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutVoiceConnectorEmergencyCallingConfiguration struct { -} - -func (*validateOpPutVoiceConnectorEmergencyCallingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutVoiceConnectorEmergencyCallingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutVoiceConnectorEmergencyCallingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutVoiceConnectorEmergencyCallingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutVoiceConnectorLoggingConfiguration struct { -} - -func (*validateOpPutVoiceConnectorLoggingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutVoiceConnectorLoggingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutVoiceConnectorLoggingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutVoiceConnectorLoggingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutVoiceConnectorOrigination struct { -} - -func (*validateOpPutVoiceConnectorOrigination) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutVoiceConnectorOrigination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutVoiceConnectorOriginationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutVoiceConnectorOriginationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutVoiceConnectorProxy struct { -} - -func (*validateOpPutVoiceConnectorProxy) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutVoiceConnectorProxy) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutVoiceConnectorProxyInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutVoiceConnectorProxyInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutVoiceConnectorStreamingConfiguration struct { -} - -func (*validateOpPutVoiceConnectorStreamingConfiguration) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutVoiceConnectorStreamingConfiguration) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutVoiceConnectorStreamingConfigurationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutVoiceConnectorStreamingConfigurationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutVoiceConnectorTerminationCredentials struct { -} - -func (*validateOpPutVoiceConnectorTerminationCredentials) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutVoiceConnectorTerminationCredentials) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutVoiceConnectorTerminationCredentialsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutVoiceConnectorTerminationCredentialsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpPutVoiceConnectorTermination struct { -} - -func (*validateOpPutVoiceConnectorTermination) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpPutVoiceConnectorTermination) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*PutVoiceConnectorTerminationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpPutVoiceConnectorTerminationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRedactChannelMessage struct { -} - -func (*validateOpRedactChannelMessage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRedactChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RedactChannelMessageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRedactChannelMessageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRedactConversationMessage struct { -} - -func (*validateOpRedactConversationMessage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRedactConversationMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RedactConversationMessageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRedactConversationMessageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRedactRoomMessage struct { -} - -func (*validateOpRedactRoomMessage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRedactRoomMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RedactRoomMessageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRedactRoomMessageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRegenerateSecurityToken struct { -} - -func (*validateOpRegenerateSecurityToken) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRegenerateSecurityToken) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RegenerateSecurityTokenInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRegenerateSecurityTokenInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpResetPersonalPIN struct { -} - -func (*validateOpResetPersonalPIN) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpResetPersonalPIN) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ResetPersonalPINInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpResetPersonalPINInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpRestorePhoneNumber struct { -} - -func (*validateOpRestorePhoneNumber) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpRestorePhoneNumber) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*RestorePhoneNumberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpRestorePhoneNumberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpSendChannelMessage struct { -} - -func (*validateOpSendChannelMessage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpSendChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*SendChannelMessageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpSendChannelMessageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStartMeetingTranscription struct { -} - -func (*validateOpStartMeetingTranscription) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStartMeetingTranscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StartMeetingTranscriptionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStartMeetingTranscriptionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpStopMeetingTranscription struct { -} - -func (*validateOpStopMeetingTranscription) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpStopMeetingTranscription) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*StopMeetingTranscriptionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpStopMeetingTranscriptionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTagAttendee struct { -} - -func (*validateOpTagAttendee) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTagAttendee) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TagAttendeeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTagAttendeeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTagMeeting struct { -} - -func (*validateOpTagMeeting) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTagMeeting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TagMeetingInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTagMeetingInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTagResource struct { -} - -func (*validateOpTagResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TagResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTagResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUntagAttendee struct { -} - -func (*validateOpUntagAttendee) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUntagAttendee) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UntagAttendeeInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUntagAttendeeInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUntagMeeting struct { -} - -func (*validateOpUntagMeeting) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUntagMeeting) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UntagMeetingInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUntagMeetingInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUntagResource struct { -} - -func (*validateOpUntagResource) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UntagResourceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUntagResourceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateAccount struct { -} - -func (*validateOpUpdateAccount) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateAccount) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateAccountInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateAccountInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateAccountSettings struct { -} - -func (*validateOpUpdateAccountSettings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateAccountSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateAccountSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateAccountSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateAppInstance struct { -} - -func (*validateOpUpdateAppInstance) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateAppInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateAppInstanceInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateAppInstanceInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateAppInstanceUser struct { -} - -func (*validateOpUpdateAppInstanceUser) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateAppInstanceUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateAppInstanceUserInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateAppInstanceUserInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateBot struct { -} - -func (*validateOpUpdateBot) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateBot) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateBotInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateBotInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateChannel struct { -} - -func (*validateOpUpdateChannel) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateChannel) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateChannelInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateChannelInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateChannelMessage struct { -} - -func (*validateOpUpdateChannelMessage) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateChannelMessage) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateChannelMessageInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateChannelMessageInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateChannelReadMarker struct { -} - -func (*validateOpUpdateChannelReadMarker) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateChannelReadMarker) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateChannelReadMarkerInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateChannelReadMarkerInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdatePhoneNumber struct { -} - -func (*validateOpUpdatePhoneNumber) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdatePhoneNumber) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdatePhoneNumberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdatePhoneNumberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdatePhoneNumberSettings struct { -} - -func (*validateOpUpdatePhoneNumberSettings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdatePhoneNumberSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdatePhoneNumberSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdatePhoneNumberSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateProxySession struct { -} - -func (*validateOpUpdateProxySession) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateProxySession) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateProxySessionInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateProxySessionInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateRoom struct { -} - -func (*validateOpUpdateRoom) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateRoom) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateRoomInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateRoomInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateRoomMembership struct { -} - -func (*validateOpUpdateRoomMembership) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateRoomMembership) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateRoomMembershipInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateRoomMembershipInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateSipMediaApplicationCall struct { -} - -func (*validateOpUpdateSipMediaApplicationCall) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateSipMediaApplicationCall) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateSipMediaApplicationCallInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateSipMediaApplicationCallInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateSipMediaApplication struct { -} - -func (*validateOpUpdateSipMediaApplication) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateSipMediaApplication) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateSipMediaApplicationInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateSipMediaApplicationInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateSipRule struct { -} - -func (*validateOpUpdateSipRule) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateSipRule) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateSipRuleInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateSipRuleInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateUser struct { -} - -func (*validateOpUpdateUser) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateUser) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateUserInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateUserInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateUserSettings struct { -} - -func (*validateOpUpdateUserSettings) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateUserSettings) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateUserSettingsInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateUserSettingsInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateVoiceConnectorGroup struct { -} - -func (*validateOpUpdateVoiceConnectorGroup) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateVoiceConnectorGroup) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateVoiceConnectorGroupInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateVoiceConnectorGroupInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateVoiceConnector struct { -} - -func (*validateOpUpdateVoiceConnector) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateVoiceConnector) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateVoiceConnectorInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateVoiceConnectorInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpValidateE911Address struct { -} - -func (*validateOpValidateE911Address) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpValidateE911Address) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ValidateE911AddressInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpValidateE911AddressInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpAssociatePhoneNumbersWithVoiceConnectorGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociatePhoneNumbersWithVoiceConnectorGroup{}, middleware.After) -} - -func addOpAssociatePhoneNumbersWithVoiceConnectorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociatePhoneNumbersWithVoiceConnector{}, middleware.After) -} - -func addOpAssociatePhoneNumberWithUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociatePhoneNumberWithUser{}, middleware.After) -} - -func addOpAssociateSigninDelegateGroupsWithAccountValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateSigninDelegateGroupsWithAccount{}, middleware.After) -} - -func addOpBatchCreateAttendeeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchCreateAttendee{}, middleware.After) -} - -func addOpBatchCreateChannelMembershipValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchCreateChannelMembership{}, middleware.After) -} - -func addOpBatchCreateRoomMembershipValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchCreateRoomMembership{}, middleware.After) -} - -func addOpBatchDeletePhoneNumberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchDeletePhoneNumber{}, middleware.After) -} - -func addOpBatchSuspendUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchSuspendUser{}, middleware.After) -} - -func addOpBatchUnsuspendUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchUnsuspendUser{}, middleware.After) -} - -func addOpBatchUpdatePhoneNumberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchUpdatePhoneNumber{}, middleware.After) -} - -func addOpBatchUpdateUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpBatchUpdateUser{}, middleware.After) -} - -func addOpCreateAccountValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateAccount{}, middleware.After) -} - -func addOpCreateAppInstanceAdminValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateAppInstanceAdmin{}, middleware.After) -} - -func addOpCreateAppInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateAppInstance{}, middleware.After) -} - -func addOpCreateAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateAppInstanceUser{}, middleware.After) -} - -func addOpCreateAttendeeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateAttendee{}, middleware.After) -} - -func addOpCreateBotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateBot{}, middleware.After) -} - -func addOpCreateChannelBanValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateChannelBan{}, middleware.After) -} - -func addOpCreateChannelValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateChannel{}, middleware.After) -} - -func addOpCreateChannelMembershipValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateChannelMembership{}, middleware.After) -} - -func addOpCreateChannelModeratorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateChannelModerator{}, middleware.After) -} - -func addOpCreateMediaCapturePipelineValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateMediaCapturePipeline{}, middleware.After) -} - -func addOpCreateMeetingDialOutValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateMeetingDialOut{}, middleware.After) -} - -func addOpCreateMeetingValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateMeeting{}, middleware.After) -} - -func addOpCreateMeetingWithAttendeesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateMeetingWithAttendees{}, middleware.After) -} - -func addOpCreatePhoneNumberOrderValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreatePhoneNumberOrder{}, middleware.After) -} - -func addOpCreateProxySessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateProxySession{}, middleware.After) -} - -func addOpCreateRoomValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateRoom{}, middleware.After) -} - -func addOpCreateRoomMembershipValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateRoomMembership{}, middleware.After) -} - -func addOpCreateSipMediaApplicationCallValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSipMediaApplicationCall{}, middleware.After) -} - -func addOpCreateSipMediaApplicationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSipMediaApplication{}, middleware.After) -} - -func addOpCreateSipRuleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateSipRule{}, middleware.After) -} - -func addOpCreateUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateUser{}, middleware.After) -} - -func addOpCreateVoiceConnectorGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVoiceConnectorGroup{}, middleware.After) -} - -func addOpCreateVoiceConnectorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateVoiceConnector{}, middleware.After) -} - -func addOpDeleteAccountValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteAccount{}, middleware.After) -} - -func addOpDeleteAppInstanceAdminValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteAppInstanceAdmin{}, middleware.After) -} - -func addOpDeleteAppInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteAppInstance{}, middleware.After) -} - -func addOpDeleteAppInstanceStreamingConfigurationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteAppInstanceStreamingConfigurations{}, middleware.After) -} - -func addOpDeleteAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteAppInstanceUser{}, middleware.After) -} - -func addOpDeleteAttendeeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteAttendee{}, middleware.After) -} - -func addOpDeleteChannelBanValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteChannelBan{}, middleware.After) -} - -func addOpDeleteChannelValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteChannel{}, middleware.After) -} - -func addOpDeleteChannelMembershipValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteChannelMembership{}, middleware.After) -} - -func addOpDeleteChannelMessageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteChannelMessage{}, middleware.After) -} - -func addOpDeleteChannelModeratorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteChannelModerator{}, middleware.After) -} - -func addOpDeleteEventsConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteEventsConfiguration{}, middleware.After) -} - -func addOpDeleteMediaCapturePipelineValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteMediaCapturePipeline{}, middleware.After) -} - -func addOpDeleteMeetingValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteMeeting{}, middleware.After) -} - -func addOpDeletePhoneNumberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeletePhoneNumber{}, middleware.After) -} - -func addOpDeleteProxySessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteProxySession{}, middleware.After) -} - -func addOpDeleteRoomValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteRoom{}, middleware.After) -} - -func addOpDeleteRoomMembershipValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteRoomMembership{}, middleware.After) -} - -func addOpDeleteSipMediaApplicationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteSipMediaApplication{}, middleware.After) -} - -func addOpDeleteSipRuleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteSipRule{}, middleware.After) -} - -func addOpDeleteVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) -} - -func addOpDeleteVoiceConnectorGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVoiceConnectorGroup{}, middleware.After) -} - -func addOpDeleteVoiceConnectorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVoiceConnector{}, middleware.After) -} - -func addOpDeleteVoiceConnectorOriginationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVoiceConnectorOrigination{}, middleware.After) -} - -func addOpDeleteVoiceConnectorProxyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVoiceConnectorProxy{}, middleware.After) -} - -func addOpDeleteVoiceConnectorStreamingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVoiceConnectorStreamingConfiguration{}, middleware.After) -} - -func addOpDeleteVoiceConnectorTerminationCredentialsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVoiceConnectorTerminationCredentials{}, middleware.After) -} - -func addOpDeleteVoiceConnectorTerminationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteVoiceConnectorTermination{}, middleware.After) -} - -func addOpDescribeAppInstanceAdminValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeAppInstanceAdmin{}, middleware.After) -} - -func addOpDescribeAppInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeAppInstance{}, middleware.After) -} - -func addOpDescribeAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeAppInstanceUser{}, middleware.After) -} - -func addOpDescribeChannelBanValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeChannelBan{}, middleware.After) -} - -func addOpDescribeChannelValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeChannel{}, middleware.After) -} - -func addOpDescribeChannelMembershipForAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeChannelMembershipForAppInstanceUser{}, middleware.After) -} - -func addOpDescribeChannelMembershipValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeChannelMembership{}, middleware.After) -} - -func addOpDescribeChannelModeratedByAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeChannelModeratedByAppInstanceUser{}, middleware.After) -} - -func addOpDescribeChannelModeratorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeChannelModerator{}, middleware.After) -} - -func addOpDisassociatePhoneNumberFromUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociatePhoneNumberFromUser{}, middleware.After) -} - -func addOpDisassociatePhoneNumbersFromVoiceConnectorGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociatePhoneNumbersFromVoiceConnectorGroup{}, middleware.After) -} - -func addOpDisassociatePhoneNumbersFromVoiceConnectorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociatePhoneNumbersFromVoiceConnector{}, middleware.After) -} - -func addOpDisassociateSigninDelegateGroupsFromAccountValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateSigninDelegateGroupsFromAccount{}, middleware.After) -} - -func addOpGetAccountValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAccount{}, middleware.After) -} - -func addOpGetAccountSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAccountSettings{}, middleware.After) -} - -func addOpGetAppInstanceRetentionSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAppInstanceRetentionSettings{}, middleware.After) -} - -func addOpGetAppInstanceStreamingConfigurationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAppInstanceStreamingConfigurations{}, middleware.After) -} - -func addOpGetAttendeeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetAttendee{}, middleware.After) -} - -func addOpGetBotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetBot{}, middleware.After) -} - -func addOpGetChannelMessageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetChannelMessage{}, middleware.After) -} - -func addOpGetEventsConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetEventsConfiguration{}, middleware.After) -} - -func addOpGetMediaCapturePipelineValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetMediaCapturePipeline{}, middleware.After) -} - -func addOpGetMeetingValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetMeeting{}, middleware.After) -} - -func addOpGetPhoneNumberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetPhoneNumber{}, middleware.After) -} - -func addOpGetPhoneNumberOrderValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetPhoneNumberOrder{}, middleware.After) -} - -func addOpGetProxySessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetProxySession{}, middleware.After) -} - -func addOpGetRetentionSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetRetentionSettings{}, middleware.After) -} - -func addOpGetRoomValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetRoom{}, middleware.After) -} - -func addOpGetSipMediaApplicationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetSipMediaApplication{}, middleware.After) -} - -func addOpGetSipMediaApplicationLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetSipMediaApplicationLoggingConfiguration{}, middleware.After) -} - -func addOpGetSipRuleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetSipRule{}, middleware.After) -} - -func addOpGetUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetUser{}, middleware.After) -} - -func addOpGetUserSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetUserSettings{}, middleware.After) -} - -func addOpGetVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) -} - -func addOpGetVoiceConnectorGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnectorGroup{}, middleware.After) -} - -func addOpGetVoiceConnectorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnector{}, middleware.After) -} - -func addOpGetVoiceConnectorLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnectorLoggingConfiguration{}, middleware.After) -} - -func addOpGetVoiceConnectorOriginationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnectorOrigination{}, middleware.After) -} - -func addOpGetVoiceConnectorProxyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnectorProxy{}, middleware.After) -} - -func addOpGetVoiceConnectorStreamingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnectorStreamingConfiguration{}, middleware.After) -} - -func addOpGetVoiceConnectorTerminationHealthValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnectorTerminationHealth{}, middleware.After) -} - -func addOpGetVoiceConnectorTerminationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpGetVoiceConnectorTermination{}, middleware.After) -} - -func addOpInviteUsersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpInviteUsers{}, middleware.After) -} - -func addOpListAppInstanceAdminsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListAppInstanceAdmins{}, middleware.After) -} - -func addOpListAppInstanceUsersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListAppInstanceUsers{}, middleware.After) -} - -func addOpListAttendeesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListAttendees{}, middleware.After) -} - -func addOpListAttendeeTagsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListAttendeeTags{}, middleware.After) -} - -func addOpListBotsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListBots{}, middleware.After) -} - -func addOpListChannelBansValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListChannelBans{}, middleware.After) -} - -func addOpListChannelMembershipsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListChannelMemberships{}, middleware.After) -} - -func addOpListChannelMessagesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListChannelMessages{}, middleware.After) -} - -func addOpListChannelModeratorsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListChannelModerators{}, middleware.After) -} - -func addOpListChannelsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListChannels{}, middleware.After) -} - -func addOpListMeetingTagsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListMeetingTags{}, middleware.After) -} - -func addOpListProxySessionsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListProxySessions{}, middleware.After) -} - -func addOpListRoomMembershipsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListRoomMemberships{}, middleware.After) -} - -func addOpListRoomsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListRooms{}, middleware.After) -} - -func addOpListSupportedPhoneNumberCountriesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListSupportedPhoneNumberCountries{}, middleware.After) -} - -func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) -} - -func addOpListUsersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListUsers{}, middleware.After) -} - -func addOpListVoiceConnectorTerminationCredentialsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListVoiceConnectorTerminationCredentials{}, middleware.After) -} - -func addOpLogoutUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpLogoutUser{}, middleware.After) -} - -func addOpPutAppInstanceRetentionSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutAppInstanceRetentionSettings{}, middleware.After) -} - -func addOpPutAppInstanceStreamingConfigurationsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutAppInstanceStreamingConfigurations{}, middleware.After) -} - -func addOpPutEventsConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutEventsConfiguration{}, middleware.After) -} - -func addOpPutRetentionSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutRetentionSettings{}, middleware.After) -} - -func addOpPutSipMediaApplicationLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutSipMediaApplicationLoggingConfiguration{}, middleware.After) -} - -func addOpPutVoiceConnectorEmergencyCallingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutVoiceConnectorEmergencyCallingConfiguration{}, middleware.After) -} - -func addOpPutVoiceConnectorLoggingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutVoiceConnectorLoggingConfiguration{}, middleware.After) -} - -func addOpPutVoiceConnectorOriginationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutVoiceConnectorOrigination{}, middleware.After) -} - -func addOpPutVoiceConnectorProxyValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutVoiceConnectorProxy{}, middleware.After) -} - -func addOpPutVoiceConnectorStreamingConfigurationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutVoiceConnectorStreamingConfiguration{}, middleware.After) -} - -func addOpPutVoiceConnectorTerminationCredentialsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutVoiceConnectorTerminationCredentials{}, middleware.After) -} - -func addOpPutVoiceConnectorTerminationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpPutVoiceConnectorTermination{}, middleware.After) -} - -func addOpRedactChannelMessageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRedactChannelMessage{}, middleware.After) -} - -func addOpRedactConversationMessageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRedactConversationMessage{}, middleware.After) -} - -func addOpRedactRoomMessageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRedactRoomMessage{}, middleware.After) -} - -func addOpRegenerateSecurityTokenValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRegenerateSecurityToken{}, middleware.After) -} - -func addOpResetPersonalPINValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpResetPersonalPIN{}, middleware.After) -} - -func addOpRestorePhoneNumberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpRestorePhoneNumber{}, middleware.After) -} - -func addOpSendChannelMessageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpSendChannelMessage{}, middleware.After) -} - -func addOpStartMeetingTranscriptionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStartMeetingTranscription{}, middleware.After) -} - -func addOpStopMeetingTranscriptionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpStopMeetingTranscription{}, middleware.After) -} - -func addOpTagAttendeeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTagAttendee{}, middleware.After) -} - -func addOpTagMeetingValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTagMeeting{}, middleware.After) -} - -func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) -} - -func addOpUntagAttendeeValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUntagAttendee{}, middleware.After) -} - -func addOpUntagMeetingValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUntagMeeting{}, middleware.After) -} - -func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) -} - -func addOpUpdateAccountValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateAccount{}, middleware.After) -} - -func addOpUpdateAccountSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateAccountSettings{}, middleware.After) -} - -func addOpUpdateAppInstanceValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateAppInstance{}, middleware.After) -} - -func addOpUpdateAppInstanceUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateAppInstanceUser{}, middleware.After) -} - -func addOpUpdateBotValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateBot{}, middleware.After) -} - -func addOpUpdateChannelValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateChannel{}, middleware.After) -} - -func addOpUpdateChannelMessageValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateChannelMessage{}, middleware.After) -} - -func addOpUpdateChannelReadMarkerValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateChannelReadMarker{}, middleware.After) -} - -func addOpUpdatePhoneNumberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdatePhoneNumber{}, middleware.After) -} - -func addOpUpdatePhoneNumberSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdatePhoneNumberSettings{}, middleware.After) -} - -func addOpUpdateProxySessionValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateProxySession{}, middleware.After) -} - -func addOpUpdateRoomValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateRoom{}, middleware.After) -} - -func addOpUpdateRoomMembershipValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateRoomMembership{}, middleware.After) -} - -func addOpUpdateSipMediaApplicationCallValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateSipMediaApplicationCall{}, middleware.After) -} - -func addOpUpdateSipMediaApplicationValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateSipMediaApplication{}, middleware.After) -} - -func addOpUpdateSipRuleValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateSipRule{}, middleware.After) -} - -func addOpUpdateUserValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateUser{}, middleware.After) -} - -func addOpUpdateUserSettingsValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateUserSettings{}, middleware.After) -} - -func addOpUpdateVoiceConnectorGroupValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateVoiceConnectorGroup{}, middleware.After) -} - -func addOpUpdateVoiceConnectorValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateVoiceConnector{}, middleware.After) -} - -func addOpValidateE911AddressValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpValidateE911Address{}, middleware.After) -} - -func validateAppInstanceStreamingConfiguration(v *types.AppInstanceStreamingConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AppInstanceStreamingConfiguration"} - if len(v.AppInstanceDataType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceDataType")) - } - if v.ResourceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateAppInstanceStreamingConfigurationList(v []types.AppInstanceStreamingConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AppInstanceStreamingConfigurationList"} - for i := range v { - if err := validateAppInstanceStreamingConfiguration(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateArtifactsConfiguration(v *types.ArtifactsConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ArtifactsConfiguration"} - if v.Audio == nil { - invalidParams.Add(smithy.NewErrParamRequired("Audio")) - } else if v.Audio != nil { - if err := validateAudioArtifactsConfiguration(v.Audio); err != nil { - invalidParams.AddNested("Audio", err.(smithy.InvalidParamsError)) - } - } - if v.Video == nil { - invalidParams.Add(smithy.NewErrParamRequired("Video")) - } else if v.Video != nil { - if err := validateVideoArtifactsConfiguration(v.Video); err != nil { - invalidParams.AddNested("Video", err.(smithy.InvalidParamsError)) - } - } - if v.Content == nil { - invalidParams.Add(smithy.NewErrParamRequired("Content")) - } else if v.Content != nil { - if err := validateContentArtifactsConfiguration(v.Content); err != nil { - invalidParams.AddNested("Content", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateAttendeeTagList(v []types.Tag) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AttendeeTagList"} - for i := range v { - if err := validateTag(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateAudioArtifactsConfiguration(v *types.AudioArtifactsConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AudioArtifactsConfiguration"} - if len(v.MuxType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("MuxType")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateChimeSdkMeetingConfiguration(v *types.ChimeSdkMeetingConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ChimeSdkMeetingConfiguration"} - if v.ArtifactsConfiguration != nil { - if err := validateArtifactsConfiguration(v.ArtifactsConfiguration); err != nil { - invalidParams.AddNested("ArtifactsConfiguration", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateContentArtifactsConfiguration(v *types.ContentArtifactsConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ContentArtifactsConfiguration"} - if len(v.State) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("State")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCreateAttendeeRequestItem(v *types.CreateAttendeeRequestItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateAttendeeRequestItem"} - if v.ExternalUserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ExternalUserId")) - } - if v.Tags != nil { - if err := validateAttendeeTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCreateAttendeeRequestItemList(v []types.CreateAttendeeRequestItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateAttendeeRequestItemList"} - for i := range v { - if err := validateCreateAttendeeRequestItem(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCreateMeetingWithAttendeesRequestItemList(v []types.CreateAttendeeRequestItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateMeetingWithAttendeesRequestItemList"} - for i := range v { - if err := validateCreateAttendeeRequestItem(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateDNISEmergencyCallingConfiguration(v *types.DNISEmergencyCallingConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DNISEmergencyCallingConfiguration"} - if v.EmergencyPhoneNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("EmergencyPhoneNumber")) - } - if v.CallingCountry == nil { - invalidParams.Add(smithy.NewErrParamRequired("CallingCountry")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateDNISEmergencyCallingConfigurationList(v []types.DNISEmergencyCallingConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DNISEmergencyCallingConfigurationList"} - for i := range v { - if err := validateDNISEmergencyCallingConfiguration(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateEmergencyCallingConfiguration(v *types.EmergencyCallingConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EmergencyCallingConfiguration"} - if v.DNIS != nil { - if err := validateDNISEmergencyCallingConfigurationList(v.DNIS); err != nil { - invalidParams.AddNested("DNIS", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateEngineTranscribeMedicalSettings(v *types.EngineTranscribeMedicalSettings) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "EngineTranscribeMedicalSettings"} - if len(v.LanguageCode) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("LanguageCode")) - } - if len(v.Specialty) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Specialty")) - } - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateGeoMatchParams(v *types.GeoMatchParams) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GeoMatchParams"} - if v.Country == nil { - invalidParams.Add(smithy.NewErrParamRequired("Country")) - } - if v.AreaCode == nil { - invalidParams.Add(smithy.NewErrParamRequired("AreaCode")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateMeetingTagList(v []types.Tag) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "MeetingTagList"} - for i := range v { - if err := validateTag(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateStreamingConfiguration(v *types.StreamingConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StreamingConfiguration"} - if v.DataRetentionInHours == nil { - invalidParams.Add(smithy.NewErrParamRequired("DataRetentionInHours")) - } - if v.StreamingNotificationTargets != nil { - if err := validateStreamingNotificationTargetList(v.StreamingNotificationTargets); err != nil { - invalidParams.AddNested("StreamingNotificationTargets", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateStreamingNotificationTarget(v *types.StreamingNotificationTarget) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StreamingNotificationTarget"} - if len(v.NotificationTarget) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("NotificationTarget")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateStreamingNotificationTargetList(v []types.StreamingNotificationTarget) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "StreamingNotificationTargetList"} - for i := range v { - if err := validateStreamingNotificationTarget(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateTag(v *types.Tag) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Tag"} - if v.Key == nil { - invalidParams.Add(smithy.NewErrParamRequired("Key")) - } - if v.Value == nil { - invalidParams.Add(smithy.NewErrParamRequired("Value")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateTagList(v []types.Tag) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TagList"} - for i := range v { - if err := validateTag(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateTelephonySettings(v *types.TelephonySettings) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TelephonySettings"} - if v.InboundCalling == nil { - invalidParams.Add(smithy.NewErrParamRequired("InboundCalling")) - } - if v.OutboundCalling == nil { - invalidParams.Add(smithy.NewErrParamRequired("OutboundCalling")) - } - if v.SMS == nil { - invalidParams.Add(smithy.NewErrParamRequired("SMS")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateTranscriptionConfiguration(v *types.TranscriptionConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TranscriptionConfiguration"} - if v.EngineTranscribeMedicalSettings != nil { - if err := validateEngineTranscribeMedicalSettings(v.EngineTranscribeMedicalSettings); err != nil { - invalidParams.AddNested("EngineTranscribeMedicalSettings", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUpdatePhoneNumberRequestItem(v *types.UpdatePhoneNumberRequestItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdatePhoneNumberRequestItem"} - if v.PhoneNumberId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUpdatePhoneNumberRequestItemList(v []types.UpdatePhoneNumberRequestItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdatePhoneNumberRequestItemList"} - for i := range v { - if err := validateUpdatePhoneNumberRequestItem(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUpdateUserRequestItem(v *types.UpdateUserRequestItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateUserRequestItem"} - if v.UserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUpdateUserRequestItemList(v []types.UpdateUserRequestItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateUserRequestItemList"} - for i := range v { - if err := validateUpdateUserRequestItem(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateUserSettings(v *types.UserSettings) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UserSettings"} - if v.Telephony == nil { - invalidParams.Add(smithy.NewErrParamRequired("Telephony")) - } else if v.Telephony != nil { - if err := validateTelephonySettings(v.Telephony); err != nil { - invalidParams.AddNested("Telephony", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVideoArtifactsConfiguration(v *types.VideoArtifactsConfiguration) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VideoArtifactsConfiguration"} - if len(v.State) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("State")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVoiceConnectorItem(v *types.VoiceConnectorItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VoiceConnectorItem"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.Priority == nil { - invalidParams.Add(smithy.NewErrParamRequired("Priority")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateVoiceConnectorItemList(v []types.VoiceConnectorItem) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "VoiceConnectorItemList"} - for i := range v { - if err := validateVoiceConnectorItem(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociatePhoneNumbersWithVoiceConnectorGroupInput(v *AssociatePhoneNumbersWithVoiceConnectorGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociatePhoneNumbersWithVoiceConnectorGroupInput"} - if v.VoiceConnectorGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorGroupId")) - } - if v.E164PhoneNumbers == nil { - invalidParams.Add(smithy.NewErrParamRequired("E164PhoneNumbers")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociatePhoneNumbersWithVoiceConnectorInput(v *AssociatePhoneNumbersWithVoiceConnectorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociatePhoneNumbersWithVoiceConnectorInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.E164PhoneNumbers == nil { - invalidParams.Add(smithy.NewErrParamRequired("E164PhoneNumbers")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociatePhoneNumberWithUserInput(v *AssociatePhoneNumberWithUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociatePhoneNumberWithUserInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserId")) - } - if v.E164PhoneNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("E164PhoneNumber")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateSigninDelegateGroupsWithAccountInput(v *AssociateSigninDelegateGroupsWithAccountInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateSigninDelegateGroupsWithAccountInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.SigninDelegateGroups == nil { - invalidParams.Add(smithy.NewErrParamRequired("SigninDelegateGroups")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchCreateAttendeeInput(v *BatchCreateAttendeeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchCreateAttendeeInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if v.Attendees == nil { - invalidParams.Add(smithy.NewErrParamRequired("Attendees")) - } else if v.Attendees != nil { - if err := validateCreateAttendeeRequestItemList(v.Attendees); err != nil { - invalidParams.AddNested("Attendees", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchCreateChannelMembershipInput(v *BatchCreateChannelMembershipInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchCreateChannelMembershipInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MemberArns == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberArns")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchCreateRoomMembershipInput(v *BatchCreateRoomMembershipInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchCreateRoomMembershipInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) - } - if v.MembershipItemList == nil { - invalidParams.Add(smithy.NewErrParamRequired("MembershipItemList")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchDeletePhoneNumberInput(v *BatchDeletePhoneNumberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchDeletePhoneNumberInput"} - if v.PhoneNumberIds == nil { - invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberIds")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchSuspendUserInput(v *BatchSuspendUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchSuspendUserInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UserIdList == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserIdList")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchUnsuspendUserInput(v *BatchUnsuspendUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchUnsuspendUserInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UserIdList == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserIdList")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchUpdatePhoneNumberInput(v *BatchUpdatePhoneNumberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchUpdatePhoneNumberInput"} - if v.UpdatePhoneNumberRequestItems == nil { - invalidParams.Add(smithy.NewErrParamRequired("UpdatePhoneNumberRequestItems")) - } else if v.UpdatePhoneNumberRequestItems != nil { - if err := validateUpdatePhoneNumberRequestItemList(v.UpdatePhoneNumberRequestItems); err != nil { - invalidParams.AddNested("UpdatePhoneNumberRequestItems", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpBatchUpdateUserInput(v *BatchUpdateUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateUserInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UpdateUserRequestItems == nil { - invalidParams.Add(smithy.NewErrParamRequired("UpdateUserRequestItems")) - } else if v.UpdateUserRequestItems != nil { - if err := validateUpdateUserRequestItemList(v.UpdateUserRequestItems); err != nil { - invalidParams.AddNested("UpdateUserRequestItems", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateAccountInput(v *CreateAccountInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateAccountInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateAppInstanceAdminInput(v *CreateAppInstanceAdminInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceAdminInput"} - if v.AppInstanceAdminArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn")) - } - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateAppInstanceInput(v *CreateAppInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.ClientRequestToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) - } - if v.Tags != nil { - if err := validateTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateAppInstanceUserInput(v *CreateAppInstanceUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateAppInstanceUserInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if v.AppInstanceUserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.ClientRequestToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) - } - if v.Tags != nil { - if err := validateTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateAttendeeInput(v *CreateAttendeeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateAttendeeInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if v.ExternalUserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ExternalUserId")) - } - if v.Tags != nil { - if err := validateAttendeeTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateBotInput(v *CreateBotInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateBotInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.DisplayName == nil { - invalidParams.Add(smithy.NewErrParamRequired("DisplayName")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateChannelBanInput(v *CreateChannelBanInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateChannelBanInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MemberArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateChannelInput(v *CreateChannelInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateChannelInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.ClientRequestToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) - } - if v.Tags != nil { - if err := validateTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateChannelMembershipInput(v *CreateChannelMembershipInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateChannelMembershipInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MemberArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) - } - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateChannelModeratorInput(v *CreateChannelModeratorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateChannelModeratorInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.ChannelModeratorArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelModeratorArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateMediaCapturePipelineInput(v *CreateMediaCapturePipelineInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateMediaCapturePipelineInput"} - if len(v.SourceType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SourceType")) - } - if v.SourceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("SourceArn")) - } - if len(v.SinkType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("SinkType")) - } - if v.SinkArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("SinkArn")) - } - if v.ChimeSdkMeetingConfiguration != nil { - if err := validateChimeSdkMeetingConfiguration(v.ChimeSdkMeetingConfiguration); err != nil { - invalidParams.AddNested("ChimeSdkMeetingConfiguration", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateMeetingDialOutInput(v *CreateMeetingDialOutInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateMeetingDialOutInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if v.FromPhoneNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("FromPhoneNumber")) - } - if v.ToPhoneNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("ToPhoneNumber")) - } - if v.JoinToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("JoinToken")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateMeetingInput(v *CreateMeetingInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateMeetingInput"} - if v.ClientRequestToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) - } - if v.Tags != nil { - if err := validateMeetingTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateMeetingWithAttendeesInput(v *CreateMeetingWithAttendeesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateMeetingWithAttendeesInput"} - if v.ClientRequestToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) - } - if v.Tags != nil { - if err := validateMeetingTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } - } - if v.Attendees != nil { - if err := validateCreateMeetingWithAttendeesRequestItemList(v.Attendees); err != nil { - invalidParams.AddNested("Attendees", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreatePhoneNumberOrderInput(v *CreatePhoneNumberOrderInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreatePhoneNumberOrderInput"} - if len(v.ProductType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ProductType")) - } - if v.E164PhoneNumbers == nil { - invalidParams.Add(smithy.NewErrParamRequired("E164PhoneNumbers")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateProxySessionInput(v *CreateProxySessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateProxySessionInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.ParticipantPhoneNumbers == nil { - invalidParams.Add(smithy.NewErrParamRequired("ParticipantPhoneNumbers")) - } - if v.Capabilities == nil { - invalidParams.Add(smithy.NewErrParamRequired("Capabilities")) - } - if v.GeoMatchParams != nil { - if err := validateGeoMatchParams(v.GeoMatchParams); err != nil { - invalidParams.AddNested("GeoMatchParams", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateRoomInput(v *CreateRoomInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateRoomInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateRoomMembershipInput(v *CreateRoomMembershipInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateRoomMembershipInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) - } - if v.MemberId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSipMediaApplicationCallInput(v *CreateSipMediaApplicationCallInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSipMediaApplicationCallInput"} - if v.FromPhoneNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("FromPhoneNumber")) - } - if v.ToPhoneNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("ToPhoneNumber")) - } - if v.SipMediaApplicationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipMediaApplicationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSipMediaApplicationInput(v *CreateSipMediaApplicationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSipMediaApplicationInput"} - if v.AwsRegion == nil { - invalidParams.Add(smithy.NewErrParamRequired("AwsRegion")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.Endpoints == nil { - invalidParams.Add(smithy.NewErrParamRequired("Endpoints")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateSipRuleInput(v *CreateSipRuleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateSipRuleInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if len(v.TriggerType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("TriggerType")) - } - if v.TriggerValue == nil { - invalidParams.Add(smithy.NewErrParamRequired("TriggerValue")) - } - if v.TargetApplications == nil { - invalidParams.Add(smithy.NewErrParamRequired("TargetApplications")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateUserInput(v *CreateUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVoiceConnectorGroupInput(v *CreateVoiceConnectorGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVoiceConnectorGroupInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.VoiceConnectorItems != nil { - if err := validateVoiceConnectorItemList(v.VoiceConnectorItems); err != nil { - invalidParams.AddNested("VoiceConnectorItems", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateVoiceConnectorInput(v *CreateVoiceConnectorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateVoiceConnectorInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.RequireEncryption == nil { - invalidParams.Add(smithy.NewErrParamRequired("RequireEncryption")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteAccountInput(v *DeleteAccountInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteAccountInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteAppInstanceAdminInput(v *DeleteAppInstanceAdminInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteAppInstanceAdminInput"} - if v.AppInstanceAdminArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn")) - } - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteAppInstanceInput(v *DeleteAppInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteAppInstanceInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteAppInstanceStreamingConfigurationsInput(v *DeleteAppInstanceStreamingConfigurationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteAppInstanceStreamingConfigurationsInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteAppInstanceUserInput(v *DeleteAppInstanceUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteAppInstanceUserInput"} - if v.AppInstanceUserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteAttendeeInput(v *DeleteAttendeeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteAttendeeInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if v.AttendeeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AttendeeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteChannelBanInput(v *DeleteChannelBanInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelBanInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MemberArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteChannelInput(v *DeleteChannelInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteChannelMembershipInput(v *DeleteChannelMembershipInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelMembershipInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MemberArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteChannelMessageInput(v *DeleteChannelMessageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelMessageInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MessageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MessageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteChannelModeratorInput(v *DeleteChannelModeratorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteChannelModeratorInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.ChannelModeratorArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelModeratorArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteEventsConfigurationInput(v *DeleteEventsConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteEventsConfigurationInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.BotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteMediaCapturePipelineInput(v *DeleteMediaCapturePipelineInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteMediaCapturePipelineInput"} - if v.MediaPipelineId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MediaPipelineId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteMeetingInput(v *DeleteMeetingInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteMeetingInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeletePhoneNumberInput(v *DeletePhoneNumberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeletePhoneNumberInput"} - if v.PhoneNumberId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteProxySessionInput(v *DeleteProxySessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteProxySessionInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.ProxySessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProxySessionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteRoomInput(v *DeleteRoomInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteRoomInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteRoomMembershipInput(v *DeleteRoomMembershipInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteRoomMembershipInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) - } - if v.MemberId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteSipMediaApplicationInput(v *DeleteSipMediaApplicationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteSipMediaApplicationInput"} - if v.SipMediaApplicationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipMediaApplicationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteSipRuleInput(v *DeleteSipRuleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteSipRuleInput"} - if v.SipRuleId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipRuleId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVoiceConnectorEmergencyCallingConfigurationInput(v *DeleteVoiceConnectorEmergencyCallingConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVoiceConnectorEmergencyCallingConfigurationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVoiceConnectorGroupInput(v *DeleteVoiceConnectorGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVoiceConnectorGroupInput"} - if v.VoiceConnectorGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorGroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVoiceConnectorInput(v *DeleteVoiceConnectorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVoiceConnectorInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVoiceConnectorOriginationInput(v *DeleteVoiceConnectorOriginationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVoiceConnectorOriginationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVoiceConnectorProxyInput(v *DeleteVoiceConnectorProxyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVoiceConnectorProxyInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVoiceConnectorStreamingConfigurationInput(v *DeleteVoiceConnectorStreamingConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVoiceConnectorStreamingConfigurationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVoiceConnectorTerminationCredentialsInput(v *DeleteVoiceConnectorTerminationCredentialsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVoiceConnectorTerminationCredentialsInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.Usernames == nil { - invalidParams.Add(smithy.NewErrParamRequired("Usernames")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteVoiceConnectorTerminationInput(v *DeleteVoiceConnectorTerminationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteVoiceConnectorTerminationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeAppInstanceAdminInput(v *DescribeAppInstanceAdminInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeAppInstanceAdminInput"} - if v.AppInstanceAdminArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceAdminArn")) - } - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeAppInstanceInput(v *DescribeAppInstanceInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeAppInstanceInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeAppInstanceUserInput(v *DescribeAppInstanceUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeAppInstanceUserInput"} - if v.AppInstanceUserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeChannelBanInput(v *DescribeChannelBanInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelBanInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MemberArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeChannelInput(v *DescribeChannelInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeChannelMembershipForAppInstanceUserInput(v *DescribeChannelMembershipForAppInstanceUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelMembershipForAppInstanceUserInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.AppInstanceUserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeChannelMembershipInput(v *DescribeChannelMembershipInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelMembershipInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MemberArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeChannelModeratedByAppInstanceUserInput(v *DescribeChannelModeratedByAppInstanceUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelModeratedByAppInstanceUserInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.AppInstanceUserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeChannelModeratorInput(v *DescribeChannelModeratorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeChannelModeratorInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.ChannelModeratorArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelModeratorArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociatePhoneNumberFromUserInput(v *DisassociatePhoneNumberFromUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociatePhoneNumberFromUserInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociatePhoneNumbersFromVoiceConnectorGroupInput(v *DisassociatePhoneNumbersFromVoiceConnectorGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociatePhoneNumbersFromVoiceConnectorGroupInput"} - if v.VoiceConnectorGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorGroupId")) - } - if v.E164PhoneNumbers == nil { - invalidParams.Add(smithy.NewErrParamRequired("E164PhoneNumbers")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociatePhoneNumbersFromVoiceConnectorInput(v *DisassociatePhoneNumbersFromVoiceConnectorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociatePhoneNumbersFromVoiceConnectorInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.E164PhoneNumbers == nil { - invalidParams.Add(smithy.NewErrParamRequired("E164PhoneNumbers")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateSigninDelegateGroupsFromAccountInput(v *DisassociateSigninDelegateGroupsFromAccountInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateSigninDelegateGroupsFromAccountInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.GroupNames == nil { - invalidParams.Add(smithy.NewErrParamRequired("GroupNames")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAccountInput(v *GetAccountInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAccountInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAccountSettingsInput(v *GetAccountSettingsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAccountSettingsInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAppInstanceRetentionSettingsInput(v *GetAppInstanceRetentionSettingsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAppInstanceRetentionSettingsInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAppInstanceStreamingConfigurationsInput(v *GetAppInstanceStreamingConfigurationsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAppInstanceStreamingConfigurationsInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetAttendeeInput(v *GetAttendeeInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetAttendeeInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if v.AttendeeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AttendeeId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetBotInput(v *GetBotInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetBotInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.BotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetChannelMessageInput(v *GetChannelMessageInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetChannelMessageInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MessageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MessageId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetEventsConfigurationInput(v *GetEventsConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetEventsConfigurationInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.BotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BotId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetMediaCapturePipelineInput(v *GetMediaCapturePipelineInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetMediaCapturePipelineInput"} - if v.MediaPipelineId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MediaPipelineId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetMeetingInput(v *GetMeetingInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetMeetingInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetPhoneNumberInput(v *GetPhoneNumberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetPhoneNumberInput"} - if v.PhoneNumberId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetPhoneNumberOrderInput(v *GetPhoneNumberOrderInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetPhoneNumberOrderInput"} - if v.PhoneNumberOrderId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberOrderId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetProxySessionInput(v *GetProxySessionInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetProxySessionInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.ProxySessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProxySessionId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetRetentionSettingsInput(v *GetRetentionSettingsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetRetentionSettingsInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetRoomInput(v *GetRoomInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetRoomInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetSipMediaApplicationInput(v *GetSipMediaApplicationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetSipMediaApplicationInput"} - if v.SipMediaApplicationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipMediaApplicationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetSipMediaApplicationLoggingConfigurationInput(v *GetSipMediaApplicationLoggingConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetSipMediaApplicationLoggingConfigurationInput"} - if v.SipMediaApplicationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipMediaApplicationId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetSipRuleInput(v *GetSipRuleInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetSipRuleInput"} - if v.SipRuleId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipRuleId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetUserInput(v *GetUserInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetUserInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetUserSettingsInput(v *GetUserSettingsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetUserSettingsInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorEmergencyCallingConfigurationInput(v *GetVoiceConnectorEmergencyCallingConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorEmergencyCallingConfigurationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorGroupInput(v *GetVoiceConnectorGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorGroupInput"} - if v.VoiceConnectorGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorGroupId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorInput(v *GetVoiceConnectorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorLoggingConfigurationInput(v *GetVoiceConnectorLoggingConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorLoggingConfigurationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorOriginationInput(v *GetVoiceConnectorOriginationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorOriginationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorProxyInput(v *GetVoiceConnectorProxyInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorProxyInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorStreamingConfigurationInput(v *GetVoiceConnectorStreamingConfigurationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorStreamingConfigurationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorTerminationHealthInput(v *GetVoiceConnectorTerminationHealthInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorTerminationHealthInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpGetVoiceConnectorTerminationInput(v *GetVoiceConnectorTerminationInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GetVoiceConnectorTerminationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpInviteUsersInput(v *InviteUsersInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "InviteUsersInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UserEmailList == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserEmailList")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListAppInstanceAdminsInput(v *ListAppInstanceAdminsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListAppInstanceAdminsInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListAppInstanceUsersInput(v *ListAppInstanceUsersInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListAppInstanceUsersInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListAttendeesInput(v *ListAttendeesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListAttendeesInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListAttendeeTagsInput(v *ListAttendeeTagsInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListAttendeeTagsInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) + if v.OutboundCalling == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutboundCalling")) } - if v.AttendeeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AttendeeId")) + if v.SMS == nil { + invalidParams.Add(smithy.NewErrParamRequired("SMS")) } if invalidParams.Len() > 0 { return invalidParams @@ -6696,13 +1351,13 @@ func validateOpListAttendeeTagsInput(v *ListAttendeeTagsInput) error { } } -func validateOpListBotsInput(v *ListBotsInput) error { +func validateUpdatePhoneNumberRequestItem(v *types.UpdatePhoneNumberRequestItem) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListBotsInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + invalidParams := smithy.InvalidParamsError{Context: "UpdatePhoneNumberRequestItem"} + if v.PhoneNumberId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) } if invalidParams.Len() > 0 { return invalidParams @@ -6711,13 +1366,15 @@ func validateOpListBotsInput(v *ListBotsInput) error { } } -func validateOpListChannelBansInput(v *ListChannelBansInput) error { +func validateUpdatePhoneNumberRequestItemList(v []types.UpdatePhoneNumberRequestItem) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListChannelBansInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + invalidParams := smithy.InvalidParamsError{Context: "UpdatePhoneNumberRequestItemList"} + for i := range v { + if err := validateUpdatePhoneNumberRequestItem(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -6726,13 +1383,13 @@ func validateOpListChannelBansInput(v *ListChannelBansInput) error { } } -func validateOpListChannelMembershipsInput(v *ListChannelMembershipsInput) error { +func validateUpdateUserRequestItem(v *types.UpdateUserRequestItem) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListChannelMembershipsInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + invalidParams := smithy.InvalidParamsError{Context: "UpdateUserRequestItem"} + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams @@ -6741,13 +1398,15 @@ func validateOpListChannelMembershipsInput(v *ListChannelMembershipsInput) error } } -func validateOpListChannelMessagesInput(v *ListChannelMessagesInput) error { +func validateUpdateUserRequestItemList(v []types.UpdateUserRequestItem) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListChannelMessagesInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + invalidParams := smithy.InvalidParamsError{Context: "UpdateUserRequestItemList"} + for i := range v { + if err := validateUpdateUserRequestItem(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -6756,13 +1415,17 @@ func validateOpListChannelMessagesInput(v *ListChannelMessagesInput) error { } } -func validateOpListChannelModeratorsInput(v *ListChannelModeratorsInput) error { +func validateUserSettings(v *types.UserSettings) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListChannelModeratorsInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + invalidParams := smithy.InvalidParamsError{Context: "UserSettings"} + if v.Telephony == nil { + invalidParams.Add(smithy.NewErrParamRequired("Telephony")) + } else if v.Telephony != nil { + if err := validateTelephonySettings(v.Telephony); err != nil { + invalidParams.AddNested("Telephony", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -6771,13 +1434,19 @@ func validateOpListChannelModeratorsInput(v *ListChannelModeratorsInput) error { } } -func validateOpListChannelsInput(v *ListChannelsInput) error { +func validateOpAssociatePhoneNumberWithUserInput(v *AssociatePhoneNumberWithUserInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListChannelsInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + invalidParams := smithy.InvalidParamsError{Context: "AssociatePhoneNumberWithUserInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) + } + if v.E164PhoneNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("E164PhoneNumber")) } if invalidParams.Len() > 0 { return invalidParams @@ -6786,13 +1455,16 @@ func validateOpListChannelsInput(v *ListChannelsInput) error { } } -func validateOpListMeetingTagsInput(v *ListMeetingTagsInput) error { +func validateOpAssociateSigninDelegateGroupsWithAccountInput(v *AssociateSigninDelegateGroupsWithAccountInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListMeetingTagsInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) + invalidParams := smithy.InvalidParamsError{Context: "AssociateSigninDelegateGroupsWithAccountInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.SigninDelegateGroups == nil { + invalidParams.Add(smithy.NewErrParamRequired("SigninDelegateGroups")) } if invalidParams.Len() > 0 { return invalidParams @@ -6801,13 +1473,19 @@ func validateOpListMeetingTagsInput(v *ListMeetingTagsInput) error { } } -func validateOpListProxySessionsInput(v *ListProxySessionsInput) error { +func validateOpBatchCreateRoomMembershipInput(v *BatchCreateRoomMembershipInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListProxySessionsInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) + invalidParams := smithy.InvalidParamsError{Context: "BatchCreateRoomMembershipInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) + } + if v.MembershipItemList == nil { + invalidParams.Add(smithy.NewErrParamRequired("MembershipItemList")) } if invalidParams.Len() > 0 { return invalidParams @@ -6816,16 +1494,13 @@ func validateOpListProxySessionsInput(v *ListProxySessionsInput) error { } } -func validateOpListRoomMembershipsInput(v *ListRoomMembershipsInput) error { +func validateOpBatchDeletePhoneNumberInput(v *BatchDeletePhoneNumberInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListRoomMembershipsInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) + invalidParams := smithy.InvalidParamsError{Context: "BatchDeletePhoneNumberInput"} + if v.PhoneNumberIds == nil { + invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberIds")) } if invalidParams.Len() > 0 { return invalidParams @@ -6834,14 +1509,17 @@ func validateOpListRoomMembershipsInput(v *ListRoomMembershipsInput) error { } } -func validateOpListRoomsInput(v *ListRoomsInput) error { +func validateOpBatchSuspendUserInput(v *BatchSuspendUserInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListRoomsInput"} + invalidParams := smithy.InvalidParamsError{Context: "BatchSuspendUserInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } + if v.UserIdList == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserIdList")) + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -6849,13 +1527,16 @@ func validateOpListRoomsInput(v *ListRoomsInput) error { } } -func validateOpListSupportedPhoneNumberCountriesInput(v *ListSupportedPhoneNumberCountriesInput) error { +func validateOpBatchUnsuspendUserInput(v *BatchUnsuspendUserInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListSupportedPhoneNumberCountriesInput"} - if len(v.ProductType) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("ProductType")) + invalidParams := smithy.InvalidParamsError{Context: "BatchUnsuspendUserInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.UserIdList == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserIdList")) } if invalidParams.Len() > 0 { return invalidParams @@ -6864,13 +1545,17 @@ func validateOpListSupportedPhoneNumberCountriesInput(v *ListSupportedPhoneNumbe } } -func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { +func validateOpBatchUpdatePhoneNumberInput(v *BatchUpdatePhoneNumberInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} - if v.ResourceARN == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdatePhoneNumberInput"} + if v.UpdatePhoneNumberRequestItems == nil { + invalidParams.Add(smithy.NewErrParamRequired("UpdatePhoneNumberRequestItems")) + } else if v.UpdatePhoneNumberRequestItems != nil { + if err := validateUpdatePhoneNumberRequestItemList(v.UpdatePhoneNumberRequestItems); err != nil { + invalidParams.AddNested("UpdatePhoneNumberRequestItems", err.(smithy.InvalidParamsError)) + } } if invalidParams.Len() > 0 { return invalidParams @@ -6879,14 +1564,21 @@ func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { } } -func validateOpListUsersInput(v *ListUsersInput) error { +func validateOpBatchUpdateUserInput(v *BatchUpdateUserInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListUsersInput"} + invalidParams := smithy.InvalidParamsError{Context: "BatchUpdateUserInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } + if v.UpdateUserRequestItems == nil { + invalidParams.Add(smithy.NewErrParamRequired("UpdateUserRequestItems")) + } else if v.UpdateUserRequestItems != nil { + if err := validateUpdateUserRequestItemList(v.UpdateUserRequestItems); err != nil { + invalidParams.AddNested("UpdateUserRequestItems", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -6894,13 +1586,13 @@ func validateOpListUsersInput(v *ListUsersInput) error { } } -func validateOpListVoiceConnectorTerminationCredentialsInput(v *ListVoiceConnectorTerminationCredentialsInput) error { +func validateOpCreateAccountInput(v *CreateAccountInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ListVoiceConnectorTerminationCredentialsInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) + invalidParams := smithy.InvalidParamsError{Context: "CreateAccountInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams @@ -6909,16 +1601,16 @@ func validateOpListVoiceConnectorTerminationCredentialsInput(v *ListVoiceConnect } } -func validateOpLogoutUserInput(v *LogoutUserInput) error { +func validateOpCreateBotInput(v *CreateBotInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "LogoutUserInput"} + invalidParams := smithy.InvalidParamsError{Context: "CreateBotInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.UserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserId")) + if v.DisplayName == nil { + invalidParams.Add(smithy.NewErrParamRequired("DisplayName")) } if invalidParams.Len() > 0 { return invalidParams @@ -6927,16 +1619,22 @@ func validateOpLogoutUserInput(v *LogoutUserInput) error { } } -func validateOpPutAppInstanceRetentionSettingsInput(v *PutAppInstanceRetentionSettingsInput) error { +func validateOpCreateMeetingDialOutInput(v *CreateMeetingDialOutInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutAppInstanceRetentionSettingsInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + invalidParams := smithy.InvalidParamsError{Context: "CreateMeetingDialOutInput"} + if v.MeetingId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) + } + if v.FromPhoneNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("FromPhoneNumber")) + } + if v.ToPhoneNumber == nil { + invalidParams.Add(smithy.NewErrParamRequired("ToPhoneNumber")) } - if v.AppInstanceRetentionSettings == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceRetentionSettings")) + if v.JoinToken == nil { + invalidParams.Add(smithy.NewErrParamRequired("JoinToken")) } if invalidParams.Len() > 0 { return invalidParams @@ -6945,20 +1643,16 @@ func validateOpPutAppInstanceRetentionSettingsInput(v *PutAppInstanceRetentionSe } } -func validateOpPutAppInstanceStreamingConfigurationsInput(v *PutAppInstanceStreamingConfigurationsInput) error { +func validateOpCreatePhoneNumberOrderInput(v *CreatePhoneNumberOrderInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutAppInstanceStreamingConfigurationsInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + invalidParams := smithy.InvalidParamsError{Context: "CreatePhoneNumberOrderInput"} + if len(v.ProductType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProductType")) } - if v.AppInstanceStreamingConfigurations == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceStreamingConfigurations")) - } else if v.AppInstanceStreamingConfigurations != nil { - if err := validateAppInstanceStreamingConfigurationList(v.AppInstanceStreamingConfigurations); err != nil { - invalidParams.AddNested("AppInstanceStreamingConfigurations", err.(smithy.InvalidParamsError)) - } + if v.E164PhoneNumbers == nil { + invalidParams.Add(smithy.NewErrParamRequired("E164PhoneNumbers")) } if invalidParams.Len() > 0 { return invalidParams @@ -6967,16 +1661,16 @@ func validateOpPutAppInstanceStreamingConfigurationsInput(v *PutAppInstanceStrea } } -func validateOpPutEventsConfigurationInput(v *PutEventsConfigurationInput) error { +func validateOpCreateRoomInput(v *CreateRoomInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutEventsConfigurationInput"} + invalidParams := smithy.InvalidParamsError{Context: "CreateRoomInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.BotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BotId")) + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) } if invalidParams.Len() > 0 { return invalidParams @@ -6985,16 +1679,19 @@ func validateOpPutEventsConfigurationInput(v *PutEventsConfigurationInput) error } } -func validateOpPutRetentionSettingsInput(v *PutRetentionSettingsInput) error { +func validateOpCreateRoomMembershipInput(v *CreateRoomMembershipInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutRetentionSettingsInput"} + invalidParams := smithy.InvalidParamsError{Context: "CreateRoomMembershipInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.RetentionSettings == nil { - invalidParams.Add(smithy.NewErrParamRequired("RetentionSettings")) + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) + } + if v.MemberId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7003,13 +1700,13 @@ func validateOpPutRetentionSettingsInput(v *PutRetentionSettingsInput) error { } } -func validateOpPutSipMediaApplicationLoggingConfigurationInput(v *PutSipMediaApplicationLoggingConfigurationInput) error { +func validateOpCreateUserInput(v *CreateUserInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutSipMediaApplicationLoggingConfigurationInput"} - if v.SipMediaApplicationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipMediaApplicationId")) + invalidParams := smithy.InvalidParamsError{Context: "CreateUserInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7018,20 +1715,13 @@ func validateOpPutSipMediaApplicationLoggingConfigurationInput(v *PutSipMediaApp } } -func validateOpPutVoiceConnectorEmergencyCallingConfigurationInput(v *PutVoiceConnectorEmergencyCallingConfigurationInput) error { +func validateOpDeleteAccountInput(v *DeleteAccountInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutVoiceConnectorEmergencyCallingConfigurationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.EmergencyCallingConfiguration == nil { - invalidParams.Add(smithy.NewErrParamRequired("EmergencyCallingConfiguration")) - } else if v.EmergencyCallingConfiguration != nil { - if err := validateEmergencyCallingConfiguration(v.EmergencyCallingConfiguration); err != nil { - invalidParams.AddNested("EmergencyCallingConfiguration", err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "DeleteAccountInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7040,16 +1730,16 @@ func validateOpPutVoiceConnectorEmergencyCallingConfigurationInput(v *PutVoiceCo } } -func validateOpPutVoiceConnectorLoggingConfigurationInput(v *PutVoiceConnectorLoggingConfigurationInput) error { +func validateOpDeleteEventsConfigurationInput(v *DeleteEventsConfigurationInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutVoiceConnectorLoggingConfigurationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) + invalidParams := smithy.InvalidParamsError{Context: "DeleteEventsConfigurationInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.LoggingConfiguration == nil { - invalidParams.Add(smithy.NewErrParamRequired("LoggingConfiguration")) + if v.BotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BotId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7058,16 +1748,13 @@ func validateOpPutVoiceConnectorLoggingConfigurationInput(v *PutVoiceConnectorLo } } -func validateOpPutVoiceConnectorOriginationInput(v *PutVoiceConnectorOriginationInput) error { +func validateOpDeletePhoneNumberInput(v *DeletePhoneNumberInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutVoiceConnectorOriginationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.Origination == nil { - invalidParams.Add(smithy.NewErrParamRequired("Origination")) + invalidParams := smithy.InvalidParamsError{Context: "DeletePhoneNumberInput"} + if v.PhoneNumberId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7076,19 +1763,16 @@ func validateOpPutVoiceConnectorOriginationInput(v *PutVoiceConnectorOrigination } } -func validateOpPutVoiceConnectorProxyInput(v *PutVoiceConnectorProxyInput) error { +func validateOpDeleteRoomInput(v *DeleteRoomInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutVoiceConnectorProxyInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.DefaultSessionExpiryMinutes == nil { - invalidParams.Add(smithy.NewErrParamRequired("DefaultSessionExpiryMinutes")) + invalidParams := smithy.InvalidParamsError{Context: "DeleteRoomInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.PhoneNumberPoolCountries == nil { - invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberPoolCountries")) + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7097,20 +1781,19 @@ func validateOpPutVoiceConnectorProxyInput(v *PutVoiceConnectorProxyInput) error } } -func validateOpPutVoiceConnectorStreamingConfigurationInput(v *PutVoiceConnectorStreamingConfigurationInput) error { +func validateOpDeleteRoomMembershipInput(v *DeleteRoomMembershipInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutVoiceConnectorStreamingConfigurationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) + invalidParams := smithy.InvalidParamsError{Context: "DeleteRoomMembershipInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) } - if v.StreamingConfiguration == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreamingConfiguration")) - } else if v.StreamingConfiguration != nil { - if err := validateStreamingConfiguration(v.StreamingConfiguration); err != nil { - invalidParams.AddNested("StreamingConfiguration", err.(smithy.InvalidParamsError)) - } + if v.MemberId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7119,13 +1802,16 @@ func validateOpPutVoiceConnectorStreamingConfigurationInput(v *PutVoiceConnector } } -func validateOpPutVoiceConnectorTerminationCredentialsInput(v *PutVoiceConnectorTerminationCredentialsInput) error { +func validateOpDisassociatePhoneNumberFromUserInput(v *DisassociatePhoneNumberFromUserInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutVoiceConnectorTerminationCredentialsInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) + invalidParams := smithy.InvalidParamsError{Context: "DisassociatePhoneNumberFromUserInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7134,16 +1820,16 @@ func validateOpPutVoiceConnectorTerminationCredentialsInput(v *PutVoiceConnector } } -func validateOpPutVoiceConnectorTerminationInput(v *PutVoiceConnectorTerminationInput) error { +func validateOpDisassociateSigninDelegateGroupsFromAccountInput(v *DisassociateSigninDelegateGroupsFromAccountInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "PutVoiceConnectorTerminationInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) + invalidParams := smithy.InvalidParamsError{Context: "DisassociateSigninDelegateGroupsFromAccountInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.Termination == nil { - invalidParams.Add(smithy.NewErrParamRequired("Termination")) + if v.GroupNames == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupNames")) } if invalidParams.Len() > 0 { return invalidParams @@ -7152,16 +1838,13 @@ func validateOpPutVoiceConnectorTerminationInput(v *PutVoiceConnectorTermination } } -func validateOpRedactChannelMessageInput(v *RedactChannelMessageInput) error { +func validateOpGetAccountInput(v *GetAccountInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "RedactChannelMessageInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.MessageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MessageId")) + invalidParams := smithy.InvalidParamsError{Context: "GetAccountInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7170,20 +1853,14 @@ func validateOpRedactChannelMessageInput(v *RedactChannelMessageInput) error { } } -func validateOpRedactConversationMessageInput(v *RedactConversationMessageInput) error { +func validateOpGetAccountSettingsInput(v *GetAccountSettingsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "RedactConversationMessageInput"} + invalidParams := smithy.InvalidParamsError{Context: "GetAccountSettingsInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.ConversationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ConversationId")) - } - if v.MessageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MessageId")) - } if invalidParams.Len() > 0 { return invalidParams } else { @@ -7191,19 +1868,16 @@ func validateOpRedactConversationMessageInput(v *RedactConversationMessageInput) } } -func validateOpRedactRoomMessageInput(v *RedactRoomMessageInput) error { +func validateOpGetBotInput(v *GetBotInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "RedactRoomMessageInput"} + invalidParams := smithy.InvalidParamsError{Context: "GetBotInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) - } - if v.MessageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MessageId")) + if v.BotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BotId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7212,11 +1886,11 @@ func validateOpRedactRoomMessageInput(v *RedactRoomMessageInput) error { } } -func validateOpRegenerateSecurityTokenInput(v *RegenerateSecurityTokenInput) error { +func validateOpGetEventsConfigurationInput(v *GetEventsConfigurationInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "RegenerateSecurityTokenInput"} + invalidParams := smithy.InvalidParamsError{Context: "GetEventsConfigurationInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } @@ -7230,16 +1904,13 @@ func validateOpRegenerateSecurityTokenInput(v *RegenerateSecurityTokenInput) err } } -func validateOpResetPersonalPINInput(v *ResetPersonalPINInput) error { +func validateOpGetPhoneNumberInput(v *GetPhoneNumberInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "ResetPersonalPINInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.UserId == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserId")) + invalidParams := smithy.InvalidParamsError{Context: "GetPhoneNumberInput"} + if v.PhoneNumberId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7248,13 +1919,13 @@ func validateOpResetPersonalPINInput(v *ResetPersonalPINInput) error { } } -func validateOpRestorePhoneNumberInput(v *RestorePhoneNumberInput) error { +func validateOpGetPhoneNumberOrderInput(v *GetPhoneNumberOrderInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "RestorePhoneNumberInput"} - if v.PhoneNumberId == nil { - invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) + invalidParams := smithy.InvalidParamsError{Context: "GetPhoneNumberOrderInput"} + if v.PhoneNumberOrderId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberOrderId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7263,25 +1934,13 @@ func validateOpRestorePhoneNumberInput(v *RestorePhoneNumberInput) error { } } -func validateOpSendChannelMessageInput(v *SendChannelMessageInput) error { +func validateOpGetRetentionSettingsInput(v *GetRetentionSettingsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "SendChannelMessageInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) - } - if v.Content == nil { - invalidParams.Add(smithy.NewErrParamRequired("Content")) - } - if len(v.Type) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if len(v.Persistence) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Persistence")) - } - if v.ClientRequestToken == nil { - invalidParams.Add(smithy.NewErrParamRequired("ClientRequestToken")) + invalidParams := smithy.InvalidParamsError{Context: "GetRetentionSettingsInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7290,20 +1949,16 @@ func validateOpSendChannelMessageInput(v *SendChannelMessageInput) error { } } -func validateOpStartMeetingTranscriptionInput(v *StartMeetingTranscriptionInput) error { +func validateOpGetRoomInput(v *GetRoomInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "StartMeetingTranscriptionInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) + invalidParams := smithy.InvalidParamsError{Context: "GetRoomInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.TranscriptionConfiguration == nil { - invalidParams.Add(smithy.NewErrParamRequired("TranscriptionConfiguration")) - } else if v.TranscriptionConfiguration != nil { - if err := validateTranscriptionConfiguration(v.TranscriptionConfiguration); err != nil { - invalidParams.AddNested("TranscriptionConfiguration", err.(smithy.InvalidParamsError)) - } + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7312,13 +1967,16 @@ func validateOpStartMeetingTranscriptionInput(v *StartMeetingTranscriptionInput) } } -func validateOpStopMeetingTranscriptionInput(v *StopMeetingTranscriptionInput) error { +func validateOpGetUserInput(v *GetUserInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "StopMeetingTranscriptionInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) + invalidParams := smithy.InvalidParamsError{Context: "GetUserInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7327,23 +1985,16 @@ func validateOpStopMeetingTranscriptionInput(v *StopMeetingTranscriptionInput) e } } -func validateOpTagAttendeeInput(v *TagAttendeeInput) error { +func validateOpGetUserSettingsInput(v *GetUserSettingsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "TagAttendeeInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if v.AttendeeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AttendeeId")) + invalidParams := smithy.InvalidParamsError{Context: "GetUserSettingsInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.Tags == nil { - invalidParams.Add(smithy.NewErrParamRequired("Tags")) - } else if v.Tags != nil { - if err := validateAttendeeTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7352,20 +2003,16 @@ func validateOpTagAttendeeInput(v *TagAttendeeInput) error { } } -func validateOpTagMeetingInput(v *TagMeetingInput) error { +func validateOpInviteUsersInput(v *InviteUsersInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "TagMeetingInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) + invalidParams := smithy.InvalidParamsError{Context: "InviteUsersInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.Tags == nil { - invalidParams.Add(smithy.NewErrParamRequired("Tags")) - } else if v.Tags != nil { - if err := validateMeetingTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } + if v.UserEmailList == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserEmailList")) } if invalidParams.Len() > 0 { return invalidParams @@ -7374,20 +2021,13 @@ func validateOpTagMeetingInput(v *TagMeetingInput) error { } } -func validateOpTagResourceInput(v *TagResourceInput) error { +func validateOpListBotsInput(v *ListBotsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} - if v.ResourceARN == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) - } - if v.Tags == nil { - invalidParams.Add(smithy.NewErrParamRequired("Tags")) - } else if v.Tags != nil { - if err := validateTagList(v.Tags); err != nil { - invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) - } + invalidParams := smithy.InvalidParamsError{Context: "ListBotsInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7396,19 +2036,16 @@ func validateOpTagResourceInput(v *TagResourceInput) error { } } -func validateOpUntagAttendeeInput(v *UntagAttendeeInput) error { +func validateOpListRoomMembershipsInput(v *ListRoomMembershipsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UntagAttendeeInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if v.AttendeeId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AttendeeId")) + invalidParams := smithy.InvalidParamsError{Context: "ListRoomMembershipsInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.TagKeys == nil { - invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7417,16 +2054,13 @@ func validateOpUntagAttendeeInput(v *UntagAttendeeInput) error { } } -func validateOpUntagMeetingInput(v *UntagMeetingInput) error { +func validateOpListRoomsInput(v *ListRoomsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UntagMeetingInput"} - if v.MeetingId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MeetingId")) - } - if v.TagKeys == nil { - invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + invalidParams := smithy.InvalidParamsError{Context: "ListRoomsInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7435,16 +2069,13 @@ func validateOpUntagMeetingInput(v *UntagMeetingInput) error { } } -func validateOpUntagResourceInput(v *UntagResourceInput) error { +func validateOpListSupportedPhoneNumberCountriesInput(v *ListSupportedPhoneNumberCountriesInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} - if v.ResourceARN == nil { - invalidParams.Add(smithy.NewErrParamRequired("ResourceARN")) - } - if v.TagKeys == nil { - invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + invalidParams := smithy.InvalidParamsError{Context: "ListSupportedPhoneNumberCountriesInput"} + if len(v.ProductType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("ProductType")) } if invalidParams.Len() > 0 { return invalidParams @@ -7453,11 +2084,11 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } -func validateOpUpdateAccountInput(v *UpdateAccountInput) error { +func validateOpListUsersInput(v *ListUsersInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateAccountInput"} + invalidParams := smithy.InvalidParamsError{Context: "ListUsersInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } @@ -7468,16 +2099,16 @@ func validateOpUpdateAccountInput(v *UpdateAccountInput) error { } } -func validateOpUpdateAccountSettingsInput(v *UpdateAccountSettingsInput) error { +func validateOpLogoutUserInput(v *LogoutUserInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateAccountSettingsInput"} + invalidParams := smithy.InvalidParamsError{Context: "LogoutUserInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.AccountSettings == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountSettings")) + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7486,16 +2117,16 @@ func validateOpUpdateAccountSettingsInput(v *UpdateAccountSettingsInput) error { } } -func validateOpUpdateAppInstanceInput(v *UpdateAppInstanceInput) error { +func validateOpPutEventsConfigurationInput(v *PutEventsConfigurationInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateAppInstanceInput"} - if v.AppInstanceArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + invalidParams := smithy.InvalidParamsError{Context: "PutEventsConfigurationInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) + if v.BotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BotId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7504,16 +2135,16 @@ func validateOpUpdateAppInstanceInput(v *UpdateAppInstanceInput) error { } } -func validateOpUpdateAppInstanceUserInput(v *UpdateAppInstanceUserInput) error { +func validateOpPutRetentionSettingsInput(v *PutRetentionSettingsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateAppInstanceUserInput"} - if v.AppInstanceUserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("AppInstanceUserArn")) + invalidParams := smithy.InvalidParamsError{Context: "PutRetentionSettingsInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) + if v.RetentionSettings == nil { + invalidParams.Add(smithy.NewErrParamRequired("RetentionSettings")) } if invalidParams.Len() > 0 { return invalidParams @@ -7522,16 +2153,19 @@ func validateOpUpdateAppInstanceUserInput(v *UpdateAppInstanceUserInput) error { } } -func validateOpUpdateBotInput(v *UpdateBotInput) error { +func validateOpRedactConversationMessageInput(v *RedactConversationMessageInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateBotInput"} + invalidParams := smithy.InvalidParamsError{Context: "RedactConversationMessageInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.BotId == nil { - invalidParams.Add(smithy.NewErrParamRequired("BotId")) + if v.ConversationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("ConversationId")) + } + if v.MessageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MessageId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7540,19 +2174,19 @@ func validateOpUpdateBotInput(v *UpdateBotInput) error { } } -func validateOpUpdateChannelInput(v *UpdateChannelInput) error { +func validateOpRedactRoomMessageInput(v *RedactRoomMessageInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + invalidParams := smithy.InvalidParamsError{Context: "RedactRoomMessageInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) } - if len(v.Mode) == 0 { - invalidParams.Add(smithy.NewErrParamRequired("Mode")) + if v.MessageId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MessageId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7561,16 +2195,16 @@ func validateOpUpdateChannelInput(v *UpdateChannelInput) error { } } -func validateOpUpdateChannelMessageInput(v *UpdateChannelMessageInput) error { +func validateOpRegenerateSecurityTokenInput(v *RegenerateSecurityTokenInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelMessageInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + invalidParams := smithy.InvalidParamsError{Context: "RegenerateSecurityTokenInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.MessageId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MessageId")) + if v.BotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BotId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7579,13 +2213,16 @@ func validateOpUpdateChannelMessageInput(v *UpdateChannelMessageInput) error { } } -func validateOpUpdateChannelReadMarkerInput(v *UpdateChannelReadMarkerInput) error { +func validateOpResetPersonalPINInput(v *ResetPersonalPINInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateChannelReadMarkerInput"} - if v.ChannelArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("ChannelArn")) + invalidParams := smithy.InvalidParamsError{Context: "ResetPersonalPINInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.UserId == nil { + invalidParams.Add(smithy.NewErrParamRequired("UserId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7594,11 +2231,11 @@ func validateOpUpdateChannelReadMarkerInput(v *UpdateChannelReadMarkerInput) err } } -func validateOpUpdatePhoneNumberInput(v *UpdatePhoneNumberInput) error { +func validateOpRestorePhoneNumberInput(v *RestorePhoneNumberInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdatePhoneNumberInput"} + invalidParams := smithy.InvalidParamsError{Context: "RestorePhoneNumberInput"} if v.PhoneNumberId == nil { invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) } @@ -7609,13 +2246,13 @@ func validateOpUpdatePhoneNumberInput(v *UpdatePhoneNumberInput) error { } } -func validateOpUpdatePhoneNumberSettingsInput(v *UpdatePhoneNumberSettingsInput) error { +func validateOpUpdateAccountInput(v *UpdateAccountInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdatePhoneNumberSettingsInput"} - if v.CallingName == nil { - invalidParams.Add(smithy.NewErrParamRequired("CallingName")) + invalidParams := smithy.InvalidParamsError{Context: "UpdateAccountInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7624,19 +2261,16 @@ func validateOpUpdatePhoneNumberSettingsInput(v *UpdatePhoneNumberSettingsInput) } } -func validateOpUpdateProxySessionInput(v *UpdateProxySessionInput) error { +func validateOpUpdateAccountSettingsInput(v *UpdateAccountSettingsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateProxySessionInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.ProxySessionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProxySessionId")) + invalidParams := smithy.InvalidParamsError{Context: "UpdateAccountSettingsInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.Capabilities == nil { - invalidParams.Add(smithy.NewErrParamRequired("Capabilities")) + if v.AccountSettings == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountSettings")) } if invalidParams.Len() > 0 { return invalidParams @@ -7645,16 +2279,16 @@ func validateOpUpdateProxySessionInput(v *UpdateProxySessionInput) error { } } -func validateOpUpdateRoomInput(v *UpdateRoomInput) error { +func validateOpUpdateBotInput(v *UpdateBotInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateRoomInput"} + invalidParams := smithy.InvalidParamsError{Context: "UpdateBotInput"} if v.AccountId == nil { invalidParams.Add(smithy.NewErrParamRequired("AccountId")) } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) + if v.BotId == nil { + invalidParams.Add(smithy.NewErrParamRequired("BotId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7663,19 +2297,13 @@ func validateOpUpdateRoomInput(v *UpdateRoomInput) error { } } -func validateOpUpdateRoomMembershipInput(v *UpdateRoomMembershipInput) error { +func validateOpUpdatePhoneNumberInput(v *UpdatePhoneNumberInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateRoomMembershipInput"} - if v.AccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AccountId")) - } - if v.RoomId == nil { - invalidParams.Add(smithy.NewErrParamRequired("RoomId")) - } - if v.MemberId == nil { - invalidParams.Add(smithy.NewErrParamRequired("MemberId")) + invalidParams := smithy.InvalidParamsError{Context: "UpdatePhoneNumberInput"} + if v.PhoneNumberId == nil { + invalidParams.Add(smithy.NewErrParamRequired("PhoneNumberId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7684,19 +2312,13 @@ func validateOpUpdateRoomMembershipInput(v *UpdateRoomMembershipInput) error { } } -func validateOpUpdateSipMediaApplicationCallInput(v *UpdateSipMediaApplicationCallInput) error { +func validateOpUpdatePhoneNumberSettingsInput(v *UpdatePhoneNumberSettingsInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateSipMediaApplicationCallInput"} - if v.SipMediaApplicationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipMediaApplicationId")) - } - if v.TransactionId == nil { - invalidParams.Add(smithy.NewErrParamRequired("TransactionId")) - } - if v.Arguments == nil { - invalidParams.Add(smithy.NewErrParamRequired("Arguments")) + invalidParams := smithy.InvalidParamsError{Context: "UpdatePhoneNumberSettingsInput"} + if v.CallingName == nil { + invalidParams.Add(smithy.NewErrParamRequired("CallingName")) } if invalidParams.Len() > 0 { return invalidParams @@ -7705,13 +2327,16 @@ func validateOpUpdateSipMediaApplicationCallInput(v *UpdateSipMediaApplicationCa } } -func validateOpUpdateSipMediaApplicationInput(v *UpdateSipMediaApplicationInput) error { +func validateOpUpdateRoomInput(v *UpdateRoomInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateSipMediaApplicationInput"} - if v.SipMediaApplicationId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipMediaApplicationId")) + invalidParams := smithy.InvalidParamsError{Context: "UpdateRoomInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7720,16 +2345,19 @@ func validateOpUpdateSipMediaApplicationInput(v *UpdateSipMediaApplicationInput) } } -func validateOpUpdateSipRuleInput(v *UpdateSipRuleInput) error { +func validateOpUpdateRoomMembershipInput(v *UpdateRoomMembershipInput) error { if v == nil { return nil } - invalidParams := smithy.InvalidParamsError{Context: "UpdateSipRuleInput"} - if v.SipRuleId == nil { - invalidParams.Add(smithy.NewErrParamRequired("SipRuleId")) + invalidParams := smithy.InvalidParamsError{Context: "UpdateRoomMembershipInput"} + if v.AccountId == nil { + invalidParams.Add(smithy.NewErrParamRequired("AccountId")) + } + if v.RoomId == nil { + invalidParams.Add(smithy.NewErrParamRequired("RoomId")) } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) + if v.MemberId == nil { + invalidParams.Add(smithy.NewErrParamRequired("MemberId")) } if invalidParams.Len() > 0 { return invalidParams @@ -7780,82 +2408,3 @@ func validateOpUpdateUserSettingsInput(v *UpdateUserSettingsInput) error { return nil } } - -func validateOpUpdateVoiceConnectorGroupInput(v *UpdateVoiceConnectorGroupInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateVoiceConnectorGroupInput"} - if v.VoiceConnectorGroupId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorGroupId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.VoiceConnectorItems == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorItems")) - } else if v.VoiceConnectorItems != nil { - if err := validateVoiceConnectorItemList(v.VoiceConnectorItems); err != nil { - invalidParams.AddNested("VoiceConnectorItems", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateVoiceConnectorInput(v *UpdateVoiceConnectorInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateVoiceConnectorInput"} - if v.VoiceConnectorId == nil { - invalidParams.Add(smithy.NewErrParamRequired("VoiceConnectorId")) - } - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.RequireEncryption == nil { - invalidParams.Add(smithy.NewErrParamRequired("RequireEncryption")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpValidateE911AddressInput(v *ValidateE911AddressInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ValidateE911AddressInput"} - if v.AwsAccountId == nil { - invalidParams.Add(smithy.NewErrParamRequired("AwsAccountId")) - } - if v.StreetNumber == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreetNumber")) - } - if v.StreetInfo == nil { - invalidParams.Add(smithy.NewErrParamRequired("StreetInfo")) - } - if v.City == nil { - invalidParams.Add(smithy.NewErrParamRequired("City")) - } - if v.State == nil { - invalidParams.Add(smithy.NewErrParamRequired("State")) - } - if v.Country == nil { - invalidParams.Add(smithy.NewErrParamRequired("Country")) - } - if v.PostalCode == nil { - invalidParams.Add(smithy.NewErrParamRequired("PostalCode")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/service/cloudfront/types/types.go b/service/cloudfront/types/types.go index 04975247ed7..de3eae54e5a 100644 --- a/service/cloudfront/types/types.go +++ b/service/cloudfront/types/types.go @@ -3296,6 +3296,8 @@ type MonitoringSubscription struct { // - Use S3OriginConfig to specify an Amazon S3 bucket that is not configured // with static website hosting. // +// - Use VpcOriginConfig to specify a VPC origin. +// // - Use CustomOriginConfig to specify all other kinds of origins, including: // // - An Amazon S3 bucket that is configured with static website hosting @@ -5758,14 +5760,14 @@ type ViewerCertificate struct { // // - static-ip - Do not specify this value unless your distribution has been // enabled for this feature by the CloudFront team. If you have a use case that - // requires static IP addresses for a distribution, contact CloudFront through the [Amazon Web Services Support Center] + // requires static IP addresses for a distribution, contact CloudFront through the [Amazon Web ServicesSupport Center] // . // // If the distribution uses the CloudFront domain name such as // d111111abcdef8.cloudfront.net , don't set a value for this field. // + // [Amazon Web ServicesSupport Center]: https://console.aws.amazon.com/support/home // [server name indication (SNI)]: https://en.wikipedia.org/wiki/Server_Name_Indication - // [Amazon Web Services Support Center]: https://console.aws.amazon.com/support/home SSLSupportMethod SSLSupportMethod noSmithyDocumentSerde diff --git a/service/ec2/api_op_CreateLaunchTemplate.go b/service/ec2/api_op_CreateLaunchTemplate.go index 08646ccf700..60406558f01 100644 --- a/service/ec2/api_op_CreateLaunchTemplate.go +++ b/service/ec2/api_op_CreateLaunchTemplate.go @@ -15,15 +15,15 @@ import ( // // A launch template contains the parameters to launch an instance. When you // launch an instance using RunInstances, you can specify a launch template instead of -// providing the launch parameters in the request. For more information, see [Launch an instance from a launch template]in +// providing the launch parameters in the request. For more information, see [Store instance launch parameters in Amazon EC2 launch templates]in // the Amazon EC2 User Guide. // // To clone an existing launch template as the basis for a new launch template, // use the Amazon EC2 console. The API, SDKs, and CLI do not support cloning a // template. For more information, see [Create a launch template from an existing launch template]in the Amazon EC2 User Guide. // -// [Create a launch template from an existing launch template]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template-from-existing-launch-template -// [Launch an instance from a launch template]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html +// [Create a launch template from an existing launch template]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#create-launch-template-from-existing-launch-template +// [Store instance launch parameters in Amazon EC2 launch templates]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html func (c *Client) CreateLaunchTemplate(ctx context.Context, params *CreateLaunchTemplateInput, optFns ...func(*Options)) (*CreateLaunchTemplateOutput, error) { if params == nil { params = &CreateLaunchTemplateInput{} diff --git a/service/ec2/api_op_CreateLaunchTemplateVersion.go b/service/ec2/api_op_CreateLaunchTemplateVersion.go index 666bd5c10d6..ae8d89c9ebe 100644 --- a/service/ec2/api_op_CreateLaunchTemplateVersion.go +++ b/service/ec2/api_op_CreateLaunchTemplateVersion.go @@ -25,7 +25,7 @@ import ( // // For more information, see [Modify a launch template (manage launch template versions)] in the Amazon EC2 User Guide. // -// [Modify a launch template (manage launch template versions)]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#manage-launch-template-versions +// [Modify a launch template (manage launch template versions)]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-launch-template-versions.html func (c *Client) CreateLaunchTemplateVersion(ctx context.Context, params *CreateLaunchTemplateVersionInput, optFns ...func(*Options)) (*CreateLaunchTemplateVersionOutput, error) { if params == nil { params = &CreateLaunchTemplateVersionInput{} @@ -80,7 +80,7 @@ type CreateLaunchTemplateVersionInput struct { // // Default: false // - // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id + // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id ResolveAlias *bool // The version of the launch template on which to base the new version. Snapshots diff --git a/service/ec2/api_op_DeleteFleets.go b/service/ec2/api_op_DeleteFleets.go index 5d3554f4ffb..45ddf5305d8 100644 --- a/service/ec2/api_op_DeleteFleets.go +++ b/service/ec2/api_op_DeleteFleets.go @@ -11,19 +11,22 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes the specified EC2 Fleets. +// Deletes the specified EC2 Fleet request. // -// After you delete an EC2 Fleet, it launches no new instances. +// After you delete an EC2 Fleet request, it launches no new instances. // -// You must also specify whether a deleted EC2 Fleet should terminate its -// instances. If you choose to terminate the instances, the EC2 Fleet enters the -// deleted_terminating state. Otherwise, the EC2 Fleet enters the deleted_running +// You must also specify whether a deleted EC2 Fleet request should terminate its +// instances. If you choose to terminate the instances, the EC2 Fleet request +// enters the deleted_terminating state. Otherwise, it enters the deleted_running // state, and the instances continue to run until they are interrupted or you // terminate them manually. // -// For instant fleets, EC2 Fleet must terminate the instances when the fleet is -// deleted. Up to 1000 instances can be terminated in a single request to delete -// instant fleets. A deleted instant fleet with running instances is not supported. +// A deleted instant fleet with running instances is not supported. When you +// delete an instant fleet, Amazon EC2 automatically terminates all its instances. +// For fleets with more than 1000 instances, the deletion request might fail. If +// your fleet has more than 1000 instances, first terminate most of the instances +// manually, leaving 1000 or fewer. Then delete the fleet, and the remaining +// instances will be terminated automatically. // // Restrictions // @@ -38,9 +41,9 @@ import ( // - If you exceed the specified number of fleets to delete, no fleets are // deleted. // -// For more information, see [Delete an EC2 Fleet] in the Amazon EC2 User Guide. +// For more information, see [Delete an EC2 Fleet request and the instances in the fleet] in the Amazon EC2 User Guide. // -// [Delete an EC2 Fleet]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#delete-fleet +// [Delete an EC2 Fleet request and the instances in the fleet]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/delete-fleet.html func (c *Client) DeleteFleets(ctx context.Context, params *DeleteFleetsInput, optFns ...func(*Options)) (*DeleteFleetsOutput, error) { if params == nil { params = &DeleteFleetsInput{} diff --git a/service/ec2/api_op_DeleteLaunchTemplateVersions.go b/service/ec2/api_op_DeleteLaunchTemplateVersions.go index 298b31a6b7d..1e93f6824ff 100644 --- a/service/ec2/api_op_DeleteLaunchTemplateVersions.go +++ b/service/ec2/api_op_DeleteLaunchTemplateVersions.go @@ -24,7 +24,7 @@ import ( // // For more information, see [Delete a launch template version] in the Amazon EC2 User Guide. // -// [Delete a launch template version]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-launch-template-versions.html#delete-launch-template-version +// [Delete a launch template version]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/delete-launch-template.html#delete-launch-template-version func (c *Client) DeleteLaunchTemplateVersions(ctx context.Context, params *DeleteLaunchTemplateVersionsInput, optFns ...func(*Options)) (*DeleteLaunchTemplateVersionsOutput, error) { if params == nil { params = &DeleteLaunchTemplateVersionsInput{} diff --git a/service/ec2/api_op_DescribeLaunchTemplateVersions.go b/service/ec2/api_op_DescribeLaunchTemplateVersions.go index 430dd30e90c..17320df21bc 100644 --- a/service/ec2/api_op_DescribeLaunchTemplateVersions.go +++ b/service/ec2/api_op_DescribeLaunchTemplateVersions.go @@ -117,7 +117,7 @@ type DescribeLaunchTemplateVersionsInput struct { // // Default: false // - // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id + // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id ResolveAlias *bool // One or more versions of the launch template. Valid values depend on whether you diff --git a/service/ec2/api_op_DescribeNetworkInterfaces.go b/service/ec2/api_op_DescribeNetworkInterfaces.go index d23cc6f8bd8..319def05c5f 100644 --- a/service/ec2/api_op_DescribeNetworkInterfaces.go +++ b/service/ec2/api_op_DescribeNetworkInterfaces.go @@ -20,8 +20,7 @@ import ( // // If you have a large number of network interfaces, the operation fails unless // you use pagination or one of the following filters: group-id , mac-address , -// private-dns-name , private-ip-address , private-dns-name , subnet-id , or vpc-id -// . +// private-dns-name , private-ip-address , subnet-id , or vpc-id . // // We strongly recommend using only paginated requests. Unpaginated requests are // susceptible to throttling and timeouts. diff --git a/service/ec2/api_op_ModifyLaunchTemplate.go b/service/ec2/api_op_ModifyLaunchTemplate.go index 32b37a4fd26..4850dca8095 100644 --- a/service/ec2/api_op_ModifyLaunchTemplate.go +++ b/service/ec2/api_op_ModifyLaunchTemplate.go @@ -32,11 +32,11 @@ func (c *Client) ModifyLaunchTemplate(ctx context.Context, params *ModifyLaunchT type ModifyLaunchTemplateInput struct { // Unique, case-sensitive identifier you provide to ensure the idempotency of the - // request. For more information, see [Ensuring idempotency]. + // request. For more information, see [Ensuring idempotency in Amazon EC2 API requests]. // // Constraint: Maximum 128 ASCII characters. // - // [Ensuring idempotency]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html + // [Ensuring idempotency in Amazon EC2 API requests]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/Run_Instance_Idempotency.html ClientToken *string // The version number of the launch template to set as the default version. diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index 20fac864078..f8ea7a35d9f 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -20769,12 +20769,35 @@ func (m *awsEc2query_deserializeOpDeregisterImage) HandleDeserialize(ctx context output := &DeregisterImageOutput{} out.Result = output - if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + body := io.TeeReader(response.Body, ringBuffer) + rootDecoder := xml.NewDecoder(body) + t, err := smithyxml.FetchRootElement(rootDecoder) + if err == io.EOF { + return out, metadata, nil + } + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to discard response body, %w", err), + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), } } + decoder := smithyxml.WrapNodeDecoder(rootDecoder, t) + err = awsEc2query_deserializeOpDocumentDeregisterImageOutput(&output, decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + return out, metadata, err } @@ -66636,6 +66659,155 @@ func awsEc2query_deserializeDocumentBlockDeviceMappingListUnwrapped(v *[]types.B *v = sv return nil } +func awsEc2query_deserializeDocumentBlockDeviceMappingResponse(v **types.BlockDeviceMappingResponse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.BlockDeviceMappingResponse + if *v == nil { + sv = &types.BlockDeviceMappingResponse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("deviceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DeviceName = ptr.String(xtv) + } + + case strings.EqualFold("ebs", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentEbsBlockDeviceResponse(&sv.Ebs, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("noDevice", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.NoDevice = ptr.String(xtv) + } + + case strings.EqualFold("virtualName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VirtualName = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentBlockDeviceMappingResponseList(v *[]types.BlockDeviceMappingResponse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.BlockDeviceMappingResponse + if *v == nil { + sv = make([]types.BlockDeviceMappingResponse, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.BlockDeviceMappingResponse + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentBlockDeviceMappingResponse(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentBlockDeviceMappingResponseListUnwrapped(v *[]types.BlockDeviceMappingResponse, decoder smithyxml.NodeDecoder) error { + var sv []types.BlockDeviceMappingResponse + if *v == nil { + sv = make([]types.BlockDeviceMappingResponse, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.BlockDeviceMappingResponse + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentBlockDeviceMappingResponse(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentBlockPublicAccessStates(v **types.BlockPublicAccessStates, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -78739,6 +78911,164 @@ func awsEc2query_deserializeDocumentEbsBlockDevice(v **types.EbsBlockDevice, dec return nil } +func awsEc2query_deserializeDocumentEbsBlockDeviceResponse(v **types.EbsBlockDeviceResponse, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.EbsBlockDeviceResponse + if *v == nil { + sv = &types.EbsBlockDeviceResponse{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("deleteOnTermination", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.DeleteOnTermination = ptr.Bool(xtv) + } + + case strings.EqualFold("encrypted", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv, err := strconv.ParseBool(string(val)) + if err != nil { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", val) + } + sv.Encrypted = ptr.Bool(xtv) + } + + case strings.EqualFold("iops", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Iops = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("kmsKeyId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.KmsKeyId = ptr.String(xtv) + } + + case strings.EqualFold("snapshotId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SnapshotId = ptr.String(xtv) + } + + case strings.EqualFold("throughput", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Throughput = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("volumeSize", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.VolumeSize = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("volumeType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.VolumeType = types.VolumeType(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentEbsInfo(v **types.EbsInfo, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -83847,6 +84177,12 @@ func awsEc2query_deserializeDocumentFleetLaunchTemplateOverrides(v **types.Fleet sv.AvailabilityZone = ptr.String(xtv) } + case strings.EqualFold("blockDeviceMappingSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentBlockDeviceMappingResponseList(&sv.BlockDeviceMappings, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("imageId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -162346,6 +162682,42 @@ func awsEc2query_deserializeOpDocumentDeprovisionPublicIpv4PoolCidrOutput(v **De return nil } +func awsEc2query_deserializeOpDocumentDeregisterImageOutput(v **DeregisterImageOutput, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *DeregisterImageOutput + if *v == nil { + sv = &DeregisterImageOutput{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeOpDocumentDeregisterInstanceEventNotificationAttributesOutput(v **DeregisterInstanceEventNotificationAttributesOutput, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index 58a99790eea..d053fc4c40f 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -48306,6 +48306,97 @@ func awsEc2query_serializeDocumentFilterList(v []types.Filter, value query.Value return nil } +func awsEc2query_serializeDocumentFleetBlockDeviceMappingRequest(v *types.FleetBlockDeviceMappingRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.DeviceName != nil { + objectKey := object.Key("DeviceName") + objectKey.String(*v.DeviceName) + } + + if v.Ebs != nil { + objectKey := object.Key("Ebs") + if err := awsEc2query_serializeDocumentFleetEbsBlockDeviceRequest(v.Ebs, objectKey); err != nil { + return err + } + } + + if v.NoDevice != nil { + objectKey := object.Key("NoDevice") + objectKey.String(*v.NoDevice) + } + + if v.VirtualName != nil { + objectKey := object.Key("VirtualName") + objectKey.String(*v.VirtualName) + } + + return nil +} + +func awsEc2query_serializeDocumentFleetBlockDeviceMappingRequestList(v []types.FleetBlockDeviceMappingRequest, value query.Value) error { + if len(v) == 0 { + return nil + } + array := value.Array("BlockDeviceMapping") + + for i := range v { + av := array.Value() + if err := awsEc2query_serializeDocumentFleetBlockDeviceMappingRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsEc2query_serializeDocumentFleetEbsBlockDeviceRequest(v *types.FleetEbsBlockDeviceRequest, value query.Value) error { + object := value.Object() + _ = object + + if v.DeleteOnTermination != nil { + objectKey := object.Key("DeleteOnTermination") + objectKey.Boolean(*v.DeleteOnTermination) + } + + if v.Encrypted != nil { + objectKey := object.Key("Encrypted") + objectKey.Boolean(*v.Encrypted) + } + + if v.Iops != nil { + objectKey := object.Key("Iops") + objectKey.Integer(*v.Iops) + } + + if v.KmsKeyId != nil { + objectKey := object.Key("KmsKeyId") + objectKey.String(*v.KmsKeyId) + } + + if v.SnapshotId != nil { + objectKey := object.Key("SnapshotId") + objectKey.String(*v.SnapshotId) + } + + if v.Throughput != nil { + objectKey := object.Key("Throughput") + objectKey.Integer(*v.Throughput) + } + + if v.VolumeSize != nil { + objectKey := object.Key("VolumeSize") + objectKey.Integer(*v.VolumeSize) + } + + if len(v.VolumeType) > 0 { + objectKey := object.Key("VolumeType") + objectKey.String(string(v.VolumeType)) + } + + return nil +} + func awsEc2query_serializeDocumentFleetIdSet(v []string, value query.Value) error { if len(v) == 0 { return nil @@ -48379,6 +48470,13 @@ func awsEc2query_serializeDocumentFleetLaunchTemplateOverridesRequest(v *types.F objectKey.String(*v.AvailabilityZone) } + if v.BlockDeviceMappings != nil { + objectKey := object.FlatKey("BlockDeviceMapping") + if err := awsEc2query_serializeDocumentFleetBlockDeviceMappingRequestList(v.BlockDeviceMappings, objectKey); err != nil { + return err + } + } + if v.ImageId != nil { objectKey := object.Key("ImageId") objectKey.String(*v.ImageId) diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index dea5315737f..cdb03bc331b 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -998,6 +998,26 @@ type BlockDeviceMapping struct { noSmithyDocumentSerde } +// Describes a block device mapping, which defines the EBS volumes and instance +// store volumes to attach to an instance at launch. +type BlockDeviceMappingResponse struct { + + // The device name (for example, /dev/sdh or xvdh ). + DeviceName *string + + // Parameters used to automatically set up EBS volumes when the instance is + // launched. + Ebs *EbsBlockDeviceResponse + + // Suppresses the specified device included in the block device mapping. + NoDevice *string + + // The virtual device name. + VirtualName *string + + noSmithyDocumentSerde +} + // The state of VPC Block Public Access (BPA). type BlockPublicAccessStates struct { @@ -3925,6 +3945,42 @@ type EbsBlockDevice struct { noSmithyDocumentSerde } +// Describes a block device for an EBS volume. +type EbsBlockDeviceResponse struct { + + // Indicates whether the volume is deleted on instance termination. + DeleteOnTermination *bool + + // Indicates whether the volume is encrypted. + Encrypted *bool + + // The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 + // volumes, this represents the number of IOPS that are provisioned for the volume. + // For gp2 volumes, this represents the baseline performance of the volume and the + // rate at which the volume accumulates I/O credits for bursting. + Iops *int32 + + // Identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed + // KMS key to use for EBS encryption. + KmsKeyId *string + + // The ID of the snapshot. + SnapshotId *string + + // The throughput that the volume supports, in MiB/s. + Throughput *int32 + + // The size of the volume, in GiBs. + VolumeSize *int32 + + // The volume type. For more information, see [Amazon EBS volume types] in the Amazon EBS User Guide. + // + // [Amazon EBS volume types]: https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html + VolumeType VolumeType + + noSmithyDocumentSerde +} + // Describes the Amazon EBS features supported by the instance type. type EbsInfo struct { @@ -5044,6 +5100,54 @@ type FirewallStatelessRule struct { noSmithyDocumentSerde } +// Describes a block device mapping, which defines the EBS volumes and instance +// store volumes to attach to an instance at launch. +// +// To override a block device mapping specified in the launch template: +// +// - Specify the exact same DeviceName here as specified in the launch template. +// +// - Only specify the parameters you want to change. +// +// - Any parameters you don't specify here will keep their original launch +// template values. +// +// To add a new block device mapping: +// +// - Specify a DeviceName that doesn't exist in the launch template. +// +// - Specify all desired parameters here. +type FleetBlockDeviceMappingRequest struct { + + // The device name (for example, /dev/sdh or xvdh ). + DeviceName *string + + // Parameters used to automatically set up EBS volumes when the instance is + // launched. + Ebs *FleetEbsBlockDeviceRequest + + // To omit the device from the block device mapping, specify an empty string. When + // this property is specified, the device is removed from the block device mapping + // regardless of the assigned value. + NoDevice *string + + // The virtual device name ( ephemeralN ). Instance store volumes are numbered + // starting from 0. An instance type with 2 available instance store volumes can + // specify mappings for ephemeral0 and ephemeral1 . The number of available + // instance store volumes depends on the instance type. After you connect to the + // instance, you must mount the volume. + // + // NVMe instance store volumes are automatically enumerated and assigned a device + // name. Including them in your block device mapping has no effect. + // + // Constraints: For M3 instances, you must specify instance store volumes in the + // block device mapping for the instance. When you launch an M3 instance, we ignore + // any instance store volumes specified in the block device mapping for the AMI. + VirtualName *string + + noSmithyDocumentSerde +} + // Information about a Capacity Reservation in a Capacity Reservation Fleet. type FleetCapacityReservation struct { @@ -5201,6 +5305,123 @@ type FleetData struct { noSmithyDocumentSerde } +// Describes a block device for an EBS volume. +type FleetEbsBlockDeviceRequest struct { + + // Indicates whether the EBS volume is deleted on instance termination. For more + // information, see [Preserve data when an instance is terminated]in the Amazon EC2 User Guide. + // + // [Preserve data when an instance is terminated]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/preserving-volumes-on-termination.html + DeleteOnTermination *bool + + // Indicates whether the encryption state of an EBS volume is changed while being + // restored from a backing snapshot. The effect of setting the encryption state to + // true depends on the volume origin (new or from a snapshot), starting encryption + // state, ownership, and whether encryption by default is enabled. For more + // information, see [Amazon EBS encryption]in the Amazon EBS User Guide. + // + // In no case can you remove encryption from an encrypted volume. + // + // Encrypted volumes can only be attached to instances that support Amazon EBS + // encryption. For more information, see [Supported instance types]. + // + // This parameter is not returned by . + // + // For and , whether you can include this parameter, and the allowed values differ + // depending on the type of block device mapping you are creating. + // + // - If you are creating a block device mapping for a new (empty) volume, you + // can include this parameter, and specify either true for an encrypted volume, + // or false for an unencrypted volume. If you omit this parameter, it defaults to + // false (unencrypted). + // + // - If you are creating a block device mapping from an existing encrypted or + // unencrypted snapshot, you must omit this parameter. If you include this + // parameter, the request will fail, regardless of the value that you specify. + // + // - If you are creating a block device mapping from an existing unencrypted + // volume, you can include this parameter, but you must specify false . If you + // specify true , the request will fail. In this case, we recommend that you omit + // the parameter. + // + // - If you are creating a block device mapping from an existing encrypted + // volume, you can include this parameter, and specify either true or false . + // However, if you specify false , the parameter is ignored and the block device + // mapping is always encrypted. In this case, we recommend that you omit the + // parameter. + // + // [Amazon EBS encryption]: https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption.html + // [Supported instance types]: https://docs.aws.amazon.com/ebs/latest/userguide/ebs-encryption-requirements.html#ebs-encryption_supported_instances + Encrypted *bool + + // The number of I/O operations per second (IOPS). For gp3 , io1 , and io2 + // volumes, this represents the number of IOPS that are provisioned for the volume. + // For gp2 volumes, this represents the baseline performance of the volume and the + // rate at which the volume accumulates I/O credits for bursting. + // + // The following are the supported values for each volume type: + // + // - gp3 : 3,000 - 16,000 IOPS + // + // - io1 : 100 - 64,000 IOPS + // + // - io2 : 100 - 256,000 IOPS + // + // For io2 volumes, you can achieve up to 256,000 IOPS on [instances built on the Nitro System]. On other instances, + // you can achieve performance up to 32,000 IOPS. + // + // This parameter is required for io1 and io2 volumes. The default for gp3 volumes + // is 3,000 IOPS. + // + // [instances built on the Nitro System]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances + Iops *int32 + + // Identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed + // KMS key to use for EBS encryption. + // + // This parameter is only supported on BlockDeviceMapping objects called by [RunInstances], [RequestSpotFleet], + // and [RequestSpotInstances]. + // + // [RequestSpotInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotInstances.html + // [RunInstances]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RunInstances.html + // [RequestSpotFleet]: https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RequestSpotFleet.html + KmsKeyId *string + + // The ID of the snapshot. + SnapshotId *string + + // The throughput that the volume supports, in MiB/s. + // + // This parameter is valid only for gp3 volumes. + // + // Valid Range: Minimum value of 125. Maximum value of 1000. + Throughput *int32 + + // The size of the volume, in GiBs. You must specify either a snapshot ID or a + // volume size. If you specify a snapshot, the default is the snapshot size. You + // can specify a volume size that is equal to or larger than the snapshot size. + // + // The following are the supported sizes for each volume type: + // + // - gp2 and gp3 : 1 - 16,384 GiB + // + // - io1 : 4 - 16,384 GiB + // + // - io2 : 4 - 65,536 GiB + // + // - st1 and sc1 : 125 - 16,384 GiB + // + // - standard : 1 - 1024 GiB + VolumeSize *int32 + + // The volume type. For more information, see [Amazon EBS volume types] in the Amazon EBS User Guide. + // + // [Amazon EBS volume types]: https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html + VolumeType VolumeType + + noSmithyDocumentSerde +} + // Describes a launch template and overrides. type FleetLaunchTemplateConfig struct { @@ -5237,6 +5458,13 @@ type FleetLaunchTemplateOverrides struct { // The Availability Zone in which to launch the instances. AvailabilityZone *string + // The block device mapping, which defines the EBS volumes and instance store + // volumes to attach to the instance at launch. For more information, see [Block device mappings for volumes on Amazon EC2 instances]in the + // Amazon EC2 User Guide. + // + // [Block device mappings for volumes on Amazon EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html + BlockDeviceMappings []BlockDeviceMappingResponse + // The ID of the AMI in the format ami-17characters00000 . // // Alternatively, you can specify a Systems Manager parameter, using one of the @@ -5291,6 +5519,9 @@ type FleetLaunchTemplateOverrides struct { // // If you specify a maximum price, your instances will be interrupted more // frequently than if you do not specify this parameter. + // + // If you specify a maximum price, it must be more than USD $0.001. Specifying a + // value below USD $0.001 will result in an InvalidParameterValue error message. MaxPrice *string // The location where the instance launched, if applicable. @@ -5339,6 +5570,28 @@ type FleetLaunchTemplateOverridesRequest struct { // The Availability Zone in which to launch the instances. AvailabilityZone *string + // The block device mapping, which defines the EBS volumes and instance store + // volumes to attach to the instance at launch. For more information, see [Block device mappings for volumes on Amazon EC2 instances]in the + // Amazon EC2 User Guide. + // + // To override a block device mapping specified in the launch template: + // + // - Specify the exact same DeviceName here as specified in the launch template. + // + // - Only specify the parameters you want to change. + // + // - Any parameters you don't specify here will keep their original launch + // template values. + // + // To add a new block device mapping: + // + // - Specify a DeviceName that doesn't exist in the launch template. + // + // - Specify all desired parameters here. + // + // [Block device mappings for volumes on Amazon EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/block-device-mapping-concepts.html + BlockDeviceMappings []FleetBlockDeviceMappingRequest + // The ID of the AMI in the format ami-17characters00000 . // // Alternatively, you can specify a Systems Manager parameter, using one of the @@ -5393,6 +5646,9 @@ type FleetLaunchTemplateOverridesRequest struct { // // If you specify a maximum price, your instances will be interrupted more // frequently than if you do not specify this parameter. + // + // If you specify a maximum price, it must be more than USD $0.001. Specifying a + // value below USD $0.001 will result in an InvalidParameterValue error message. MaxPrice *string // The location where the instance launched, if applicable. @@ -8017,6 +8273,8 @@ type InstanceRequirements struct { // // - For instance types with Inference accelerators, specify inference . // + // - For instance types with Inference accelerators, specify inference . + // // Default: Any accelerator type AcceleratorTypes []AcceleratorType @@ -10562,9 +10820,9 @@ type LaunchTemplateConfig struct { type LaunchTemplateCpuOptions struct { // Indicates whether the instance is enabled for AMD SEV-SNP. For more - // information, see [AMD SEV-SNP]. + // information, see [AMD SEV-SNP for Amazon EC2 instances]. // - // [AMD SEV-SNP]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html + // [AMD SEV-SNP for Amazon EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html AmdSevSnp AmdSevSnpSpecification // The number of CPU cores for the instance. @@ -10581,10 +10839,10 @@ type LaunchTemplateCpuOptions struct { type LaunchTemplateCpuOptionsRequest struct { // Indicates whether to enable the instance for AMD SEV-SNP. AMD SEV-SNP is - // supported with M6a, R6a, and C6a instance types only. For more information, see [AMD SEV-SNP] + // supported with M6a, R6a, and C6a instance types only. For more information, see [AMD SEV-SNP for Amazon EC2 instances] // . // - // [AMD SEV-SNP]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html + // [AMD SEV-SNP for Amazon EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/sev-snp.html AmdSevSnp AmdSevSnpSpecification // The number of CPU cores for the instance. @@ -10657,7 +10915,7 @@ type LaunchTemplateEbsBlockDeviceRequest struct { // // This parameter is supported for io1 , io2 , and gp3 volumes only. // - // [instances built on the Nitro System]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html#ec2-nitro-instances + // [instances built on the Nitro System]: https://docs.aws.amazon.com/ec2/latest/instancetypes/ec2-nitro-instances.html Iops *int32 // Identifier (key ID, key alias, key ARN, or alias ARN) of the customer managed @@ -10781,10 +11039,10 @@ type LaunchTemplateEnclaveOptions struct { } // Indicates whether the instance is enabled for Amazon Web Services Nitro -// Enclaves. For more information, see [What is Amazon Web Services Nitro Enclaves?]in the Amazon Web Services Nitro Enclaves +// Enclaves. For more information, see [What is Nitro Enclaves?]in the Amazon Web Services Nitro Enclaves // User Guide. // -// [What is Amazon Web Services Nitro Enclaves?]: https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html +// [What is Nitro Enclaves?]: https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html type LaunchTemplateEnclaveOptionsRequest struct { // To enable the instance for Amazon Web Services Nitro Enclaves, set this @@ -10887,10 +11145,10 @@ type LaunchTemplateInstanceMarketOptionsRequest struct { noSmithyDocumentSerde } -// The metadata options for the instance. For more information, see [Instance metadata and user data] in the Amazon +// The metadata options for the instance. For more information, see [Use instance metadata to manage your EC2 instance] in the Amazon // EC2 User Guide. // -// [Instance metadata and user data]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html +// [Use instance metadata to manage your EC2 instance]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html type LaunchTemplateInstanceMetadataOptions struct { // Enables or disables the HTTP metadata endpoint on your instances. If the @@ -10929,11 +11187,11 @@ type LaunchTemplateInstanceMetadataOptions struct { // Set to enabled to allow access to instance tags from the instance metadata. Set // to disabled to turn off access to instance tags from the instance metadata. For - // more information, see [Work with instance tags using the instance metadata]. + // more information, see [View tags for your EC2 instances using instance metadata]. // // Default: disabled // - // [Work with instance tags using the instance metadata]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS + // [View tags for your EC2 instances using instance metadata]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-tags-in-IMDS.html InstanceMetadataTags LaunchTemplateInstanceMetadataTagsState // The state of the metadata option changes. @@ -10947,10 +11205,10 @@ type LaunchTemplateInstanceMetadataOptions struct { noSmithyDocumentSerde } -// The metadata options for the instance. For more information, see [Instance metadata and user data] in the Amazon +// The metadata options for the instance. For more information, see [Use instance metadata to manage your EC2 instance] in the Amazon // EC2 User Guide. // -// [Instance metadata and user data]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html +// [Use instance metadata to manage your EC2 instance]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html type LaunchTemplateInstanceMetadataOptionsRequest struct { // Enables or disables the HTTP metadata endpoint on your instances. If the @@ -10992,11 +11250,11 @@ type LaunchTemplateInstanceMetadataOptionsRequest struct { // Set to enabled to allow access to instance tags from the instance metadata. Set // to disabled to turn off access to instance tags from the instance metadata. For - // more information, see [Work with instance tags using the instance metadata]. + // more information, see [View tags for your EC2 instances using instance metadata]. // // Default: disabled // - // [Work with instance tags using the instance metadata]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#work-with-tags-in-IMDS + // [View tags for your EC2 instances using instance metadata]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/work-with-tags-in-IMDS.html InstanceMetadataTags LaunchTemplateInstanceMetadataTagsState noSmithyDocumentSerde @@ -11010,9 +11268,9 @@ type LaunchTemplateInstanceNetworkInterfaceSpecification struct { // // Use this option when you launch an instance in a Wavelength Zone and want to // associate a Carrier IP address with the network interface. For more information - // about Carrier IP addresses, see [Carrier IP addresses]in the Wavelength Developer Guide. + // about Carrier IP addresses, see [Carrier IP address]in the Wavelength Developer Guide. // - // [Carrier IP addresses]: https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip + // [Carrier IP address]: https://docs.aws.amazon.com/wavelength/latest/developerguide/how-wavelengths-work.html#provider-owned-ip AssociateCarrierIpAddress *bool // Indicates whether to associate a public IPv4 address with eth0 for a new @@ -11150,7 +11408,7 @@ type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct { Groups []string // The type of network interface. To create an Elastic Fabric Adapter (EFA), - // specify efa or efa . For more information, see [Elastic Fabric Adapter] in the Amazon EC2 User Guide. + // specify efa or efa . For more information, see [Elastic Fabric Adapter for AI/ML and HPC workloads on Amazon EC2] in the Amazon EC2 User Guide. // // If you are not creating an EFA, specify interface or omit this parameter. // @@ -11159,7 +11417,7 @@ type LaunchTemplateInstanceNetworkInterfaceSpecificationRequest struct { // // Valid values: interface | efa | efa-only // - // [Elastic Fabric Adapter]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html + // [Elastic Fabric Adapter for AI/ML and HPC workloads on Amazon EC2]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/efa.html InterfaceType *string // The number of IPv4 prefixes to be automatically assigned to the network @@ -11502,13 +11760,12 @@ type LaunchTemplateSpotMarketOptions struct { // The behavior when a Spot Instance is interrupted. InstanceInterruptionBehavior InstanceInterruptionBehavior - // The maximum hourly price you're willing to pay for the Spot Instances. We do - // not recommend using this parameter because it can lead to increased - // interruptions. If you do not specify this parameter, you will pay the current - // Spot price. - // - // If you specify a maximum price, your Spot Instances will be interrupted more - // frequently than if you do not specify this parameter. + // The maximum hourly price you're willing to pay for a Spot Instance. We do not + // recommend using this parameter because it can lead to increased interruptions. + // If you do not specify this parameter, you will pay the current Spot price. If + // you do specify this parameter, it must be more than USD $0.001. Specifying a + // value below USD $0.001 will result in an InvalidParameterValue error message + // when the launch template is used to launch an instance. MaxPrice *string // The Spot Instance request type. @@ -11532,10 +11789,12 @@ type LaunchTemplateSpotMarketOptionsRequest struct { // The behavior when a Spot Instance is interrupted. The default is terminate . InstanceInterruptionBehavior InstanceInterruptionBehavior - // The maximum hourly price you're willing to pay for the Spot Instances. We do - // not recommend using this parameter because it can lead to increased - // interruptions. If you do not specify this parameter, you will pay the current - // Spot price. + // The maximum hourly price you're willing to pay for a Spot Instance. We do not + // recommend using this parameter because it can lead to increased interruptions. + // If you do not specify this parameter, you will pay the current Spot price. If + // you do specify this parameter, it must be more than USD $0.001. Specifying a + // value below USD $0.001 will result in an InvalidParameterValue error message + // when the launch template is used to launch an instance. // // If you specify a maximum price, your Spot Instances will be interrupted more // frequently than if you do not specify this parameter. @@ -14872,19 +15131,19 @@ type RequestLaunchTemplateData struct { // attributes (instance type, platform, Availability Zone). CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationRequest - // The CPU options for the instance. For more information, see [Optimize CPU options] in the Amazon EC2 + // The CPU options for the instance. For more information, see [CPU options for Amazon EC2 instances] in the Amazon EC2 // User Guide. // - // [Optimize CPU options]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html + // [CPU options for Amazon EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html CpuOptions *LaunchTemplateCpuOptionsRequest // The credit option for CPU usage of the instance. Valid only for T instances. CreditSpecification *CreditSpecificationRequest // Indicates whether to enable the instance for stop protection. For more - // information, see [Enable stop protection for your instance]in the Amazon EC2 User Guide. + // information, see [Enable stop protection for your EC2 instances]in the Amazon EC2 User Guide. // - // [Enable stop protection for your instance]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html + // [Enable stop protection for your EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html DisableApiStop *bool // Indicates whether termination protection is enabled for the instance. The @@ -14926,13 +15185,13 @@ type RequestLaunchTemplateData struct { ElasticInferenceAccelerators []LaunchTemplateElasticInferenceAccelerator // Indicates whether the instance is enabled for Amazon Web Services Nitro - // Enclaves. For more information, see [What is Amazon Web Services Nitro Enclaves?]in the Amazon Web Services Nitro Enclaves + // Enclaves. For more information, see [What is Nitro Enclaves?]in the Amazon Web Services Nitro Enclaves // User Guide. // // You can't enable Amazon Web Services Nitro Enclaves and hibernation on the same // instance. // - // [What is Amazon Web Services Nitro Enclaves?]: https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html + // [What is Nitro Enclaves?]: https://docs.aws.amazon.com/enclaves/latest/user/nitro-enclave.html EnclaveOptions *LaunchTemplateEnclaveOptionsRequest // Indicates whether an instance is enabled for hibernation. This parameter is @@ -15041,9 +15300,9 @@ type RequestLaunchTemplateData struct { // The ID of the kernel. // // We recommend that you use PV-GRUB instead of kernels and RAM disks. For more - // information, see [User provided kernels]in the Amazon EC2 User Guide. + // information, see [User provided kernels]in the Amazon Linux 2 User Guide. // - // [User provided kernels]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/UserProvidedkernels.html + // [User provided kernels]: https://docs.aws.amazon.com/linux/al2/ug/UserProvidedKernels.html KernelId *string // The name of the key pair. You can create a key pair using [CreateKeyPair] or [ImportKeyPair]. @@ -15061,10 +15320,10 @@ type RequestLaunchTemplateData struct { // The maintenance options for the instance. MaintenanceOptions *LaunchTemplateInstanceMaintenanceOptionsRequest - // The metadata options for the instance. For more information, see [Instance metadata and user data] in the Amazon + // The metadata options for the instance. For more information, see [Configure the Instance Metadata Service options] in the Amazon // EC2 User Guide. // - // [Instance metadata and user data]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html + // [Configure the Instance Metadata Service options]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html MetadataOptions *LaunchTemplateInstanceMetadataOptionsRequest // The monitoring for the instance. @@ -15113,15 +15372,15 @@ type RequestLaunchTemplateData struct { TagSpecifications []LaunchTemplateTagSpecificationRequest // The user data to make available to the instance. You must provide - // base64-encoded text. User data is limited to 16 KB. For more information, see [Run commands on your Amazon EC2 instance at launch] + // base64-encoded text. User data is limited to 16 KB. For more information, see [Run commands when you launch an EC2 instance with user data input] // in the Amazon EC2 User Guide. // // If you are creating the launch template for use with Batch, the user data must // be provided in the [MIME multi-part archive format]. For more information, see [Amazon EC2 user data in launch templates] in the Batch User Guide. // - // [Amazon EC2 user data in launch templates]: https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html + // [Amazon EC2 user data in launch templates]: https://docs.aws.amazon.com/batch/latest/userguide/launch-templates.html#lt-user-data + // [Run commands when you launch an EC2 instance with user data input]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html // [MIME multi-part archive format]: https://cloudinit.readthedocs.io/en/latest/topics/format.html#mime-multi-part-archive - // [Run commands on your Amazon EC2 instance at launch]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/user-data.html UserData *string noSmithyDocumentSerde @@ -15599,19 +15858,19 @@ type ResponseLaunchTemplateData struct { // Information about the Capacity Reservation targeting option. CapacityReservationSpecification *LaunchTemplateCapacityReservationSpecificationResponse - // The CPU options for the instance. For more information, see [Optimize CPU options] in the Amazon EC2 + // The CPU options for the instance. For more information, see [CPU options for Amazon EC2 instances] in the Amazon EC2 // User Guide. // - // [Optimize CPU options]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html + // [CPU options for Amazon EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-optimize-cpu.html CpuOptions *LaunchTemplateCpuOptions // The credit option for CPU usage of the instance. CreditSpecification *CreditSpecification // Indicates whether the instance is enabled for stop protection. For more - // information, see [Enable stop protection for your instance]in the Amazon EC2 User Guide. + // information, see [Enable stop protection for your EC2 instances]in the Amazon EC2 User Guide. // - // [Enable stop protection for your instance]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html + // [Enable stop protection for your EC2 instances]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-stop-protection.html DisableApiStop *bool // If set to true , indicates that the instance cannot be terminated using the @@ -15674,7 +15933,7 @@ type ResponseLaunchTemplateData struct { // // For more information, see [Use a Systems Manager parameter instead of an AMI ID] in the Amazon EC2 User Guide. // - // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#use-an-ssm-parameter-instead-of-an-ami-id + // [Use a Systems Manager parameter instead of an AMI ID]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/create-launch-template.html#use-an-ssm-parameter-instead-of-an-ami-id ImageId *string // Indicates whether an instance stops or terminates when you initiate shutdown @@ -15705,10 +15964,10 @@ type ResponseLaunchTemplateData struct { // The maintenance options for your instance. MaintenanceOptions *LaunchTemplateInstanceMaintenanceOptions - // The metadata options for the instance. For more information, see [Instance metadata and user data] in the Amazon + // The metadata options for the instance. For more information, see [Configure the Instance Metadata Service options] in the Amazon // EC2 User Guide. // - // [Instance metadata and user data]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html + // [Configure the Instance Metadata Service options]: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-instance-metadata-options.html MetadataOptions *LaunchTemplateInstanceMetadataOptions // The monitoring for the instance. diff --git a/service/iotfleetwise/api_op_DeleteStateTemplate.go b/service/iotfleetwise/api_op_DeleteStateTemplate.go index e88eb1863f3..b950c2f559f 100644 --- a/service/iotfleetwise/api_op_DeleteStateTemplate.go +++ b/service/iotfleetwise/api_op_DeleteStateTemplate.go @@ -28,7 +28,7 @@ func (c *Client) DeleteStateTemplate(ctx context.Context, params *DeleteStateTem type DeleteStateTemplateInput struct { - // A unique, service-generated identifier. + // The unique ID of the state template. // // This member is required. Identifier *string diff --git a/service/iotfleetwise/api_op_GetStateTemplate.go b/service/iotfleetwise/api_op_GetStateTemplate.go index 639556af555..bd60085edcc 100644 --- a/service/iotfleetwise/api_op_GetStateTemplate.go +++ b/service/iotfleetwise/api_op_GetStateTemplate.go @@ -35,7 +35,7 @@ func (c *Client) GetStateTemplate(ctx context.Context, params *GetStateTemplateI type GetStateTemplateInput struct { - // A unique, service-generated identifier. + // The unique ID of the state template. // // This member is required. Identifier *string diff --git a/service/iotfleetwise/api_op_ListCampaigns.go b/service/iotfleetwise/api_op_ListCampaigns.go index e4276d886da..c7a5d62a5c1 100644 --- a/service/iotfleetwise/api_op_ListCampaigns.go +++ b/service/iotfleetwise/api_op_ListCampaigns.go @@ -32,6 +32,11 @@ func (c *Client) ListCampaigns(ctx context.Context, params *ListCampaignsInput, type ListCampaignsInput struct { + // When you set the listResponseScope parameter to METADATA_ONLY , the list + // response includes: campaign name, Amazon Resource Name (ARN), creation time, and + // last modification time. + ListResponseScope types.ListResponseScope + // The maximum number of items to return, between 1 and 100, inclusive. MaxResults *int32 diff --git a/service/iotfleetwise/api_op_ListDecoderManifests.go b/service/iotfleetwise/api_op_ListDecoderManifests.go index 8f558961015..bccb5aa79a7 100644 --- a/service/iotfleetwise/api_op_ListDecoderManifests.go +++ b/service/iotfleetwise/api_op_ListDecoderManifests.go @@ -32,6 +32,11 @@ func (c *Client) ListDecoderManifests(ctx context.Context, params *ListDecoderMa type ListDecoderManifestsInput struct { + // When you set the listResponseScope parameter to METADATA_ONLY , the list + // response includes: decoder manifest name, Amazon Resource Name (ARN), creation + // time, and last modification time. + ListResponseScope types.ListResponseScope + // The maximum number of items to return, between 1 and 100, inclusive. MaxResults *int32 diff --git a/service/iotfleetwise/api_op_ListFleets.go b/service/iotfleetwise/api_op_ListFleets.go index 74ee54cfcaf..ee1dc958a58 100644 --- a/service/iotfleetwise/api_op_ListFleets.go +++ b/service/iotfleetwise/api_op_ListFleets.go @@ -34,6 +34,11 @@ func (c *Client) ListFleets(ctx context.Context, params *ListFleetsInput, optFns type ListFleetsInput struct { + // When you set the listResponseScope parameter to METADATA_ONLY , the list + // response includes: fleet ID, Amazon Resource Name (ARN), creation time, and last + // modification time. + ListResponseScope types.ListResponseScope + // The maximum number of items to return, between 1 and 100, inclusive. MaxResults *int32 diff --git a/service/iotfleetwise/api_op_ListModelManifests.go b/service/iotfleetwise/api_op_ListModelManifests.go index 4bc4a8e5f3a..5f2d4a4fba8 100644 --- a/service/iotfleetwise/api_op_ListModelManifests.go +++ b/service/iotfleetwise/api_op_ListModelManifests.go @@ -32,6 +32,11 @@ func (c *Client) ListModelManifests(ctx context.Context, params *ListModelManife type ListModelManifestsInput struct { + // When you set the listResponseScope parameter to METADATA_ONLY , the list + // response includes: model manifest name, Amazon Resource Name (ARN), creation + // time, and last modification time. + ListResponseScope types.ListResponseScope + // The maximum number of items to return, between 1 and 100, inclusive. MaxResults *int32 diff --git a/service/iotfleetwise/api_op_ListStateTemplates.go b/service/iotfleetwise/api_op_ListStateTemplates.go index bdb8e8bbb03..b6028fe0232 100644 --- a/service/iotfleetwise/api_op_ListStateTemplates.go +++ b/service/iotfleetwise/api_op_ListStateTemplates.go @@ -35,6 +35,11 @@ func (c *Client) ListStateTemplates(ctx context.Context, params *ListStateTempla type ListStateTemplatesInput struct { + // When you set the listResponseScope parameter to METADATA_ONLY , the list + // response includes: state template ID, Amazon Resource Name (ARN), creation time, + // and last modification time. + ListResponseScope types.ListResponseScope + // The maximum number of items to return, between 1 and 100, inclusive. MaxResults *int32 diff --git a/service/iotfleetwise/api_op_ListVehicles.go b/service/iotfleetwise/api_op_ListVehicles.go index cd0ff6c3938..5de058c7b13 100644 --- a/service/iotfleetwise/api_op_ListVehicles.go +++ b/service/iotfleetwise/api_op_ListVehicles.go @@ -56,6 +56,11 @@ type ListVehiclesInput struct { // attributes filter condition. AttributeValues []string + // When you set the listResponseScope parameter to METADATA_ONLY , the list + // response includes: vehicle name, Amazon Resource Name (ARN), creation time, and + // last modification time. + ListResponseScope types.ListResponseScope + // The maximum number of items to return, between 1 and 100, inclusive. MaxResults *int32 diff --git a/service/iotfleetwise/api_op_UpdateStateTemplate.go b/service/iotfleetwise/api_op_UpdateStateTemplate.go index 22b2b565c19..0eba9325a76 100644 --- a/service/iotfleetwise/api_op_UpdateStateTemplate.go +++ b/service/iotfleetwise/api_op_UpdateStateTemplate.go @@ -34,7 +34,7 @@ func (c *Client) UpdateStateTemplate(ctx context.Context, params *UpdateStateTem type UpdateStateTemplateInput struct { - // A unique, service-generated identifier. + // The unique ID of the state template. // // This member is required. Identifier *string diff --git a/service/iotfleetwise/serializers.go b/service/iotfleetwise/serializers.go index 8e8aec6fb44..cfbab3f8cca 100644 --- a/service/iotfleetwise/serializers.go +++ b/service/iotfleetwise/serializers.go @@ -6127,6 +6127,11 @@ func awsAwsjson10_serializeOpDocumentListCampaignsInput(v *ListCampaignsInput, v object := value.Object() defer object.Close() + if len(v.ListResponseScope) > 0 { + ok := object.Key("listResponseScope") + ok.String(string(v.ListResponseScope)) + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) @@ -6193,6 +6198,11 @@ func awsAwsjson10_serializeOpDocumentListDecoderManifestsInput(v *ListDecoderMan object := value.Object() defer object.Close() + if len(v.ListResponseScope) > 0 { + ok := object.Key("listResponseScope") + ok.String(string(v.ListResponseScope)) + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) @@ -6237,6 +6247,11 @@ func awsAwsjson10_serializeOpDocumentListFleetsInput(v *ListFleetsInput, value s object := value.Object() defer object.Close() + if len(v.ListResponseScope) > 0 { + ok := object.Key("listResponseScope") + ok.String(string(v.ListResponseScope)) + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) @@ -6276,6 +6291,11 @@ func awsAwsjson10_serializeOpDocumentListModelManifestsInput(v *ListModelManifes object := value.Object() defer object.Close() + if len(v.ListResponseScope) > 0 { + ok := object.Key("listResponseScope") + ok.String(string(v.ListResponseScope)) + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) @@ -6342,6 +6362,11 @@ func awsAwsjson10_serializeOpDocumentListStateTemplatesInput(v *ListStateTemplat object := value.Object() defer object.Close() + if len(v.ListResponseScope) > 0 { + ok := object.Key("listResponseScope") + ok.String(string(v.ListResponseScope)) + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) @@ -6407,6 +6432,11 @@ func awsAwsjson10_serializeOpDocumentListVehiclesInput(v *ListVehiclesInput, val } } + if len(v.ListResponseScope) > 0 { + ok := object.Key("listResponseScope") + ok.String(string(v.ListResponseScope)) + } + if v.MaxResults != nil { ok := object.Key("maxResults") ok.Integer(*v.MaxResults) diff --git a/service/iotfleetwise/types/enums.go b/service/iotfleetwise/types/enums.go index 39c1695f52d..3d07480fb79 100644 --- a/service/iotfleetwise/types/enums.go +++ b/service/iotfleetwise/types/enums.go @@ -140,6 +140,23 @@ func (EncryptionType) Values() []EncryptionType { } } +type ListResponseScope string + +// Enum values for ListResponseScope +const ( + ListResponseScopeMetadataOnly ListResponseScope = "METADATA_ONLY" +) + +// Values returns all known values for ListResponseScope. Note that this can be +// expanded in the future, and so it is only as up to date as the client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (ListResponseScope) Values() []ListResponseScope { + return []ListResponseScope{ + "METADATA_ONLY", + } +} + type LogType string // Enum values for LogType diff --git a/service/iotfleetwise/types/types.go b/service/iotfleetwise/types/types.go index a816ca2ca27..e543667ab8b 100644 --- a/service/iotfleetwise/types/types.go +++ b/service/iotfleetwise/types/types.go @@ -1482,7 +1482,7 @@ type SignalInformation struct { // [Amazon Web Services Region and feature availability]: https://docs.aws.amazon.com/iot-fleetwise/latest/developerguide/fleetwise-regions.html type StateTemplateAssociation struct { - // A unique, service-generated identifier. + // The unique ID of the state template. // // This member is required. Identifier *string diff --git a/service/oam/doc.go b/service/oam/doc.go index a15cbf85d19..3bff8ccf8d4 100644 --- a/service/oam/doc.go +++ b/service/oam/doc.go @@ -8,8 +8,9 @@ // cross-account observability. With CloudWatch cross-account observability, you // can monitor and troubleshoot applications that span multiple accounts within a // Region. Seamlessly search, visualize, and analyze your metrics, logs, traces, -// and Application Insights applications in any of the linked accounts without -// account boundaries. +// Application Signals services, service level objectives (SLOs), Application +// Insights applications, and internet monitors in any of the linked accounts +// without account boundaries. // // Set up one or more Amazon Web Services accounts as monitoring accounts and link // them with multiple source accounts. A monitoring account is a central Amazon Web @@ -18,6 +19,12 @@ // account that generates observability data for the resources that reside in it. // Source accounts share their observability data with the monitoring account. The // shared observability data can include metrics in Amazon CloudWatch, logs in -// Amazon CloudWatch Logs, traces in X-Ray, and applications in Amazon CloudWatch -// Application Insights. +// Amazon CloudWatch Logs, traces in X-Ray, Application Signals services, service +// level objectives (SLOs), applications in Amazon CloudWatch Application Insights, +// and internet monitors in CloudWatch Internet Monitor. +// +// When you set up a link, you can choose to share the metrics from all namespaces +// with the monitoring account, or filter to a subset of namespaces. And for +// CloudWatch Logs, you can choose to share all log groups with the monitoring +// account, or filter to a subset of log groups. package oam diff --git a/service/oam/types/enums.go b/service/oam/types/enums.go index 7063b2fa163..e144fc8d645 100644 --- a/service/oam/types/enums.go +++ b/service/oam/types/enums.go @@ -11,6 +11,8 @@ const ( ResourceTypeAwsXrayTrace ResourceType = "AWS::XRay::Trace" ResourceTypeAwsApplicationinsightsApplication ResourceType = "AWS::ApplicationInsights::Application" ResourceTypeAwsInternetmonitorMonitor ResourceType = "AWS::InternetMonitor::Monitor" + ResourceTypeAwsApplicationSignalsService ResourceType = "AWS::ApplicationSignals::Service" + ResourceTypeAwsApplicationSignalsSlo ResourceType = "AWS::ApplicationSignals::ServiceLevelObjective" ) // Values returns all known values for ResourceType. Note that this can be @@ -24,5 +26,7 @@ func (ResourceType) Values() []ResourceType { "AWS::XRay::Trace", "AWS::ApplicationInsights::Application", "AWS::InternetMonitor::Monitor", + "AWS::ApplicationSignals::Service", + "AWS::ApplicationSignals::ServiceLevelObjective", } } diff --git a/service/route53profiles/internal/endpoints/endpoints.go b/service/route53profiles/internal/endpoints/endpoints.go index 4eb7fb6b3f5..0980405c7a1 100644 --- a/service/route53profiles/internal/endpoints/endpoints.go +++ b/service/route53profiles/internal/endpoints/endpoints.go @@ -138,6 +138,269 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "af-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "af-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.af-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-northeast-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-northeast-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-northeast-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-south-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-southeast-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-southeast-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-southeast-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ap-southeast-4.api.aws", + }, + endpoints.EndpointKey{ + Region: "ca-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ca-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "ca-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.ca-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.eu-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.eu-central-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-north-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.eu-north-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.eu-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.eu-south-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.eu-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.eu-west-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "eu-west-3", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-west-3", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.eu-west-3.api.aws", + }, + endpoints.EndpointKey{ + Region: "il-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "il-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.il-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "me-central-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-central-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.me-central-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "me-south-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "me-south-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.me-south-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "sa-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "sa-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.sa-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.us-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-east-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.us-east-2.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.us-west-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.us-west-2.api.aws", + }, + }, }, { ID: "aws-cn", @@ -292,5 +555,25 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsUsGov, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "us-gov-east-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.us-gov-east-1.api.aws", + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.DualStackVariant, + }: { + Hostname: "route53profiles.us-gov-west-1.api.aws", + }, + }, }, } diff --git a/service/sagemaker/api_op_BatchDeleteClusterNodes.go b/service/sagemaker/api_op_BatchDeleteClusterNodes.go index dfb85e65cca..98fd24eaaa1 100644 --- a/service/sagemaker/api_op_BatchDeleteClusterNodes.go +++ b/service/sagemaker/api_op_BatchDeleteClusterNodes.go @@ -51,8 +51,12 @@ type BatchDeleteClusterNodesInput struct { // A list of node IDs to be deleted from the specified cluster. // - // For SageMaker HyperPod clusters using the Slurm workload manager, you cannot - // remove instances that are configured as Slurm controller nodes. + // - For SageMaker HyperPod clusters using the Slurm workload manager, you + // cannot remove instances that are configured as Slurm controller nodes. + // + // - If you need to delete more than 99 instances, contact [Support]for assistance. + // + // [Support]: http://aws.amazon.com/contact-us/ // // This member is required. NodeIds []string diff --git a/service/sagemaker/api_op_DescribeInferenceComponent.go b/service/sagemaker/api_op_DescribeInferenceComponent.go index c4bf28f739f..966227e8557 100644 --- a/service/sagemaker/api_op_DescribeInferenceComponent.go +++ b/service/sagemaker/api_op_DescribeInferenceComponent.go @@ -77,6 +77,10 @@ type DescribeInferenceComponentOutput struct { // The status of the inference component. InferenceComponentStatus types.InferenceComponentStatus + // The deployment and rollback settings that you assigned to the inference + // component. + LastDeploymentConfig *types.InferenceComponentDeploymentConfig + // Details about the runtime settings for the model that is deployed with the // inference component. RuntimeConfig *types.InferenceComponentRuntimeConfigSummary diff --git a/service/sagemaker/api_op_UpdateInferenceComponent.go b/service/sagemaker/api_op_UpdateInferenceComponent.go index dd259d540df..e10ac83d5e8 100644 --- a/service/sagemaker/api_op_UpdateInferenceComponent.go +++ b/service/sagemaker/api_op_UpdateInferenceComponent.go @@ -34,6 +34,10 @@ type UpdateInferenceComponentInput struct { // This member is required. InferenceComponentName *string + // The deployment configuration for the inference component. The configuration + // contains the desired deployment strategy and rollback settings. + DeploymentConfig *types.InferenceComponentDeploymentConfig + // Runtime settings for a model that is deployed with an inference component. RuntimeConfig *types.InferenceComponentRuntimeConfig diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 8cd4794c7ca..f1e2a8bc9ea 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -59250,6 +59250,59 @@ func awsAwsjson11_deserializeDocumentImageVersions(v *[]types.ImageVersion, valu return nil } +func awsAwsjson11_deserializeDocumentInferenceComponentCapacitySize(v **types.InferenceComponentCapacitySize, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InferenceComponentCapacitySize + if *v == nil { + sv = &types.InferenceComponentCapacitySize{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InferenceComponentCapacitySizeType to be of type string, got %T instead", value) + } + sv.Type = types.InferenceComponentCapacitySizeType(jtv) + } + + case "Value": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected CapacitySizeValue to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Value = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentInferenceComponentComputeResourceRequirements(v **types.InferenceComponentComputeResourceRequirements, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -59425,6 +59478,114 @@ func awsAwsjson11_deserializeDocumentInferenceComponentContainerSpecificationSum return nil } +func awsAwsjson11_deserializeDocumentInferenceComponentDeploymentConfig(v **types.InferenceComponentDeploymentConfig, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InferenceComponentDeploymentConfig + if *v == nil { + sv = &types.InferenceComponentDeploymentConfig{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "AutoRollbackConfiguration": + if err := awsAwsjson11_deserializeDocumentAutoRollbackConfig(&sv.AutoRollbackConfiguration, value); err != nil { + return err + } + + case "RollingUpdatePolicy": + if err := awsAwsjson11_deserializeDocumentInferenceComponentRollingUpdatePolicy(&sv.RollingUpdatePolicy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentInferenceComponentRollingUpdatePolicy(v **types.InferenceComponentRollingUpdatePolicy, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.InferenceComponentRollingUpdatePolicy + if *v == nil { + sv = &types.InferenceComponentRollingUpdatePolicy{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "MaximumBatchSize": + if err := awsAwsjson11_deserializeDocumentInferenceComponentCapacitySize(&sv.MaximumBatchSize, value); err != nil { + return err + } + + case "MaximumExecutionTimeoutInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected MaximumExecutionTimeoutInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaximumExecutionTimeoutInSeconds = ptr.Int32(int32(i64)) + } + + case "RollbackMaximumBatchSize": + if err := awsAwsjson11_deserializeDocumentInferenceComponentCapacitySize(&sv.RollbackMaximumBatchSize, value); err != nil { + return err + } + + case "WaitIntervalInSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected WaitIntervalInSeconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WaitIntervalInSeconds = ptr.Int32(int32(i64)) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentInferenceComponentRuntimeConfigSummary(v **types.InferenceComponentRuntimeConfigSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -96175,6 +96336,11 @@ func awsAwsjson11_deserializeOpDocumentDescribeInferenceComponentOutput(v **Desc sv.InferenceComponentStatus = types.InferenceComponentStatus(jtv) } + case "LastDeploymentConfig": + if err := awsAwsjson11_deserializeDocumentInferenceComponentDeploymentConfig(&sv.LastDeploymentConfig, value); err != nil { + return err + } + case "LastModifiedTime": if value != nil { switch jtv := value.(type) { diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 79643cab4c0..ee364fb3a78 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -26912,6 +26912,23 @@ func awsAwsjson11_serializeDocumentImageDeletePropertyList(v []string, value smi return nil } +func awsAwsjson11_serializeDocumentInferenceComponentCapacitySize(v *types.InferenceComponentCapacitySize, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.Type) > 0 { + ok := object.Key("Type") + ok.String(string(v.Type)) + } + + if v.Value != nil { + ok := object.Key("Value") + ok.Integer(*v.Value) + } + + return nil +} + func awsAwsjson11_serializeDocumentInferenceComponentComputeResourceRequirements(v *types.InferenceComponentComputeResourceRequirements, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -26989,6 +27006,58 @@ func awsAwsjson11_serializeDocumentInferenceComponentContainerSpecification(v *t return nil } +func awsAwsjson11_serializeDocumentInferenceComponentDeploymentConfig(v *types.InferenceComponentDeploymentConfig, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AutoRollbackConfiguration != nil { + ok := object.Key("AutoRollbackConfiguration") + if err := awsAwsjson11_serializeDocumentAutoRollbackConfig(v.AutoRollbackConfiguration, ok); err != nil { + return err + } + } + + if v.RollingUpdatePolicy != nil { + ok := object.Key("RollingUpdatePolicy") + if err := awsAwsjson11_serializeDocumentInferenceComponentRollingUpdatePolicy(v.RollingUpdatePolicy, ok); err != nil { + return err + } + } + + return nil +} + +func awsAwsjson11_serializeDocumentInferenceComponentRollingUpdatePolicy(v *types.InferenceComponentRollingUpdatePolicy, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaximumBatchSize != nil { + ok := object.Key("MaximumBatchSize") + if err := awsAwsjson11_serializeDocumentInferenceComponentCapacitySize(v.MaximumBatchSize, ok); err != nil { + return err + } + } + + if v.MaximumExecutionTimeoutInSeconds != nil { + ok := object.Key("MaximumExecutionTimeoutInSeconds") + ok.Integer(*v.MaximumExecutionTimeoutInSeconds) + } + + if v.RollbackMaximumBatchSize != nil { + ok := object.Key("RollbackMaximumBatchSize") + if err := awsAwsjson11_serializeDocumentInferenceComponentCapacitySize(v.RollbackMaximumBatchSize, ok); err != nil { + return err + } + } + + if v.WaitIntervalInSeconds != nil { + ok := object.Key("WaitIntervalInSeconds") + ok.Integer(*v.WaitIntervalInSeconds) + } + + return nil +} + func awsAwsjson11_serializeDocumentInferenceComponentRuntimeConfig(v *types.InferenceComponentRuntimeConfig, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -44086,6 +44155,13 @@ func awsAwsjson11_serializeOpDocumentUpdateInferenceComponentInput(v *UpdateInfe object := value.Object() defer object.Close() + if v.DeploymentConfig != nil { + ok := object.Key("DeploymentConfig") + if err := awsAwsjson11_serializeDocumentInferenceComponentDeploymentConfig(v.DeploymentConfig, ok); err != nil { + return err + } + } + if v.InferenceComponentName != nil { ok := object.Key("InferenceComponentName") ok.String(*v.InferenceComponentName) diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 643c8726ae6..b925e8cee5b 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -3227,6 +3227,26 @@ func (ImageVersionStatus) Values() []ImageVersionStatus { } } +type InferenceComponentCapacitySizeType string + +// Enum values for InferenceComponentCapacitySizeType +const ( + InferenceComponentCapacitySizeTypeCopyCount InferenceComponentCapacitySizeType = "COPY_COUNT" + InferenceComponentCapacitySizeTypeCapacityPercent InferenceComponentCapacitySizeType = "CAPACITY_PERCENT" +) + +// Values returns all known values for InferenceComponentCapacitySizeType. Note +// that this can be expanded in the future, and so it is only as up to date as the +// client. +// +// The ordering of this slice is not guaranteed to be stable across updates. +func (InferenceComponentCapacitySizeType) Values() []InferenceComponentCapacitySizeType { + return []InferenceComponentCapacitySizeType{ + "COPY_COUNT", + "CAPACITY_PERCENT", + } +} + type InferenceComponentSortKey string // Enum values for InferenceComponentSortKey diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index a0cd48e6dfd..96f806732d4 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -6102,8 +6102,10 @@ type ErrorInfo struct { noSmithyDocumentSerde } -// The properties of an experiment as returned by the [Search] API. +// The properties of an experiment as returned by the [Search] API. For information about +// experiments, see the [CreateExperiment]API. // +// [CreateExperiment]: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateExperiment.html // [Search]: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_Search.html type Experiment struct { @@ -9161,6 +9163,39 @@ type ImageVersion struct { noSmithyDocumentSerde } +// Specifies the type and size of the endpoint capacity to activate for a rolling +// deployment or a rollback strategy. You can specify your batches as either of the +// following: +// +// - A count of inference component copies +// +// - The overall percentage or your fleet +// +// For a rollback strategy, if you don't specify the fields in this object, or if +// you set the Value parameter to 100%, then SageMaker AI uses a blue/green +// rollback strategy and rolls all traffic back to the blue fleet. +type InferenceComponentCapacitySize struct { + + // Specifies the endpoint capacity type. + // + // COPY_COUNT The endpoint activates based on the number of inference component + // copies. + // + // CAPACITY_PERCENT The endpoint activates based on the specified percentage of + // capacity. + // + // This member is required. + Type InferenceComponentCapacitySizeType + + // Defines the capacity size, either as a number of inference component copies or + // a capacity percentage. + // + // This member is required. + Value *int32 + + noSmithyDocumentSerde +} + // Defines the compute resources to allocate to run a model, plus any adapter // models, that you assign to an inference component. These resources include CPU // cores, accelerators, and memory. @@ -9234,6 +9269,53 @@ type InferenceComponentContainerSpecificationSummary struct { noSmithyDocumentSerde } +// The deployment configuration for an endpoint that hosts inference components. +// The configuration includes the desired deployment strategy and rollback +// settings. +type InferenceComponentDeploymentConfig struct { + + // Specifies a rolling deployment strategy for updating a SageMaker AI endpoint. + // + // This member is required. + RollingUpdatePolicy *InferenceComponentRollingUpdatePolicy + + // Automatic rollback configuration for handling endpoint deployment failures and + // recovery. + AutoRollbackConfiguration *AutoRollbackConfig + + noSmithyDocumentSerde +} + +// Specifies a rolling deployment strategy for updating a SageMaker AI inference +// component. +type InferenceComponentRollingUpdatePolicy struct { + + // The batch size for each rolling step in the deployment process. For each step, + // SageMaker AI provisions capacity on the new endpoint fleet, routes traffic to + // that fleet, and terminates capacity on the old endpoint fleet. The value must be + // between 5% to 50% of the copy count of the inference component. + // + // This member is required. + MaximumBatchSize *InferenceComponentCapacitySize + + // The length of the baking period, during which SageMaker AI monitors alarms for + // each batch on the new fleet. + // + // This member is required. + WaitIntervalInSeconds *int32 + + // The time limit for the total deployment. Exceeding this limit causes a timeout. + MaximumExecutionTimeoutInSeconds *int32 + + // The batch size for a rollback to the old endpoint fleet. If this field is + // absent, the value is set to the default, which is 100% of the total capacity. + // When the default is used, SageMaker AI provisions the entire capacity of the old + // fleet at once during rollback. + RollbackMaximumBatchSize *InferenceComponentCapacitySize + + noSmithyDocumentSerde +} + // Runtime settings for a model that is deployed with an inference component. type InferenceComponentRuntimeConfig struct { @@ -11493,7 +11575,18 @@ type ModelMetrics struct { noSmithyDocumentSerde } -// A versioned model that can be deployed for SageMaker inference. +// A container for your trained model that can be deployed for SageMaker +// inference. This can include inference code, artifacts, and metadata. The model +// package type can be one of the following. +// +// - Versioned model: A part of a model package group in Model Registry. +// +// - Unversioned model: Not part of a model package group and used in Amazon Web +// Services Marketplace. +// +// For more information, see [CreateModelPackage]CreateModelPackage . +// +// [CreateModelPackage]: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelPackage.html type ModelPackage struct { // An array of additional Inference Specification objects. @@ -11577,7 +11670,13 @@ type ModelPackage struct { // The model group to which the model belongs. ModelPackageGroupName *string - // The name of the model. + // The name of the model package. The name can be as follows: + // + // - For a versioned model, the name is automatically generated by SageMaker + // Model Registry and follows the format ' + // ModelPackageGroupName/ModelPackageVersion '. + // + // - For an unversioned model, you must provide the name. ModelPackageName *string // The status of the model package. This can be one of the following values. @@ -11699,7 +11798,7 @@ type ModelPackageContainerDefinition struct { noSmithyDocumentSerde } -// A group of versioned models in the model registry. +// A group of versioned models in the Model Registry. type ModelPackageGroup struct { // Information about the user who created or modified an experiment, trial, trial @@ -16901,10 +17000,21 @@ type SearchRecord struct { // model. ModelCard *ModelCard - // A versioned model that can be deployed for SageMaker inference. + // A container for your trained model that can be deployed for SageMaker + // inference. This can include inference code, artifacts, and metadata. The model + // package type can be one of the following. + // + // - Versioned model: A part of a model package group in Model Registry. + // + // - Unversioned model: Not part of a model package group and used in Amazon Web + // Services Marketplace. + // + // For more information, see [CreateModelPackage]CreateModelPackage . + // + // [CreateModelPackage]: https://docs.aws.amazon.com/sagemaker/latest/APIReference/API_CreateModelPackage.html ModelPackage *ModelPackage - // A group of versioned models in the model registry. + // A group of versioned models in the Model Registry. ModelPackageGroup *ModelPackageGroup // A SageMaker Model Building Pipeline instance. diff --git a/service/sagemaker/validators.go b/service/sagemaker/validators.go index 2907b0f87be..0e687202420 100644 --- a/service/sagemaker/validators.go +++ b/service/sagemaker/validators.go @@ -9962,6 +9962,24 @@ func validateImageConfig(v *types.ImageConfig) error { } } +func validateInferenceComponentCapacitySize(v *types.InferenceComponentCapacitySize) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InferenceComponentCapacitySize"} + if len(v.Type) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Type")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInferenceComponentComputeResourceRequirements(v *types.InferenceComponentComputeResourceRequirements) error { if v == nil { return nil @@ -9977,6 +9995,52 @@ func validateInferenceComponentComputeResourceRequirements(v *types.InferenceCom } } +func validateInferenceComponentDeploymentConfig(v *types.InferenceComponentDeploymentConfig) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InferenceComponentDeploymentConfig"} + if v.RollingUpdatePolicy == nil { + invalidParams.Add(smithy.NewErrParamRequired("RollingUpdatePolicy")) + } else if v.RollingUpdatePolicy != nil { + if err := validateInferenceComponentRollingUpdatePolicy(v.RollingUpdatePolicy); err != nil { + invalidParams.AddNested("RollingUpdatePolicy", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateInferenceComponentRollingUpdatePolicy(v *types.InferenceComponentRollingUpdatePolicy) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "InferenceComponentRollingUpdatePolicy"} + if v.MaximumBatchSize == nil { + invalidParams.Add(smithy.NewErrParamRequired("MaximumBatchSize")) + } else if v.MaximumBatchSize != nil { + if err := validateInferenceComponentCapacitySize(v.MaximumBatchSize); err != nil { + invalidParams.AddNested("MaximumBatchSize", err.(smithy.InvalidParamsError)) + } + } + if v.WaitIntervalInSeconds == nil { + invalidParams.Add(smithy.NewErrParamRequired("WaitIntervalInSeconds")) + } + if v.RollbackMaximumBatchSize != nil { + if err := validateInferenceComponentCapacitySize(v.RollbackMaximumBatchSize); err != nil { + invalidParams.AddNested("RollbackMaximumBatchSize", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateInferenceComponentRuntimeConfig(v *types.InferenceComponentRuntimeConfig) error { if v == nil { return nil @@ -19185,6 +19249,11 @@ func validateOpUpdateInferenceComponentInput(v *UpdateInferenceComponentInput) e invalidParams.AddNested("RuntimeConfig", err.(smithy.InvalidParamsError)) } } + if v.DeploymentConfig != nil { + if err := validateInferenceComponentDeploymentConfig(v.DeploymentConfig); err != nil { + invalidParams.AddNested("DeploymentConfig", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else {