From 44686f222247329c1df783b62e820bc14cf13610 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 13 Apr 2023 18:12:06 +0000 Subject: [PATCH] Regenerated Clients --- .../004400c2552b4c2c9ed9c93850216dc4.json | 8 + .../efc6d55f663347519bbe325f80489154.json | 8 + .../acmpca/internal/endpoints/endpoints.go | 3 + .../internal/endpoints/endpoints.go | 6 + .../api_op_CreateSipMediaApplication.go | 3 + .../api_op_CreateVoiceConnector.go | 3 + service/chimesdkvoice/deserializers.go | 9 + service/chimesdkvoice/serializers.go | 14 + service/chimesdkvoice/types/types.go | 7 +- service/chimesdkvoice/validators.go | 10 + .../internal/endpoints/endpoints.go | 3 + service/efs/internal/endpoints/endpoints.go | 18 + .../internal/endpoints/endpoints.go | 6 + .../mediaconnect/api_op_AddBridgeOutputs.go | 130 + .../mediaconnect/api_op_AddBridgeSources.go | 130 + service/mediaconnect/api_op_CreateBridge.go | 151 + service/mediaconnect/api_op_CreateGateway.go | 136 + service/mediaconnect/api_op_DeleteBridge.go | 120 + service/mediaconnect/api_op_DeleteGateway.go | 121 + .../api_op_DeregisterGatewayInstance.go | 131 + service/mediaconnect/api_op_DescribeBridge.go | 123 + .../mediaconnect/api_op_DescribeGateway.go | 122 + .../api_op_DescribeGatewayInstance.go | 122 + service/mediaconnect/api_op_ListBridges.go | 233 + .../api_op_ListGatewayInstances.go | 236 + service/mediaconnect/api_op_ListGateways.go | 229 + .../mediaconnect/api_op_RemoveBridgeOutput.go | 125 + .../mediaconnect/api_op_RemoveBridgeSource.go | 125 + service/mediaconnect/api_op_UpdateBridge.go | 131 + .../mediaconnect/api_op_UpdateBridgeOutput.go | 133 + .../mediaconnect/api_op_UpdateBridgeSource.go | 136 + .../mediaconnect/api_op_UpdateBridgeState.go | 128 + .../api_op_UpdateFlowEntitlement.go | 2 +- .../mediaconnect/api_op_UpdateFlowOutput.go | 5 +- .../mediaconnect/api_op_UpdateFlowSource.go | 10 +- .../api_op_UpdateGatewayInstance.go | 134 + service/mediaconnect/deserializers.go | 7552 ++++++++++++++--- service/mediaconnect/generated.json | 20 + service/mediaconnect/serializers.go | 2471 +++++- service/mediaconnect/types/enums.go | 148 + service/mediaconnect/types/errors.go | 84 + service/mediaconnect/types/types.go | 681 +- service/mediaconnect/validators.go | 945 +++ service/omics/internal/endpoints/endpoints.go | 86 + 44 files changed, 13421 insertions(+), 1577 deletions(-) create mode 100644 .changelog/004400c2552b4c2c9ed9c93850216dc4.json create mode 100644 .changelog/efc6d55f663347519bbe325f80489154.json create mode 100644 service/mediaconnect/api_op_AddBridgeOutputs.go create mode 100644 service/mediaconnect/api_op_AddBridgeSources.go create mode 100644 service/mediaconnect/api_op_CreateBridge.go create mode 100644 service/mediaconnect/api_op_CreateGateway.go create mode 100644 service/mediaconnect/api_op_DeleteBridge.go create mode 100644 service/mediaconnect/api_op_DeleteGateway.go create mode 100644 service/mediaconnect/api_op_DeregisterGatewayInstance.go create mode 100644 service/mediaconnect/api_op_DescribeBridge.go create mode 100644 service/mediaconnect/api_op_DescribeGateway.go create mode 100644 service/mediaconnect/api_op_DescribeGatewayInstance.go create mode 100644 service/mediaconnect/api_op_ListBridges.go create mode 100644 service/mediaconnect/api_op_ListGatewayInstances.go create mode 100644 service/mediaconnect/api_op_ListGateways.go create mode 100644 service/mediaconnect/api_op_RemoveBridgeOutput.go create mode 100644 service/mediaconnect/api_op_RemoveBridgeSource.go create mode 100644 service/mediaconnect/api_op_UpdateBridge.go create mode 100644 service/mediaconnect/api_op_UpdateBridgeOutput.go create mode 100644 service/mediaconnect/api_op_UpdateBridgeSource.go create mode 100644 service/mediaconnect/api_op_UpdateBridgeState.go create mode 100644 service/mediaconnect/api_op_UpdateGatewayInstance.go diff --git a/.changelog/004400c2552b4c2c9ed9c93850216dc4.json b/.changelog/004400c2552b4c2c9ed9c93850216dc4.json new file mode 100644 index 00000000000..311dc8c3c24 --- /dev/null +++ b/.changelog/004400c2552b4c2c9ed9c93850216dc4.json @@ -0,0 +1,8 @@ +{ + "id": "004400c2-552b-4c2c-9ed9-c93850216dc4", + "type": "feature", + "description": "Gateway is a new feature of AWS Elemental MediaConnect. Gateway allows the deployment of on-premises resources for the purpose of transporting live video to and from the AWS Cloud.", + "modules": [ + "service/mediaconnect" + ] +} \ No newline at end of file diff --git a/.changelog/efc6d55f663347519bbe325f80489154.json b/.changelog/efc6d55f663347519bbe325f80489154.json new file mode 100644 index 00000000000..57db9d27f06 --- /dev/null +++ b/.changelog/efc6d55f663347519bbe325f80489154.json @@ -0,0 +1,8 @@ +{ + "id": "efc6d55f-6633-4751-9bbe-325f80489154", + "type": "feature", + "description": "This release adds tagging support for Voice Connectors and SIP Media Applications", + "modules": [ + "service/chimesdkvoice" + ] +} \ No newline at end of file diff --git a/service/acmpca/internal/endpoints/endpoints.go b/service/acmpca/internal/endpoints/endpoints.go index b9bbc9b6b9a..9bba733fc4f 100644 --- a/service/acmpca/internal/endpoints/endpoints.go +++ b/service/acmpca/internal/endpoints/endpoints.go @@ -165,6 +165,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/arczonalshift/internal/endpoints/endpoints.go b/service/arczonalshift/internal/endpoints/endpoints.go index 9c75f6c57d9..ac98d1793cc 100644 --- a/service/arczonalshift/internal/endpoints/endpoints.go +++ b/service/arczonalshift/internal/endpoints/endpoints.go @@ -138,12 +138,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "af-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-east-1", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-northeast-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-northeast-3", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ap-south-1", }: endpoints.Endpoint{}, diff --git a/service/chimesdkvoice/api_op_CreateSipMediaApplication.go b/service/chimesdkvoice/api_op_CreateSipMediaApplication.go index 50e3bb5a582..dda5fca6e88 100644 --- a/service/chimesdkvoice/api_op_CreateSipMediaApplication.go +++ b/service/chimesdkvoice/api_op_CreateSipMediaApplication.go @@ -46,6 +46,9 @@ type CreateSipMediaApplicationInput struct { // This member is required. Name *string + // The tags assigned to the SIP media application. + Tags []types.Tag + noSmithyDocumentSerde } diff --git a/service/chimesdkvoice/api_op_CreateVoiceConnector.go b/service/chimesdkvoice/api_op_CreateVoiceConnector.go index bd8897b2b84..7e1965031ed 100644 --- a/service/chimesdkvoice/api_op_CreateVoiceConnector.go +++ b/service/chimesdkvoice/api_op_CreateVoiceConnector.go @@ -45,6 +45,9 @@ type CreateVoiceConnectorInput struct { // Default value: us-east-1 . AwsRegion types.VoiceConnectorAwsRegion + // The tags assigned to the Voice Connector. + Tags []types.Tag + noSmithyDocumentSerde } diff --git a/service/chimesdkvoice/deserializers.go b/service/chimesdkvoice/deserializers.go index 046a7041384..2b9399c3c73 100644 --- a/service/chimesdkvoice/deserializers.go +++ b/service/chimesdkvoice/deserializers.go @@ -17457,6 +17457,15 @@ func awsRestjson1_deserializeDocumentSipMediaApplication(v **types.SipMediaAppli sv.Name = ptr.String(jtv) } + case "SipMediaApplicationArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NonEmptyString to be of type string, got %T instead", value) + } + sv.SipMediaApplicationArn = ptr.String(jtv) + } + case "SipMediaApplicationId": if value != nil { jtv, ok := value.(string) diff --git a/service/chimesdkvoice/serializers.go b/service/chimesdkvoice/serializers.go index a3931c789b6..2df6eab273d 100644 --- a/service/chimesdkvoice/serializers.go +++ b/service/chimesdkvoice/serializers.go @@ -599,6 +599,13 @@ func awsRestjson1_serializeOpDocumentCreateSipMediaApplicationInput(v *CreateSip ok.String(*v.Name) } + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -867,6 +874,13 @@ func awsRestjson1_serializeOpDocumentCreateVoiceConnectorInput(v *CreateVoiceCon ok.Boolean(*v.RequireEncryption) } + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + return nil } diff --git a/service/chimesdkvoice/types/types.go b/service/chimesdkvoice/types/types.go index ff131fb9df5..d51fcf41f45 100644 --- a/service/chimesdkvoice/types/types.go +++ b/service/chimesdkvoice/types/types.go @@ -156,7 +156,7 @@ type LoggingConfiguration struct { // Enables or disables media metrics logging. EnableMediaMetricLogs *bool - // Boolean that enables sending SIP message logs to Amazon CloudWatch logs. + // Boolean that enables sending SIP message logs to Amazon CloudWatch. EnableSIPLogs *bool noSmithyDocumentSerde @@ -481,13 +481,16 @@ type SipMediaApplication struct { // 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 + // List of endpoints for a SIP media application. Currently, only one endpoint per // SIP media application is permitted. Endpoints []SipMediaApplicationEndpoint // The SIP media application's name. Name *string + // The ARN of the SIP media application. + SipMediaApplicationArn *string + // A SIP media application's ID. SipMediaApplicationId *string diff --git a/service/chimesdkvoice/validators.go b/service/chimesdkvoice/validators.go index 6a02ee6f733..d1e6a4e43da 100644 --- a/service/chimesdkvoice/validators.go +++ b/service/chimesdkvoice/validators.go @@ -2326,6 +2326,11 @@ func validateOpCreateSipMediaApplicationInput(v *CreateSipMediaApplicationInput) if v.Endpoints == nil { invalidParams.Add(smithy.NewErrParamRequired("Endpoints")) } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -2385,6 +2390,11 @@ func validateOpCreateVoiceConnectorInput(v *CreateVoiceConnectorInput) error { if v.RequireEncryption == nil { invalidParams.Add(smithy.NewErrParamRequired("RequireEncryption")) } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { diff --git a/service/directoryservice/internal/endpoints/endpoints.go b/service/directoryservice/internal/endpoints/endpoints.go index df357f23cf0..70cbea03b4c 100644 --- a/service/directoryservice/internal/endpoints/endpoints.go +++ b/service/directoryservice/internal/endpoints/endpoints.go @@ -165,6 +165,9 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ap-southeast-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, diff --git a/service/efs/internal/endpoints/endpoints.go b/service/efs/internal/endpoints/endpoints.go index 1395d102890..c5c6c12739a 100644 --- a/service/efs/internal/endpoints/endpoints.go +++ b/service/efs/internal/endpoints/endpoints.go @@ -225,6 +225,15 @@ var defaultPartitions = endpoints.Partitions{ }: { Hostname: "elasticfilesystem-fips.ap-southeast-3.amazonaws.com", }, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ap-southeast-4", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "elasticfilesystem-fips.ap-southeast-4.amazonaws.com", + }, endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, @@ -396,6 +405,15 @@ var defaultPartitions = endpoints.Partitions{ }, Deprecated: aws.TrueTernary, }, + endpoints.EndpointKey{ + Region: "fips-ap-southeast-4", + }: endpoints.Endpoint{ + Hostname: "elasticfilesystem-fips.ap-southeast-4.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-4", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "fips-ca-central-1", }: endpoints.Endpoint{ diff --git a/service/lakeformation/internal/endpoints/endpoints.go b/service/lakeformation/internal/endpoints/endpoints.go index ea62692d847..0f1999868df 100644 --- a/service/lakeformation/internal/endpoints/endpoints.go +++ b/service/lakeformation/internal/endpoints/endpoints.go @@ -168,12 +168,18 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-central-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-north-1", }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-south-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "eu-south-2", + }: endpoints.Endpoint{}, endpoints.EndpointKey{ Region: "eu-west-1", }: endpoints.Endpoint{}, diff --git a/service/mediaconnect/api_op_AddBridgeOutputs.go b/service/mediaconnect/api_op_AddBridgeOutputs.go new file mode 100644 index 00000000000..518e84c4e29 --- /dev/null +++ b/service/mediaconnect/api_op_AddBridgeOutputs.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds outputs to an existing bridge. +func (c *Client) AddBridgeOutputs(ctx context.Context, params *AddBridgeOutputsInput, optFns ...func(*Options)) (*AddBridgeOutputsOutput, error) { + if params == nil { + params = &AddBridgeOutputsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddBridgeOutputs", params, optFns, c.addOperationAddBridgeOutputsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddBridgeOutputsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to add outputs to the specified bridge. +type AddBridgeOutputsInput struct { + + // The ARN of the bridge that you want to update. + // + // This member is required. + BridgeArn *string + + // The outputs that you want to add to this bridge. + // + // This member is required. + Outputs []types.AddBridgeOutputRequest + + noSmithyDocumentSerde +} + +type AddBridgeOutputsOutput struct { + + // The Amazon Resource Number (ARN) of the bridge. + BridgeArn *string + + // The outputs that you added to this bridge. + Outputs []types.BridgeOutput + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddBridgeOutputsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAddBridgeOutputs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddBridgeOutputs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAddBridgeOutputsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddBridgeOutputs(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opAddBridgeOutputs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "AddBridgeOutputs", + } +} diff --git a/service/mediaconnect/api_op_AddBridgeSources.go b/service/mediaconnect/api_op_AddBridgeSources.go new file mode 100644 index 00000000000..8be470a094c --- /dev/null +++ b/service/mediaconnect/api_op_AddBridgeSources.go @@ -0,0 +1,130 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds sources to an existing bridge. +func (c *Client) AddBridgeSources(ctx context.Context, params *AddBridgeSourcesInput, optFns ...func(*Options)) (*AddBridgeSourcesOutput, error) { + if params == nil { + params = &AddBridgeSourcesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AddBridgeSources", params, optFns, c.addOperationAddBridgeSourcesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AddBridgeSourcesOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to add sources to the specified bridge. +type AddBridgeSourcesInput struct { + + // The ARN of the bridge that you want to update. + // + // This member is required. + BridgeArn *string + + // The sources that you want to add to this bridge. + // + // This member is required. + Sources []types.AddBridgeSourceRequest + + noSmithyDocumentSerde +} + +type AddBridgeSourcesOutput struct { + + // The Amazon Resource Number (ARN) of the bridge. + BridgeArn *string + + // The sources that you added to this bridge. + Sources []types.BridgeSource + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAddBridgeSourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpAddBridgeSources{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAddBridgeSources{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpAddBridgeSourcesValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAddBridgeSources(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opAddBridgeSources(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "AddBridgeSources", + } +} diff --git a/service/mediaconnect/api_op_CreateBridge.go b/service/mediaconnect/api_op_CreateBridge.go new file mode 100644 index 00000000000..77af8406539 --- /dev/null +++ b/service/mediaconnect/api_op_CreateBridge.go @@ -0,0 +1,151 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new bridge. The request must include one source. +func (c *Client) CreateBridge(ctx context.Context, params *CreateBridgeInput, optFns ...func(*Options)) (*CreateBridgeOutput, error) { + if params == nil { + params = &CreateBridgeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateBridge", params, optFns, c.addOperationCreateBridgeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateBridgeOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Creates a new bridge. The request must include one source. +type CreateBridgeInput struct { + + // The name of the bridge. This name can not be modified after the bridge is + // created. + // + // This member is required. + Name *string + + // The bridge placement Amazon Resource Number (ARN). + // + // This member is required. + PlacementArn *string + + // The sources that you want to add to this bridge. + // + // This member is required. + Sources []types.AddBridgeSourceRequest + + // Create a bridge with the egress bridge type. An egress bridge is a + // cloud-to-ground bridge. The content comes from an existing MediaConnect flow and + // is delivered to your premises. + EgressGatewayBridge *types.AddEgressGatewayBridgeRequest + + // Create a bridge with the ingress bridge type. An ingress bridge is a + // ground-to-cloud bridge. The content originates at your premises and is delivered + // to the cloud. + IngressGatewayBridge *types.AddIngressGatewayBridgeRequest + + // The outputs that you want to add to this bridge. + Outputs []types.AddBridgeOutputRequest + + // The settings for source failover. + SourceFailoverConfig *types.FailoverConfig + + noSmithyDocumentSerde +} + +type CreateBridgeOutput struct { + + // A Bridge is the connection between your datacenter's Instances and the AWS + // cloud. A bridge can be used to send video from the AWS cloud to your datacenter + // or from your datacenter to the AWS cloud. + Bridge *types.Bridge + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateBridgeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateBridge{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateBridge{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateBridgeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateBridge(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateBridge(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "CreateBridge", + } +} diff --git a/service/mediaconnect/api_op_CreateGateway.go b/service/mediaconnect/api_op_CreateGateway.go new file mode 100644 index 00000000000..6b360ecbe26 --- /dev/null +++ b/service/mediaconnect/api_op_CreateGateway.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates a new gateway. The request must include at least one network (up to 4). +func (c *Client) CreateGateway(ctx context.Context, params *CreateGatewayInput, optFns ...func(*Options)) (*CreateGatewayOutput, error) { + if params == nil { + params = &CreateGatewayInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateGateway", params, optFns, c.addOperationCreateGatewayMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateGatewayOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Creates a new gateway. The request must include at least one network (up to 4). +type CreateGatewayInput struct { + + // The range of IP addresses that are allowed to contribute content or initiate + // output requests for flows communicating with this gateway. These IP addresses + // should be in the form of a Classless Inter-Domain Routing (CIDR) block; for + // example, 10.0.0.0/16. + // + // This member is required. + EgressCidrBlocks []string + + // The name of the gateway. This name can not be modified after the gateway is + // created. + // + // This member is required. + Name *string + + // The list of networks that you want to add. + // + // This member is required. + Networks []types.GatewayNetwork + + noSmithyDocumentSerde +} + +type CreateGatewayOutput struct { + + // The settings for a gateway, including its networks. + Gateway *types.Gateway + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateGateway{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateGateway{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpCreateGatewayValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateGateway(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateGateway(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "CreateGateway", + } +} diff --git a/service/mediaconnect/api_op_DeleteBridge.go b/service/mediaconnect/api_op_DeleteBridge.go new file mode 100644 index 00000000000..dbc7a47ccf8 --- /dev/null +++ b/service/mediaconnect/api_op_DeleteBridge.go @@ -0,0 +1,120 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a bridge. Before you can delete a bridge, you must stop the bridge. +func (c *Client) DeleteBridge(ctx context.Context, params *DeleteBridgeInput, optFns ...func(*Options)) (*DeleteBridgeOutput, error) { + if params == nil { + params = &DeleteBridgeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteBridge", params, optFns, c.addOperationDeleteBridgeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteBridgeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteBridgeInput struct { + + // The ARN of the bridge that you want to delete. + // + // This member is required. + BridgeArn *string + + noSmithyDocumentSerde +} + +type DeleteBridgeOutput struct { + + // The Amazon Resource Number (ARN) of the deleted bridge. + BridgeArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteBridgeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteBridge{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteBridge{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteBridgeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteBridge(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteBridge(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "DeleteBridge", + } +} diff --git a/service/mediaconnect/api_op_DeleteGateway.go b/service/mediaconnect/api_op_DeleteGateway.go new file mode 100644 index 00000000000..672cb763c8c --- /dev/null +++ b/service/mediaconnect/api_op_DeleteGateway.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a gateway. Before you can delete a gateway, you must deregister its +// instances and delete its bridges. +func (c *Client) DeleteGateway(ctx context.Context, params *DeleteGatewayInput, optFns ...func(*Options)) (*DeleteGatewayOutput, error) { + if params == nil { + params = &DeleteGatewayInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteGateway", params, optFns, c.addOperationDeleteGatewayMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteGatewayOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteGatewayInput struct { + + // The ARN of the gateway that you want to delete. + // + // This member is required. + GatewayArn *string + + noSmithyDocumentSerde +} + +type DeleteGatewayOutput struct { + + // The Amazon Resource Name (ARN) of the gateway that was deleted. + GatewayArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteGateway{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteGateway{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeleteGatewayValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteGateway(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteGateway(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "DeleteGateway", + } +} diff --git a/service/mediaconnect/api_op_DeregisterGatewayInstance.go b/service/mediaconnect/api_op_DeregisterGatewayInstance.go new file mode 100644 index 00000000000..bbebc591be2 --- /dev/null +++ b/service/mediaconnect/api_op_DeregisterGatewayInstance.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deregisters an instance. Before you deregister an instance, all bridges running +// on the instance must be stopped. If you want to deregister an instance without +// stopping the bridges, you must use the --force option. +func (c *Client) DeregisterGatewayInstance(ctx context.Context, params *DeregisterGatewayInstanceInput, optFns ...func(*Options)) (*DeregisterGatewayInstanceOutput, error) { + if params == nil { + params = &DeregisterGatewayInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeregisterGatewayInstance", params, optFns, c.addOperationDeregisterGatewayInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeregisterGatewayInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeregisterGatewayInstanceInput struct { + + // The Amazon Resource Name (ARN) of the gateway that contains the instance that + // you want to deregister. + // + // This member is required. + GatewayInstanceArn *string + + // Force the deregistration of an instance. Force will deregister an instance, + // even if there are bridges running on it. + Force bool + + noSmithyDocumentSerde +} + +type DeregisterGatewayInstanceOutput struct { + + // The Amazon Resource Name (ARN) of the instance. + GatewayInstanceArn *string + + // The status of the instance. + InstanceState types.InstanceState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeregisterGatewayInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeregisterGatewayInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeregisterGatewayInstance{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDeregisterGatewayInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeregisterGatewayInstance(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeregisterGatewayInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "DeregisterGatewayInstance", + } +} diff --git a/service/mediaconnect/api_op_DescribeBridge.go b/service/mediaconnect/api_op_DescribeBridge.go new file mode 100644 index 00000000000..51a9ccd7f1d --- /dev/null +++ b/service/mediaconnect/api_op_DescribeBridge.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays the details of a bridge. +func (c *Client) DescribeBridge(ctx context.Context, params *DescribeBridgeInput, optFns ...func(*Options)) (*DescribeBridgeOutput, error) { + if params == nil { + params = &DescribeBridgeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeBridge", params, optFns, c.addOperationDescribeBridgeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeBridgeOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeBridgeInput struct { + + // The ARN of the bridge that you want to describe. + // + // This member is required. + BridgeArn *string + + noSmithyDocumentSerde +} + +type DescribeBridgeOutput struct { + + // A Bridge is the connection between your datacenter's Instances and the AWS + // cloud. A bridge can be used to send video from the AWS cloud to your datacenter + // or from your datacenter to the AWS cloud. + Bridge *types.Bridge + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeBridgeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeBridge{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeBridge{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeBridgeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeBridge(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeBridge(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "DescribeBridge", + } +} diff --git a/service/mediaconnect/api_op_DescribeGateway.go b/service/mediaconnect/api_op_DescribeGateway.go new file mode 100644 index 00000000000..741a2327a0f --- /dev/null +++ b/service/mediaconnect/api_op_DescribeGateway.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays the details of a gateway. The response includes the gateway ARN, name, +// and CIDR blocks, as well as details about the networks. +func (c *Client) DescribeGateway(ctx context.Context, params *DescribeGatewayInput, optFns ...func(*Options)) (*DescribeGatewayOutput, error) { + if params == nil { + params = &DescribeGatewayInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeGateway", params, optFns, c.addOperationDescribeGatewayMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeGatewayOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeGatewayInput struct { + + // The Amazon Resource Name (ARN) of the gateway that you want to describe. + // + // This member is required. + GatewayArn *string + + noSmithyDocumentSerde +} + +type DescribeGatewayOutput struct { + + // The settings for a gateway, including its networks. + Gateway *types.Gateway + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeGatewayMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeGateway{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeGateway{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeGatewayValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGateway(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeGateway(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "DescribeGateway", + } +} diff --git a/service/mediaconnect/api_op_DescribeGatewayInstance.go b/service/mediaconnect/api_op_DescribeGatewayInstance.go new file mode 100644 index 00000000000..073e919581b --- /dev/null +++ b/service/mediaconnect/api_op_DescribeGatewayInstance.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays the details of an instance. +func (c *Client) DescribeGatewayInstance(ctx context.Context, params *DescribeGatewayInstanceInput, optFns ...func(*Options)) (*DescribeGatewayInstanceOutput, error) { + if params == nil { + params = &DescribeGatewayInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeGatewayInstance", params, optFns, c.addOperationDescribeGatewayInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeGatewayInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeGatewayInstanceInput struct { + + // The Amazon Resource Name (ARN) of the gateway instance that you want to + // describe. + // + // This member is required. + GatewayInstanceArn *string + + noSmithyDocumentSerde +} + +type DescribeGatewayInstanceOutput struct { + + // The settings for an instance in a gateway. + GatewayInstance *types.GatewayInstance + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeGatewayInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeGatewayInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeGatewayInstance{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpDescribeGatewayInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeGatewayInstance(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeGatewayInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "DescribeGatewayInstance", + } +} diff --git a/service/mediaconnect/api_op_ListBridges.go b/service/mediaconnect/api_op_ListBridges.go new file mode 100644 index 00000000000..5c1fb687ee4 --- /dev/null +++ b/service/mediaconnect/api_op_ListBridges.go @@ -0,0 +1,233 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays a list of bridges that are associated with this account and an +// optionally specified Arn. This request returns a paginated result. +func (c *Client) ListBridges(ctx context.Context, params *ListBridgesInput, optFns ...func(*Options)) (*ListBridgesOutput, error) { + if params == nil { + params = &ListBridgesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListBridges", params, optFns, c.addOperationListBridgesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListBridgesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListBridgesInput struct { + + // Filter the list results to display only the bridges associated with the + // selected Amazon Resource Name (ARN). + FilterArn *string + + // The maximum number of results to return per API request. For example, you + // submit a ListBridges request with MaxResults set at 5. Although 20 items match + // your request, the service returns no more than the first 5 items. (The service + // also returns a NextToken value that you can use to fetch the next batch of + // results.) The service might return fewer results than the MaxResults value. If + // MaxResults is not included in the request, the service defaults to pagination + // with a maximum of 10 results per page. + MaxResults int32 + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListBridges request with MaxResults set at 5. The service + // returns the first batch of results (up to 5) and a NextToken value. To see the + // next batch of results, you can submit the ListBridges request a second time and + // specify the NextToken value. + NextToken *string + + noSmithyDocumentSerde +} + +type ListBridgesOutput struct { + + // A list of bridge summaries. + Bridges []types.ListedBridge + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListBridges request with MaxResults set at 5. The service + // returns the first batch of results (up to 5) and a NextToken value. To see the + // next batch of results, you can submit the ListBridges request a second time and + // specify the NextToken value. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListBridgesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListBridges{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListBridges{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListBridges(options.Region), middleware.Before); 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 + } + return nil +} + +// ListBridgesAPIClient is a client that implements the ListBridges operation. +type ListBridgesAPIClient interface { + ListBridges(context.Context, *ListBridgesInput, ...func(*Options)) (*ListBridgesOutput, error) +} + +var _ ListBridgesAPIClient = (*Client)(nil) + +// ListBridgesPaginatorOptions is the paginator options for ListBridges +type ListBridgesPaginatorOptions struct { + // The maximum number of results to return per API request. For example, you + // submit a ListBridges request with MaxResults set at 5. Although 20 items match + // your request, the service returns no more than the first 5 items. (The service + // also returns a NextToken value that you can use to fetch the next batch of + // results.) The service might return fewer results than the MaxResults value. If + // MaxResults is not included in the request, the service defaults to pagination + // with a maximum of 10 results per page. + 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 +} + +// ListBridgesPaginator is a paginator for ListBridges +type ListBridgesPaginator struct { + options ListBridgesPaginatorOptions + client ListBridgesAPIClient + params *ListBridgesInput + nextToken *string + firstPage bool +} + +// NewListBridgesPaginator returns a new ListBridgesPaginator +func NewListBridgesPaginator(client ListBridgesAPIClient, params *ListBridgesInput, optFns ...func(*ListBridgesPaginatorOptions)) *ListBridgesPaginator { + if params == nil { + params = &ListBridgesInput{} + } + + options := ListBridgesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListBridgesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListBridgesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListBridges page. +func (p *ListBridgesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListBridgesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListBridges(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 +} + +func newServiceMetadataMiddleware_opListBridges(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "ListBridges", + } +} diff --git a/service/mediaconnect/api_op_ListGatewayInstances.go b/service/mediaconnect/api_op_ListGatewayInstances.go new file mode 100644 index 00000000000..1e8f558ea60 --- /dev/null +++ b/service/mediaconnect/api_op_ListGatewayInstances.go @@ -0,0 +1,236 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays a list of instances associated with the AWS account. This request +// returns a paginated result. You can use the filterArn property to display only +// the instances associated with the selected Gateway Amazon Resource Name (ARN). +func (c *Client) ListGatewayInstances(ctx context.Context, params *ListGatewayInstancesInput, optFns ...func(*Options)) (*ListGatewayInstancesOutput, error) { + if params == nil { + params = &ListGatewayInstancesInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListGatewayInstances", params, optFns, c.addOperationListGatewayInstancesMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListGatewayInstancesOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListGatewayInstancesInput struct { + + // Filter the list results to display only the instances associated with the + // selected Gateway Amazon Resource Name (ARN). + FilterArn *string + + // The maximum number of results to return per API request. For example, you + // submit a ListInstances request with MaxResults set at 5. Although 20 items match + // your request, the service returns no more than the first 5 items. (The service + // also returns a NextToken value that you can use to fetch the next batch of + // results.) The service might return fewer results than the MaxResults value. If + // MaxResults is not included in the request, the service defaults to pagination + // with a maximum of 10 results per page. + MaxResults int32 + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListInstances request with MaxResults set at 5. The + // service returns the first batch of results (up to 5) and a NextToken value. To + // see the next batch of results, you can submit the ListInstances request a second + // time and specify the NextToken value. + NextToken *string + + noSmithyDocumentSerde +} + +type ListGatewayInstancesOutput struct { + + // A list of instance summaries. + Instances []types.ListedGatewayInstance + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListInstances request with MaxResults set at 5. The + // service returns the first batch of results (up to 5) and a NextToken value. To + // see the next batch of results, you can submit the ListInstances request a second + // time and specify the NextToken value. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListGatewayInstancesMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListGatewayInstances{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListGatewayInstances{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGatewayInstances(options.Region), middleware.Before); 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 + } + return nil +} + +// ListGatewayInstancesAPIClient is a client that implements the +// ListGatewayInstances operation. +type ListGatewayInstancesAPIClient interface { + ListGatewayInstances(context.Context, *ListGatewayInstancesInput, ...func(*Options)) (*ListGatewayInstancesOutput, error) +} + +var _ ListGatewayInstancesAPIClient = (*Client)(nil) + +// ListGatewayInstancesPaginatorOptions is the paginator options for +// ListGatewayInstances +type ListGatewayInstancesPaginatorOptions struct { + // The maximum number of results to return per API request. For example, you + // submit a ListInstances request with MaxResults set at 5. Although 20 items match + // your request, the service returns no more than the first 5 items. (The service + // also returns a NextToken value that you can use to fetch the next batch of + // results.) The service might return fewer results than the MaxResults value. If + // MaxResults is not included in the request, the service defaults to pagination + // with a maximum of 10 results per page. + 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 +} + +// ListGatewayInstancesPaginator is a paginator for ListGatewayInstances +type ListGatewayInstancesPaginator struct { + options ListGatewayInstancesPaginatorOptions + client ListGatewayInstancesAPIClient + params *ListGatewayInstancesInput + nextToken *string + firstPage bool +} + +// NewListGatewayInstancesPaginator returns a new ListGatewayInstancesPaginator +func NewListGatewayInstancesPaginator(client ListGatewayInstancesAPIClient, params *ListGatewayInstancesInput, optFns ...func(*ListGatewayInstancesPaginatorOptions)) *ListGatewayInstancesPaginator { + if params == nil { + params = &ListGatewayInstancesInput{} + } + + options := ListGatewayInstancesPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListGatewayInstancesPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListGatewayInstancesPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListGatewayInstances page. +func (p *ListGatewayInstancesPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGatewayInstancesOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListGatewayInstances(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 +} + +func newServiceMetadataMiddleware_opListGatewayInstances(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "ListGatewayInstances", + } +} diff --git a/service/mediaconnect/api_op_ListGateways.go b/service/mediaconnect/api_op_ListGateways.go new file mode 100644 index 00000000000..0bbf6415032 --- /dev/null +++ b/service/mediaconnect/api_op_ListGateways.go @@ -0,0 +1,229 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Displays a list of gateways that are associated with this account. This request +// returns a paginated result. +func (c *Client) ListGateways(ctx context.Context, params *ListGatewaysInput, optFns ...func(*Options)) (*ListGatewaysOutput, error) { + if params == nil { + params = &ListGatewaysInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListGateways", params, optFns, c.addOperationListGatewaysMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListGatewaysOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListGatewaysInput struct { + + // The maximum number of results to return per API request. For example, you + // submit a ListGateways request with MaxResults set at 5. Although 20 items match + // your request, the service returns no more than the first 5 items. (The service + // also returns a NextToken value that you can use to fetch the next batch of + // results.) The service might return fewer results than the MaxResults value. If + // MaxResults is not included in the request, the service defaults to pagination + // with a maximum of 10 results per page. + MaxResults int32 + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListGateways request with MaxResults set at 5. The service + // returns the first batch of results (up to 5) and a NextToken value. To see the + // next batch of results, you can submit the ListGateways request a second time and + // specify the NextToken value. + NextToken *string + + noSmithyDocumentSerde +} + +type ListGatewaysOutput struct { + + // A list of gateway summaries. + Gateways []types.ListedGateway + + // The token that identifies which batch of results that you want to see. For + // example, you submit a ListGateways request with MaxResults set at 5. The service + // returns the first batch of results (up to 5) and a NextToken value. To see the + // next batch of results, you can submit the ListGateways request a second time and + // specify the NextToken value. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListGatewaysMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListGateways{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListGateways{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListGateways(options.Region), middleware.Before); 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 + } + return nil +} + +// ListGatewaysAPIClient is a client that implements the ListGateways operation. +type ListGatewaysAPIClient interface { + ListGateways(context.Context, *ListGatewaysInput, ...func(*Options)) (*ListGatewaysOutput, error) +} + +var _ ListGatewaysAPIClient = (*Client)(nil) + +// ListGatewaysPaginatorOptions is the paginator options for ListGateways +type ListGatewaysPaginatorOptions struct { + // The maximum number of results to return per API request. For example, you + // submit a ListGateways request with MaxResults set at 5. Although 20 items match + // your request, the service returns no more than the first 5 items. (The service + // also returns a NextToken value that you can use to fetch the next batch of + // results.) The service might return fewer results than the MaxResults value. If + // MaxResults is not included in the request, the service defaults to pagination + // with a maximum of 10 results per page. + 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 +} + +// ListGatewaysPaginator is a paginator for ListGateways +type ListGatewaysPaginator struct { + options ListGatewaysPaginatorOptions + client ListGatewaysAPIClient + params *ListGatewaysInput + nextToken *string + firstPage bool +} + +// NewListGatewaysPaginator returns a new ListGatewaysPaginator +func NewListGatewaysPaginator(client ListGatewaysAPIClient, params *ListGatewaysInput, optFns ...func(*ListGatewaysPaginatorOptions)) *ListGatewaysPaginator { + if params == nil { + params = &ListGatewaysInput{} + } + + options := ListGatewaysPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListGatewaysPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListGatewaysPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListGateways page. +func (p *ListGatewaysPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListGatewaysOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + params.MaxResults = p.options.Limit + + result, err := p.client.ListGateways(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 +} + +func newServiceMetadataMiddleware_opListGateways(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "ListGateways", + } +} diff --git a/service/mediaconnect/api_op_RemoveBridgeOutput.go b/service/mediaconnect/api_op_RemoveBridgeOutput.go new file mode 100644 index 00000000000..bddb366acf5 --- /dev/null +++ b/service/mediaconnect/api_op_RemoveBridgeOutput.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes an output from a bridge. +func (c *Client) RemoveBridgeOutput(ctx context.Context, params *RemoveBridgeOutputInput, optFns ...func(*Options)) (*RemoveBridgeOutputOutput, error) { + if params == nil { + params = &RemoveBridgeOutputInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveBridgeOutput", params, optFns, c.addOperationRemoveBridgeOutputMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveBridgeOutputOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveBridgeOutputInput struct { + + // The ARN of the bridge that you want to update. + // + // This member is required. + BridgeArn *string + + // The name of the bridge output that you want to remove. + // + // This member is required. + OutputName *string + + noSmithyDocumentSerde +} + +type RemoveBridgeOutputOutput struct { + BridgeArn *string + + OutputName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveBridgeOutputMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRemoveBridgeOutput{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemoveBridgeOutput{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRemoveBridgeOutputValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveBridgeOutput(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opRemoveBridgeOutput(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "RemoveBridgeOutput", + } +} diff --git a/service/mediaconnect/api_op_RemoveBridgeSource.go b/service/mediaconnect/api_op_RemoveBridgeSource.go new file mode 100644 index 00000000000..ee9f79a3240 --- /dev/null +++ b/service/mediaconnect/api_op_RemoveBridgeSource.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes a source from a bridge. +func (c *Client) RemoveBridgeSource(ctx context.Context, params *RemoveBridgeSourceInput, optFns ...func(*Options)) (*RemoveBridgeSourceOutput, error) { + if params == nil { + params = &RemoveBridgeSourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RemoveBridgeSource", params, optFns, c.addOperationRemoveBridgeSourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RemoveBridgeSourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RemoveBridgeSourceInput struct { + + // The ARN of the bridge that you want to update. + // + // This member is required. + BridgeArn *string + + // The name of the bridge source that you want to remove. + // + // This member is required. + SourceName *string + + noSmithyDocumentSerde +} + +type RemoveBridgeSourceOutput struct { + BridgeArn *string + + SourceName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRemoveBridgeSourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpRemoveBridgeSource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRemoveBridgeSource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpRemoveBridgeSourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRemoveBridgeSource(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opRemoveBridgeSource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "RemoveBridgeSource", + } +} diff --git a/service/mediaconnect/api_op_UpdateBridge.go b/service/mediaconnect/api_op_UpdateBridge.go new file mode 100644 index 00000000000..23dc60defb9 --- /dev/null +++ b/service/mediaconnect/api_op_UpdateBridge.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the bridge +func (c *Client) UpdateBridge(ctx context.Context, params *UpdateBridgeInput, optFns ...func(*Options)) (*UpdateBridgeOutput, error) { + if params == nil { + params = &UpdateBridgeInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBridge", params, optFns, c.addOperationUpdateBridgeMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBridgeOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to update the bridge. +type UpdateBridgeInput struct { + + // The Amazon Resource Number (ARN) of the bridge that you want to update. + // + // This member is required. + BridgeArn *string + + EgressGatewayBridge *types.UpdateEgressGatewayBridgeRequest + + IngressGatewayBridge *types.UpdateIngressGatewayBridgeRequest + + // The settings for source failover. + SourceFailoverConfig *types.UpdateFailoverConfig + + noSmithyDocumentSerde +} + +type UpdateBridgeOutput struct { + + // A Bridge is the connection between your datacenter's Instances and the AWS + // cloud. A bridge can be used to send video from the AWS cloud to your datacenter + // or from your datacenter to the AWS cloud. + Bridge *types.Bridge + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBridgeMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBridge{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBridge{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateBridgeValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBridge(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateBridge(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "UpdateBridge", + } +} diff --git a/service/mediaconnect/api_op_UpdateBridgeOutput.go b/service/mediaconnect/api_op_UpdateBridgeOutput.go new file mode 100644 index 00000000000..59823ae4db9 --- /dev/null +++ b/service/mediaconnect/api_op_UpdateBridgeOutput.go @@ -0,0 +1,133 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing bridge output. +func (c *Client) UpdateBridgeOutput(ctx context.Context, params *UpdateBridgeOutputInput, optFns ...func(*Options)) (*UpdateBridgeOutputOutput, error) { + if params == nil { + params = &UpdateBridgeOutputInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBridgeOutput", params, optFns, c.addOperationUpdateBridgeOutputMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBridgeOutputOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The fields that you want to update in the bridge output. +type UpdateBridgeOutputInput struct { + + // The ARN of the bridge that you want to update. + // + // This member is required. + BridgeArn *string + + // The name of the bridge output that you want to update. + // + // This member is required. + OutputName *string + + // Update an existing network output. + NetworkOutput *types.UpdateBridgeNetworkOutputRequest + + noSmithyDocumentSerde +} + +type UpdateBridgeOutputOutput struct { + + // The Amazon Resource Number (ARN) of the bridge. + BridgeArn *string + + // The output that you updated. + Output *types.BridgeOutput + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBridgeOutputMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBridgeOutput{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBridgeOutput{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateBridgeOutputValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBridgeOutput(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateBridgeOutput(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "UpdateBridgeOutput", + } +} diff --git a/service/mediaconnect/api_op_UpdateBridgeSource.go b/service/mediaconnect/api_op_UpdateBridgeSource.go new file mode 100644 index 00000000000..28df92a5491 --- /dev/null +++ b/service/mediaconnect/api_op_UpdateBridgeSource.go @@ -0,0 +1,136 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates an existing bridge source. +func (c *Client) UpdateBridgeSource(ctx context.Context, params *UpdateBridgeSourceInput, optFns ...func(*Options)) (*UpdateBridgeSourceOutput, error) { + if params == nil { + params = &UpdateBridgeSourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBridgeSource", params, optFns, c.addOperationUpdateBridgeSourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBridgeSourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +// The fields that you want to update in the bridge source. +type UpdateBridgeSourceInput struct { + + // The ARN of the bridge that you want to update. + // + // This member is required. + BridgeArn *string + + // The name of the source that you want to update. + // + // This member is required. + SourceName *string + + // Update the flow source of the bridge. + FlowSource *types.UpdateBridgeFlowSourceRequest + + // Update the network source of the bridge. + NetworkSource *types.UpdateBridgeNetworkSourceRequest + + noSmithyDocumentSerde +} + +type UpdateBridgeSourceOutput struct { + + // The Amazon Resource Number (ARN) of the bridge. + BridgeArn *string + + // The bridge's source. + Source *types.BridgeSource + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBridgeSourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBridgeSource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBridgeSource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateBridgeSourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBridgeSource(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateBridgeSource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "UpdateBridgeSource", + } +} diff --git a/service/mediaconnect/api_op_UpdateBridgeState.go b/service/mediaconnect/api_op_UpdateBridgeState.go new file mode 100644 index 00000000000..ead5464f25f --- /dev/null +++ b/service/mediaconnect/api_op_UpdateBridgeState.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the bridge state +func (c *Client) UpdateBridgeState(ctx context.Context, params *UpdateBridgeStateInput, optFns ...func(*Options)) (*UpdateBridgeStateOutput, error) { + if params == nil { + params = &UpdateBridgeStateInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateBridgeState", params, optFns, c.addOperationUpdateBridgeStateMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateBridgeStateOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to update the bridge state. +type UpdateBridgeStateInput struct { + + // The ARN of the bridge that you want to update. + // + // This member is required. + BridgeArn *string + + // This member is required. + DesiredState types.DesiredState + + noSmithyDocumentSerde +} + +type UpdateBridgeStateOutput struct { + + // The Amazon Resource Number (ARN) of the bridge. + BridgeArn *string + + // The state of the bridge. ACTIVE or STANDBY. + DesiredState types.DesiredState + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateBridgeStateMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateBridgeState{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateBridgeState{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateBridgeStateValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateBridgeState(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateBridgeState(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "UpdateBridgeState", + } +} diff --git a/service/mediaconnect/api_op_UpdateFlowEntitlement.go b/service/mediaconnect/api_op_UpdateFlowEntitlement.go index 507a1f21679..94d7854f22f 100644 --- a/service/mediaconnect/api_op_UpdateFlowEntitlement.go +++ b/service/mediaconnect/api_op_UpdateFlowEntitlement.go @@ -48,7 +48,7 @@ type UpdateFlowEntitlementInput struct { Description *string // The type of encryption that will be used on the output associated with this - // entitlement. + // entitlement. Allowable encryption types: static-key, speke. Encryption *types.UpdateEncryption // An indication of whether you want to enable the entitlement to allow access, or diff --git a/service/mediaconnect/api_op_UpdateFlowOutput.go b/service/mediaconnect/api_op_UpdateFlowOutput.go index 236f34cebd7..7c560ef1329 100644 --- a/service/mediaconnect/api_op_UpdateFlowOutput.go +++ b/service/mediaconnect/api_op_UpdateFlowOutput.go @@ -53,7 +53,8 @@ type UpdateFlowOutputInput struct { Destination *string // The type of key used for the encryption. If no keyType is provided, the service - // will use the default setting (static-key). + // will use the default setting (static-key). Allowable encryption types: + // static-key. Encryption *types.UpdateEncryption // The maximum latency in milliseconds. This parameter applies only to RIST-based, @@ -92,7 +93,7 @@ type UpdateFlowOutputInput struct { SmoothingLatency int32 // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. + // only to Zixi and SRT caller-based streams. StreamId *string // The name of the VPC interface attachment to use for this output. diff --git a/service/mediaconnect/api_op_UpdateFlowSource.go b/service/mediaconnect/api_op_UpdateFlowSource.go index efee6443c81..6e2112eba66 100644 --- a/service/mediaconnect/api_op_UpdateFlowSource.go +++ b/service/mediaconnect/api_op_UpdateFlowSource.go @@ -40,7 +40,8 @@ type UpdateFlowSourceInput struct { // This member is required. SourceArn *string - // The type of encryption used on the content ingested from this source. + // The type of encryption used on the content ingested from this source. Allowable + // encryption types: static-key. Decryption *types.UpdateEncryption // A description for the source. This value is not used or seen outside of the @@ -52,10 +53,13 @@ type UpdateFlowSourceInput struct { // the originator's flow. EntitlementArn *string + // The source configuration for cloud flows receiving a stream from a bridge. + GatewayBridgeSource *types.UpdateGatewayBridgeSourceRequest + // The port that the flow will be listening on for incoming content. IngestPort int32 - // The smoothing max bitrate for RIST, RTP, and RTP-FEC streams. + // The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams. MaxBitrate int32 // The maximum latency in milliseconds. This parameter applies only to RIST-based, @@ -94,7 +98,7 @@ type UpdateFlowSourceInput struct { SourceListenerPort int32 // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. + // only to Zixi and SRT caller-based streams. StreamId *string // The name of the VPC interface to use for this source. diff --git a/service/mediaconnect/api_op_UpdateGatewayInstance.go b/service/mediaconnect/api_op_UpdateGatewayInstance.go new file mode 100644 index 00000000000..06ad2f105dc --- /dev/null +++ b/service/mediaconnect/api_op_UpdateGatewayInstance.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mediaconnect + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/mediaconnect/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Updates the configuration of an existing Gateway Instance. +func (c *Client) UpdateGatewayInstance(ctx context.Context, params *UpdateGatewayInstanceInput, optFns ...func(*Options)) (*UpdateGatewayInstanceOutput, error) { + if params == nil { + params = &UpdateGatewayInstanceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateGatewayInstance", params, optFns, c.addOperationUpdateGatewayInstanceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateGatewayInstanceOutput) + out.ResultMetadata = metadata + return out, nil +} + +// A request to update gateway instance state. +type UpdateGatewayInstanceInput struct { + + // The Amazon Resource Name (ARN) of the instance that you want to update. + // + // This member is required. + GatewayInstanceArn *string + + // The availability of the instance to host new bridges. The bridgePlacement + // property can be LOCKED or AVAILABLE. If it is LOCKED, no new bridges can be + // deployed to this instance. If it is AVAILABLE, new bridges can be added to this + // instance. + BridgePlacement types.BridgePlacement + + noSmithyDocumentSerde +} + +type UpdateGatewayInstanceOutput struct { + + // The availability of the instance to host new bridges. The bridgePlacement + // property can be LOCKED or AVAILABLE. If it is LOCKED, no new bridges can be + // deployed to this instance. If it is AVAILABLE, new bridges can be added to this + // instance. + BridgePlacement types.BridgePlacement + + // The Amazon Resource Name (ARN) of the instance. + GatewayInstanceArn *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateGatewayInstanceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateGatewayInstance{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateGatewayInstance{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addOpUpdateGatewayInstanceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateGatewayInstance(options.Region), middleware.Before); 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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateGatewayInstance(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mediaconnect", + OperationName: "UpdateGatewayInstance", + } +} diff --git a/service/mediaconnect/deserializers.go b/service/mediaconnect/deserializers.go index 083cf4c2aa1..9b553199688 100644 --- a/service/mediaconnect/deserializers.go +++ b/service/mediaconnect/deserializers.go @@ -20,14 +20,14 @@ import ( "strings" ) -type awsRestjson1_deserializeOpAddFlowMediaStreams struct { +type awsRestjson1_deserializeOpAddBridgeOutputs struct { } -func (*awsRestjson1_deserializeOpAddFlowMediaStreams) ID() string { +func (*awsRestjson1_deserializeOpAddBridgeOutputs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAddFlowMediaStreams) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddBridgeOutputs) 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) @@ -41,9 +41,9 @@ func (m *awsRestjson1_deserializeOpAddFlowMediaStreams) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAddFlowMediaStreams(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddBridgeOutputs(response, &metadata) } - output := &AddFlowMediaStreamsOutput{} + output := &AddBridgeOutputsOutput{} out.Result = output var buff [1024]byte @@ -64,7 +64,7 @@ func (m *awsRestjson1_deserializeOpAddFlowMediaStreams) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAddFlowMediaStreamsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAddBridgeOutputsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -77,7 +77,7 @@ func (m *awsRestjson1_deserializeOpAddFlowMediaStreams) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorAddFlowMediaStreams(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddBridgeOutputs(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)} @@ -121,6 +121,9 @@ func awsRestjson1_deserializeOpErrorAddFlowMediaStreams(response *smithyhttp.Res 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) @@ -146,7 +149,7 @@ func awsRestjson1_deserializeOpErrorAddFlowMediaStreams(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentAddFlowMediaStreamsOutput(v **AddFlowMediaStreamsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAddBridgeOutputsOutput(v **AddBridgeOutputsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -159,26 +162,26 @@ func awsRestjson1_deserializeOpDocumentAddFlowMediaStreamsOutput(v **AddFlowMedi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AddFlowMediaStreamsOutput + var sv *AddBridgeOutputsOutput if *v == nil { - sv = &AddFlowMediaStreamsOutput{} + sv = &AddBridgeOutputsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": + case "bridgeArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.FlowArn = ptr.String(jtv) + sv.BridgeArn = ptr.String(jtv) } - case "mediaStreams": - if err := awsRestjson1_deserializeDocument__listOfMediaStream(&sv.MediaStreams, value); err != nil { + case "outputs": + if err := awsRestjson1_deserializeDocument__listOfBridgeOutput(&sv.Outputs, value); err != nil { return err } @@ -191,14 +194,14 @@ func awsRestjson1_deserializeOpDocumentAddFlowMediaStreamsOutput(v **AddFlowMedi return nil } -type awsRestjson1_deserializeOpAddFlowOutputs struct { +type awsRestjson1_deserializeOpAddBridgeSources struct { } -func (*awsRestjson1_deserializeOpAddFlowOutputs) ID() string { +func (*awsRestjson1_deserializeOpAddBridgeSources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAddFlowOutputs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddBridgeSources) 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) @@ -212,9 +215,9 @@ func (m *awsRestjson1_deserializeOpAddFlowOutputs) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAddFlowOutputs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddBridgeSources(response, &metadata) } - output := &AddFlowOutputsOutput{} + output := &AddBridgeSourcesOutput{} out.Result = output var buff [1024]byte @@ -235,7 +238,7 @@ func (m *awsRestjson1_deserializeOpAddFlowOutputs) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAddFlowOutputsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAddBridgeSourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -248,7 +251,7 @@ func (m *awsRestjson1_deserializeOpAddFlowOutputs) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorAddFlowOutputs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddBridgeSources(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)} @@ -289,12 +292,12 @@ func awsRestjson1_deserializeOpErrorAddFlowOutputs(response *smithyhttp.Response } switch { - case strings.EqualFold("AddFlowOutputs420Exception", errorCode): - return awsRestjson1_deserializeErrorAddFlowOutputs420Exception(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) @@ -320,7 +323,7 @@ func awsRestjson1_deserializeOpErrorAddFlowOutputs(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentAddFlowOutputsOutput(v **AddFlowOutputsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAddBridgeSourcesOutput(v **AddBridgeSourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -333,26 +336,26 @@ func awsRestjson1_deserializeOpDocumentAddFlowOutputsOutput(v **AddFlowOutputsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AddFlowOutputsOutput + var sv *AddBridgeSourcesOutput if *v == nil { - sv = &AddFlowOutputsOutput{} + sv = &AddBridgeSourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": + case "bridgeArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.FlowArn = ptr.String(jtv) + sv.BridgeArn = ptr.String(jtv) } - case "outputs": - if err := awsRestjson1_deserializeDocument__listOfOutput(&sv.Outputs, value); err != nil { + case "sources": + if err := awsRestjson1_deserializeDocument__listOfBridgeSource(&sv.Sources, value); err != nil { return err } @@ -365,14 +368,14 @@ func awsRestjson1_deserializeOpDocumentAddFlowOutputsOutput(v **AddFlowOutputsOu return nil } -type awsRestjson1_deserializeOpAddFlowSources struct { +type awsRestjson1_deserializeOpAddFlowMediaStreams struct { } -func (*awsRestjson1_deserializeOpAddFlowSources) ID() string { +func (*awsRestjson1_deserializeOpAddFlowMediaStreams) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAddFlowSources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddFlowMediaStreams) 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) @@ -386,9 +389,9 @@ func (m *awsRestjson1_deserializeOpAddFlowSources) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAddFlowSources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddFlowMediaStreams(response, &metadata) } - output := &AddFlowSourcesOutput{} + output := &AddFlowMediaStreamsOutput{} out.Result = output var buff [1024]byte @@ -409,7 +412,7 @@ func (m *awsRestjson1_deserializeOpAddFlowSources) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAddFlowSourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAddFlowMediaStreamsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -422,7 +425,7 @@ func (m *awsRestjson1_deserializeOpAddFlowSources) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorAddFlowSources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddFlowMediaStreams(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)} @@ -491,7 +494,7 @@ func awsRestjson1_deserializeOpErrorAddFlowSources(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentAddFlowSourcesOutput(v **AddFlowSourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAddFlowMediaStreamsOutput(v **AddFlowMediaStreamsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -504,9 +507,9 @@ func awsRestjson1_deserializeOpDocumentAddFlowSourcesOutput(v **AddFlowSourcesOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AddFlowSourcesOutput + var sv *AddFlowMediaStreamsOutput if *v == nil { - sv = &AddFlowSourcesOutput{} + sv = &AddFlowMediaStreamsOutput{} } else { sv = *v } @@ -522,8 +525,8 @@ func awsRestjson1_deserializeOpDocumentAddFlowSourcesOutput(v **AddFlowSourcesOu sv.FlowArn = ptr.String(jtv) } - case "sources": - if err := awsRestjson1_deserializeDocument__listOfSource(&sv.Sources, value); err != nil { + case "mediaStreams": + if err := awsRestjson1_deserializeDocument__listOfMediaStream(&sv.MediaStreams, value); err != nil { return err } @@ -536,14 +539,14 @@ func awsRestjson1_deserializeOpDocumentAddFlowSourcesOutput(v **AddFlowSourcesOu return nil } -type awsRestjson1_deserializeOpAddFlowVpcInterfaces struct { +type awsRestjson1_deserializeOpAddFlowOutputs struct { } -func (*awsRestjson1_deserializeOpAddFlowVpcInterfaces) ID() string { +func (*awsRestjson1_deserializeOpAddFlowOutputs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpAddFlowVpcInterfaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddFlowOutputs) 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) @@ -557,9 +560,9 @@ func (m *awsRestjson1_deserializeOpAddFlowVpcInterfaces) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorAddFlowVpcInterfaces(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddFlowOutputs(response, &metadata) } - output := &AddFlowVpcInterfacesOutput{} + output := &AddFlowOutputsOutput{} out.Result = output var buff [1024]byte @@ -580,7 +583,7 @@ func (m *awsRestjson1_deserializeOpAddFlowVpcInterfaces) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentAddFlowVpcInterfacesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAddFlowOutputsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -593,7 +596,7 @@ func (m *awsRestjson1_deserializeOpAddFlowVpcInterfaces) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorAddFlowVpcInterfaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddFlowOutputs(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)} @@ -634,6 +637,9 @@ func awsRestjson1_deserializeOpErrorAddFlowVpcInterfaces(response *smithyhttp.Re } switch { + case strings.EqualFold("AddFlowOutputs420Exception", errorCode): + return awsRestjson1_deserializeErrorAddFlowOutputs420Exception(response, errorBody) + case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) @@ -662,7 +668,7 @@ func awsRestjson1_deserializeOpErrorAddFlowVpcInterfaces(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentAddFlowVpcInterfacesOutput(v **AddFlowVpcInterfacesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAddFlowOutputsOutput(v **AddFlowOutputsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -675,9 +681,9 @@ func awsRestjson1_deserializeOpDocumentAddFlowVpcInterfacesOutput(v **AddFlowVpc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *AddFlowVpcInterfacesOutput + var sv *AddFlowOutputsOutput if *v == nil { - sv = &AddFlowVpcInterfacesOutput{} + sv = &AddFlowOutputsOutput{} } else { sv = *v } @@ -693,8 +699,8 @@ func awsRestjson1_deserializeOpDocumentAddFlowVpcInterfacesOutput(v **AddFlowVpc sv.FlowArn = ptr.String(jtv) } - case "vpcInterfaces": - if err := awsRestjson1_deserializeDocument__listOfVpcInterface(&sv.VpcInterfaces, value); err != nil { + case "outputs": + if err := awsRestjson1_deserializeDocument__listOfOutput(&sv.Outputs, value); err != nil { return err } @@ -707,14 +713,14 @@ func awsRestjson1_deserializeOpDocumentAddFlowVpcInterfacesOutput(v **AddFlowVpc return nil } -type awsRestjson1_deserializeOpCreateFlow struct { +type awsRestjson1_deserializeOpAddFlowSources struct { } -func (*awsRestjson1_deserializeOpCreateFlow) ID() string { +func (*awsRestjson1_deserializeOpAddFlowSources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpCreateFlow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddFlowSources) 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) @@ -728,9 +734,9 @@ func (m *awsRestjson1_deserializeOpCreateFlow) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorCreateFlow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddFlowSources(response, &metadata) } - output := &CreateFlowOutput{} + output := &AddFlowSourcesOutput{} out.Result = output var buff [1024]byte @@ -751,7 +757,7 @@ func (m *awsRestjson1_deserializeOpCreateFlow) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentCreateFlowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAddFlowSourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -764,7 +770,7 @@ func (m *awsRestjson1_deserializeOpCreateFlow) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorCreateFlow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddFlowSources(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)} @@ -808,15 +814,15 @@ func awsRestjson1_deserializeOpErrorCreateFlow(response *smithyhttp.Response, me case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("CreateFlow420Exception", errorCode): - return awsRestjson1_deserializeErrorCreateFlow420Exception(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -833,7 +839,7 @@ func awsRestjson1_deserializeOpErrorCreateFlow(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentCreateFlowOutput(v **CreateFlowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAddFlowSourcesOutput(v **AddFlowSourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -846,17 +852,26 @@ func awsRestjson1_deserializeOpDocumentCreateFlowOutput(v **CreateFlowOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *CreateFlowOutput + var sv *AddFlowSourcesOutput if *v == nil { - sv = &CreateFlowOutput{} + sv = &AddFlowSourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flow": - if err := awsRestjson1_deserializeDocumentFlow(&sv.Flow, value); err != nil { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "sources": + if err := awsRestjson1_deserializeDocument__listOfSource(&sv.Sources, value); err != nil { return err } @@ -869,14 +884,14 @@ func awsRestjson1_deserializeOpDocumentCreateFlowOutput(v **CreateFlowOutput, va return nil } -type awsRestjson1_deserializeOpDeleteFlow struct { +type awsRestjson1_deserializeOpAddFlowVpcInterfaces struct { } -func (*awsRestjson1_deserializeOpDeleteFlow) ID() string { +func (*awsRestjson1_deserializeOpAddFlowVpcInterfaces) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDeleteFlow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpAddFlowVpcInterfaces) 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) @@ -890,9 +905,9 @@ func (m *awsRestjson1_deserializeOpDeleteFlow) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDeleteFlow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorAddFlowVpcInterfaces(response, &metadata) } - output := &DeleteFlowOutput{} + output := &AddFlowVpcInterfacesOutput{} out.Result = output var buff [1024]byte @@ -913,7 +928,7 @@ func (m *awsRestjson1_deserializeOpDeleteFlow) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDeleteFlowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentAddFlowVpcInterfacesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -926,7 +941,7 @@ func (m *awsRestjson1_deserializeOpDeleteFlow) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorDeleteFlow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorAddFlowVpcInterfaces(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)} @@ -995,7 +1010,7 @@ func awsRestjson1_deserializeOpErrorDeleteFlow(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentDeleteFlowOutput(v **DeleteFlowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentAddFlowVpcInterfacesOutput(v **AddFlowVpcInterfacesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1008,9 +1023,9 @@ func awsRestjson1_deserializeOpDocumentDeleteFlowOutput(v **DeleteFlowOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DeleteFlowOutput + var sv *AddFlowVpcInterfacesOutput if *v == nil { - sv = &DeleteFlowOutput{} + sv = &AddFlowVpcInterfacesOutput{} } else { sv = *v } @@ -1026,13 +1041,9 @@ func awsRestjson1_deserializeOpDocumentDeleteFlowOutput(v **DeleteFlowOutput, va sv.FlowArn = ptr.String(jtv) } - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Status to be of type string, got %T instead", value) - } - sv.Status = types.Status(jtv) + case "vpcInterfaces": + if err := awsRestjson1_deserializeDocument__listOfVpcInterface(&sv.VpcInterfaces, value); err != nil { + return err } default: @@ -1044,14 +1055,14 @@ func awsRestjson1_deserializeOpDocumentDeleteFlowOutput(v **DeleteFlowOutput, va return nil } -type awsRestjson1_deserializeOpDescribeFlow struct { +type awsRestjson1_deserializeOpCreateBridge struct { } -func (*awsRestjson1_deserializeOpDescribeFlow) ID() string { +func (*awsRestjson1_deserializeOpCreateBridge) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeFlow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateBridge) 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) @@ -1065,9 +1076,9 @@ func (m *awsRestjson1_deserializeOpDescribeFlow) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeFlow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateBridge(response, &metadata) } - output := &DescribeFlowOutput{} + output := &CreateBridgeOutput{} out.Result = output var buff [1024]byte @@ -1088,7 +1099,7 @@ func (m *awsRestjson1_deserializeOpDescribeFlow) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeFlowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateBridgeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1101,7 +1112,7 @@ func (m *awsRestjson1_deserializeOpDescribeFlow) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeFlow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateBridge(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)} @@ -1145,15 +1156,18 @@ func awsRestjson1_deserializeOpErrorDescribeFlow(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("CreateBridge420Exception", errorCode): + return awsRestjson1_deserializeErrorCreateBridge420Exception(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -1170,7 +1184,7 @@ func awsRestjson1_deserializeOpErrorDescribeFlow(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentDescribeFlowOutput(v **DescribeFlowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateBridgeOutput(v **CreateBridgeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1183,22 +1197,17 @@ func awsRestjson1_deserializeOpDocumentDescribeFlowOutput(v **DescribeFlowOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeFlowOutput + var sv *CreateBridgeOutput if *v == nil { - sv = &DescribeFlowOutput{} + sv = &CreateBridgeOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flow": - if err := awsRestjson1_deserializeDocumentFlow(&sv.Flow, value); err != nil { - return err - } - - case "messages": - if err := awsRestjson1_deserializeDocumentMessages(&sv.Messages, value); err != nil { + case "bridge": + if err := awsRestjson1_deserializeDocumentBridge(&sv.Bridge, value); err != nil { return err } @@ -1211,14 +1220,14 @@ func awsRestjson1_deserializeOpDocumentDescribeFlowOutput(v **DescribeFlowOutput return nil } -type awsRestjson1_deserializeOpDescribeOffering struct { +type awsRestjson1_deserializeOpCreateFlow struct { } -func (*awsRestjson1_deserializeOpDescribeOffering) ID() string { +func (*awsRestjson1_deserializeOpCreateFlow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeOffering) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateFlow) 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) @@ -1232,9 +1241,9 @@ func (m *awsRestjson1_deserializeOpDescribeOffering) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeOffering(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateFlow(response, &metadata) } - output := &DescribeOfferingOutput{} + output := &CreateFlowOutput{} out.Result = output var buff [1024]byte @@ -1255,7 +1264,7 @@ func (m *awsRestjson1_deserializeOpDescribeOffering) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateFlowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1268,7 +1277,7 @@ func (m *awsRestjson1_deserializeOpDescribeOffering) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeOffering(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateFlow(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)} @@ -1312,12 +1321,15 @@ func awsRestjson1_deserializeOpErrorDescribeOffering(response *smithyhttp.Respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("CreateFlow420Exception", errorCode): + return awsRestjson1_deserializeErrorCreateFlow420Exception(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -1334,7 +1346,7 @@ func awsRestjson1_deserializeOpErrorDescribeOffering(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(v **DescribeOfferingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateFlowOutput(v **CreateFlowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1347,17 +1359,17 @@ func awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(v **DescribeOfferi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeOfferingOutput + var sv *CreateFlowOutput if *v == nil { - sv = &DescribeOfferingOutput{} + sv = &CreateFlowOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "offering": - if err := awsRestjson1_deserializeDocumentOffering(&sv.Offering, value); err != nil { + case "flow": + if err := awsRestjson1_deserializeDocumentFlow(&sv.Flow, value); err != nil { return err } @@ -1370,14 +1382,14 @@ func awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(v **DescribeOfferi return nil } -type awsRestjson1_deserializeOpDescribeReservation struct { +type awsRestjson1_deserializeOpCreateGateway struct { } -func (*awsRestjson1_deserializeOpDescribeReservation) ID() string { +func (*awsRestjson1_deserializeOpCreateGateway) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpDescribeReservation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpCreateGateway) 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) @@ -1391,9 +1403,9 @@ func (m *awsRestjson1_deserializeOpDescribeReservation) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorDescribeReservation(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorCreateGateway(response, &metadata) } - output := &DescribeReservationOutput{} + output := &CreateGatewayOutput{} out.Result = output var buff [1024]byte @@ -1414,7 +1426,7 @@ func (m *awsRestjson1_deserializeOpDescribeReservation) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentDescribeReservationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentCreateGatewayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1427,7 +1439,7 @@ func (m *awsRestjson1_deserializeOpDescribeReservation) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorDescribeReservation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorCreateGateway(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)} @@ -1471,12 +1483,18 @@ func awsRestjson1_deserializeOpErrorDescribeReservation(response *smithyhttp.Res case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("CreateGateway420Exception", errorCode): + return awsRestjson1_deserializeErrorCreateGateway420Exception(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -1493,7 +1511,7 @@ func awsRestjson1_deserializeOpErrorDescribeReservation(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentDescribeReservationOutput(v **DescribeReservationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentCreateGatewayOutput(v **CreateGatewayOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1506,17 +1524,17 @@ func awsRestjson1_deserializeOpDocumentDescribeReservationOutput(v **DescribeRes return fmt.Errorf("unexpected JSON type %v", value) } - var sv *DescribeReservationOutput + var sv *CreateGatewayOutput if *v == nil { - sv = &DescribeReservationOutput{} + sv = &CreateGatewayOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "reservation": - if err := awsRestjson1_deserializeDocumentReservation(&sv.Reservation, value); err != nil { + case "gateway": + if err := awsRestjson1_deserializeDocumentGateway(&sv.Gateway, value); err != nil { return err } @@ -1529,14 +1547,14 @@ func awsRestjson1_deserializeOpDocumentDescribeReservationOutput(v **DescribeRes return nil } -type awsRestjson1_deserializeOpGrantFlowEntitlements struct { +type awsRestjson1_deserializeOpDeleteBridge struct { } -func (*awsRestjson1_deserializeOpGrantFlowEntitlements) ID() string { +func (*awsRestjson1_deserializeOpDeleteBridge) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGrantFlowEntitlements) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteBridge) 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) @@ -1550,9 +1568,9 @@ func (m *awsRestjson1_deserializeOpGrantFlowEntitlements) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGrantFlowEntitlements(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteBridge(response, &metadata) } - output := &GrantFlowEntitlementsOutput{} + output := &DeleteBridgeOutput{} out.Result = output var buff [1024]byte @@ -1573,7 +1591,7 @@ func (m *awsRestjson1_deserializeOpGrantFlowEntitlements) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGrantFlowEntitlementsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteBridgeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1586,7 +1604,7 @@ func (m *awsRestjson1_deserializeOpGrantFlowEntitlements) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorGrantFlowEntitlements(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteBridge(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)} @@ -1630,12 +1648,12 @@ func awsRestjson1_deserializeOpErrorGrantFlowEntitlements(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("GrantFlowEntitlements420Exception", errorCode): - return awsRestjson1_deserializeErrorGrantFlowEntitlements420Exception(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -1658,7 +1676,7 @@ func awsRestjson1_deserializeOpErrorGrantFlowEntitlements(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentGrantFlowEntitlementsOutput(v **GrantFlowEntitlementsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteBridgeOutput(v **DeleteBridgeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1671,27 +1689,22 @@ func awsRestjson1_deserializeOpDocumentGrantFlowEntitlementsOutput(v **GrantFlow return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GrantFlowEntitlementsOutput + var sv *DeleteBridgeOutput if *v == nil { - sv = &GrantFlowEntitlementsOutput{} + sv = &DeleteBridgeOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "entitlements": - if err := awsRestjson1_deserializeDocument__listOfEntitlement(&sv.Entitlements, value); err != nil { - return err - } - - case "flowArn": + case "bridgeArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.FlowArn = ptr.String(jtv) + sv.BridgeArn = ptr.String(jtv) } default: @@ -1703,14 +1716,14 @@ func awsRestjson1_deserializeOpDocumentGrantFlowEntitlementsOutput(v **GrantFlow return nil } -type awsRestjson1_deserializeOpListEntitlements struct { +type awsRestjson1_deserializeOpDeleteFlow struct { } -func (*awsRestjson1_deserializeOpListEntitlements) ID() string { +func (*awsRestjson1_deserializeOpDeleteFlow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEntitlements) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteFlow) 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) @@ -1724,9 +1737,9 @@ func (m *awsRestjson1_deserializeOpListEntitlements) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEntitlements(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteFlow(response, &metadata) } - output := &ListEntitlementsOutput{} + output := &DeleteFlowOutput{} out.Result = output var buff [1024]byte @@ -1747,7 +1760,7 @@ func (m *awsRestjson1_deserializeOpListEntitlements) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEntitlementsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteFlowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1760,7 +1773,7 @@ func (m *awsRestjson1_deserializeOpListEntitlements) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEntitlements(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteFlow(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)} @@ -1804,9 +1817,15 @@ func awsRestjson1_deserializeOpErrorListEntitlements(response *smithyhttp.Respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -1823,7 +1842,7 @@ func awsRestjson1_deserializeOpErrorListEntitlements(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListEntitlementsOutput(v **ListEntitlementsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteFlowOutput(v **DeleteFlowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1836,27 +1855,31 @@ func awsRestjson1_deserializeOpDocumentListEntitlementsOutput(v **ListEntitlemen return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEntitlementsOutput + var sv *DeleteFlowOutput if *v == nil { - sv = &ListEntitlementsOutput{} + sv = &DeleteFlowOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "entitlements": - if err := awsRestjson1_deserializeDocument__listOfListedEntitlement(&sv.Entitlements, value); err != nil { - return err + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) } - case "nextToken": + case "status": 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 Status to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.Status = types.Status(jtv) } default: @@ -1868,14 +1891,14 @@ func awsRestjson1_deserializeOpDocumentListEntitlementsOutput(v **ListEntitlemen return nil } -type awsRestjson1_deserializeOpListFlows struct { +type awsRestjson1_deserializeOpDeleteGateway struct { } -func (*awsRestjson1_deserializeOpListFlows) ID() string { +func (*awsRestjson1_deserializeOpDeleteGateway) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListFlows) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteGateway) 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) @@ -1889,9 +1912,9 @@ func (m *awsRestjson1_deserializeOpListFlows) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListFlows(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteGateway(response, &metadata) } - output := &ListFlowsOutput{} + output := &DeleteGatewayOutput{} out.Result = output var buff [1024]byte @@ -1912,7 +1935,7 @@ func (m *awsRestjson1_deserializeOpListFlows) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListFlowsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeleteGatewayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1925,7 +1948,7 @@ func (m *awsRestjson1_deserializeOpListFlows) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListFlows(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeleteGateway(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)} @@ -1969,9 +1992,18 @@ func awsRestjson1_deserializeOpErrorListFlows(response *smithyhttp.Response, met 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("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -1988,7 +2020,7 @@ func awsRestjson1_deserializeOpErrorListFlows(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentListFlowsOutput(v **ListFlowsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeleteGatewayOutput(v **DeleteGatewayOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2001,27 +2033,22 @@ func awsRestjson1_deserializeOpDocumentListFlowsOutput(v **ListFlowsOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListFlowsOutput + var sv *DeleteGatewayOutput if *v == nil { - sv = &ListFlowsOutput{} + sv = &DeleteGatewayOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flows": - if err := awsRestjson1_deserializeDocument__listOfListedFlow(&sv.Flows, value); err != nil { - return err - } - - case "nextToken": + case "gatewayArn": 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) + sv.GatewayArn = ptr.String(jtv) } default: @@ -2033,14 +2060,14 @@ func awsRestjson1_deserializeOpDocumentListFlowsOutput(v **ListFlowsOutput, valu return nil } -type awsRestjson1_deserializeOpListOfferings struct { +type awsRestjson1_deserializeOpDeregisterGatewayInstance struct { } -func (*awsRestjson1_deserializeOpListOfferings) ID() string { +func (*awsRestjson1_deserializeOpDeregisterGatewayInstance) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListOfferings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeregisterGatewayInstance) 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) @@ -2054,9 +2081,9 @@ func (m *awsRestjson1_deserializeOpListOfferings) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListOfferings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeregisterGatewayInstance(response, &metadata) } - output := &ListOfferingsOutput{} + output := &DeregisterGatewayInstanceOutput{} out.Result = output var buff [1024]byte @@ -2077,7 +2104,7 @@ func (m *awsRestjson1_deserializeOpListOfferings) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListOfferingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDeregisterGatewayInstanceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2090,7 +2117,7 @@ func (m *awsRestjson1_deserializeOpListOfferings) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListOfferings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDeregisterGatewayInstance(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)} @@ -2134,9 +2161,18 @@ func awsRestjson1_deserializeOpErrorListOfferings(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("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -2153,7 +2189,7 @@ func awsRestjson1_deserializeOpErrorListOfferings(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListOfferingsOutput(v **ListOfferingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDeregisterGatewayInstanceOutput(v **DeregisterGatewayInstanceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2166,27 +2202,31 @@ func awsRestjson1_deserializeOpDocumentListOfferingsOutput(v **ListOfferingsOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListOfferingsOutput + var sv *DeregisterGatewayInstanceOutput if *v == nil { - sv = &ListOfferingsOutput{} + sv = &DeregisterGatewayInstanceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "nextToken": + case "gatewayInstanceArn": 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) + sv.GatewayInstanceArn = ptr.String(jtv) } - case "offerings": - if err := awsRestjson1_deserializeDocument__listOfOffering(&sv.Offerings, value); err != nil { - return err + case "instanceState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceState to be of type string, got %T instead", value) + } + sv.InstanceState = types.InstanceState(jtv) } default: @@ -2198,14 +2238,14 @@ func awsRestjson1_deserializeOpDocumentListOfferingsOutput(v **ListOfferingsOutp return nil } -type awsRestjson1_deserializeOpListReservations struct { +type awsRestjson1_deserializeOpDescribeBridge struct { } -func (*awsRestjson1_deserializeOpListReservations) ID() string { +func (*awsRestjson1_deserializeOpDescribeBridge) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListReservations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeBridge) 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) @@ -2219,9 +2259,9 @@ func (m *awsRestjson1_deserializeOpListReservations) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListReservations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeBridge(response, &metadata) } - output := &ListReservationsOutput{} + output := &DescribeBridgeOutput{} out.Result = output var buff [1024]byte @@ -2242,7 +2282,7 @@ func (m *awsRestjson1_deserializeOpListReservations) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListReservationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeBridgeOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2255,7 +2295,7 @@ func (m *awsRestjson1_deserializeOpListReservations) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListReservations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeBridge(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)} @@ -2299,9 +2339,18 @@ func awsRestjson1_deserializeOpErrorListReservations(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("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -2318,7 +2367,7 @@ func awsRestjson1_deserializeOpErrorListReservations(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListReservationsOutput(v **ListReservationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeBridgeOutput(v **DescribeBridgeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2331,26 +2380,17 @@ func awsRestjson1_deserializeOpDocumentListReservationsOutput(v **ListReservatio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListReservationsOutput + var sv *DescribeBridgeOutput if *v == nil { - sv = &ListReservationsOutput{} + sv = &DescribeBridgeOutput{} } 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 "reservations": - if err := awsRestjson1_deserializeDocument__listOfReservation(&sv.Reservations, value); err != nil { + case "bridge": + if err := awsRestjson1_deserializeDocumentBridge(&sv.Bridge, value); err != nil { return err } @@ -2363,14 +2403,14 @@ func awsRestjson1_deserializeOpDocumentListReservationsOutput(v **ListReservatio return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpDescribeFlow struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpDescribeFlow) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeFlow) 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) @@ -2384,9 +2424,9 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeFlow(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &DescribeFlowOutput{} out.Result = output var buff [1024]byte @@ -2407,7 +2447,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeFlowOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2420,7 +2460,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeFlow(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)} @@ -2464,12 +2504,21 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -2480,7 +2529,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeFlowOutput(v **DescribeFlowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2493,17 +2542,22 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *DescribeFlowOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &DescribeFlowOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocument__mapOf__string(&sv.Tags, value); err != nil { + case "flow": + if err := awsRestjson1_deserializeDocumentFlow(&sv.Flow, value); err != nil { + return err + } + + case "messages": + if err := awsRestjson1_deserializeDocumentMessages(&sv.Messages, value); err != nil { return err } @@ -2516,14 +2570,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpPurchaseOffering struct { +type awsRestjson1_deserializeOpDescribeGateway struct { } -func (*awsRestjson1_deserializeOpPurchaseOffering) ID() string { +func (*awsRestjson1_deserializeOpDescribeGateway) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPurchaseOffering) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGateway) 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) @@ -2537,9 +2591,9 @@ func (m *awsRestjson1_deserializeOpPurchaseOffering) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPurchaseOffering(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGateway(response, &metadata) } - output := &PurchaseOfferingOutput{} + output := &DescribeGatewayOutput{} out.Result = output var buff [1024]byte @@ -2560,7 +2614,7 @@ func (m *awsRestjson1_deserializeOpPurchaseOffering) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGatewayOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2573,7 +2627,7 @@ func (m *awsRestjson1_deserializeOpPurchaseOffering) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorPurchaseOffering(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGateway(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)} @@ -2617,6 +2671,9 @@ func awsRestjson1_deserializeOpErrorPurchaseOffering(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) @@ -2642,7 +2699,7 @@ func awsRestjson1_deserializeOpErrorPurchaseOffering(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(v **PurchaseOfferingOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGatewayOutput(v **DescribeGatewayOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2655,17 +2712,17 @@ func awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(v **PurchaseOfferi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PurchaseOfferingOutput + var sv *DescribeGatewayOutput if *v == nil { - sv = &PurchaseOfferingOutput{} + sv = &DescribeGatewayOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "reservation": - if err := awsRestjson1_deserializeDocumentReservation(&sv.Reservation, value); err != nil { + case "gateway": + if err := awsRestjson1_deserializeDocumentGateway(&sv.Gateway, value); err != nil { return err } @@ -2678,14 +2735,14 @@ func awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(v **PurchaseOfferi return nil } -type awsRestjson1_deserializeOpRemoveFlowMediaStream struct { +type awsRestjson1_deserializeOpDescribeGatewayInstance struct { } -func (*awsRestjson1_deserializeOpRemoveFlowMediaStream) ID() string { +func (*awsRestjson1_deserializeOpDescribeGatewayInstance) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRemoveFlowMediaStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeGatewayInstance) 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) @@ -2699,9 +2756,9 @@ func (m *awsRestjson1_deserializeOpRemoveFlowMediaStream) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRemoveFlowMediaStream(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeGatewayInstance(response, &metadata) } - output := &RemoveFlowMediaStreamOutput{} + output := &DescribeGatewayInstanceOutput{} out.Result = output var buff [1024]byte @@ -2722,7 +2779,7 @@ func (m *awsRestjson1_deserializeOpRemoveFlowMediaStream) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRemoveFlowMediaStreamOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeGatewayInstanceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2735,7 +2792,7 @@ func (m *awsRestjson1_deserializeOpRemoveFlowMediaStream) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorRemoveFlowMediaStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeGatewayInstance(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)} @@ -2779,6 +2836,9 @@ func awsRestjson1_deserializeOpErrorRemoveFlowMediaStream(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) @@ -2804,7 +2864,7 @@ func awsRestjson1_deserializeOpErrorRemoveFlowMediaStream(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentRemoveFlowMediaStreamOutput(v **RemoveFlowMediaStreamOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeGatewayInstanceOutput(v **DescribeGatewayInstanceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2817,31 +2877,18 @@ func awsRestjson1_deserializeOpDocumentRemoveFlowMediaStreamOutput(v **RemoveFlo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RemoveFlowMediaStreamOutput + var sv *DescribeGatewayInstanceOutput if *v == nil { - sv = &RemoveFlowMediaStreamOutput{} + sv = &DescribeGatewayInstanceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.FlowArn = ptr.String(jtv) - } - - case "mediaStreamName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.MediaStreamName = ptr.String(jtv) + case "gatewayInstance": + if err := awsRestjson1_deserializeDocumentGatewayInstance(&sv.GatewayInstance, value); err != nil { + return err } default: @@ -2853,14 +2900,14 @@ func awsRestjson1_deserializeOpDocumentRemoveFlowMediaStreamOutput(v **RemoveFlo return nil } -type awsRestjson1_deserializeOpRemoveFlowOutput struct { +type awsRestjson1_deserializeOpDescribeOffering struct { } -func (*awsRestjson1_deserializeOpRemoveFlowOutput) ID() string { +func (*awsRestjson1_deserializeOpDescribeOffering) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRemoveFlowOutput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeOffering) 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) @@ -2874,9 +2921,9 @@ func (m *awsRestjson1_deserializeOpRemoveFlowOutput) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRemoveFlowOutput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeOffering(response, &metadata) } - output := &RemoveFlowOutputOutput{} + output := &DescribeOfferingOutput{} out.Result = output var buff [1024]byte @@ -2897,7 +2944,7 @@ func (m *awsRestjson1_deserializeOpRemoveFlowOutput) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRemoveFlowOutputOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2910,7 +2957,7 @@ func (m *awsRestjson1_deserializeOpRemoveFlowOutput) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorRemoveFlowOutput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeOffering(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)} @@ -2954,9 +3001,6 @@ func awsRestjson1_deserializeOpErrorRemoveFlowOutput(response *smithyhttp.Respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -2979,7 +3023,7 @@ func awsRestjson1_deserializeOpErrorRemoveFlowOutput(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentRemoveFlowOutputOutput(v **RemoveFlowOutputOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeOfferingOutput(v **DescribeOfferingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2992,31 +3036,18 @@ func awsRestjson1_deserializeOpDocumentRemoveFlowOutputOutput(v **RemoveFlowOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RemoveFlowOutputOutput + var sv *DescribeOfferingOutput if *v == nil { - sv = &RemoveFlowOutputOutput{} + sv = &DescribeOfferingOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.FlowArn = ptr.String(jtv) - } - - case "outputArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.OutputArn = ptr.String(jtv) + case "offering": + if err := awsRestjson1_deserializeDocumentOffering(&sv.Offering, value); err != nil { + return err } default: @@ -3028,14 +3059,14 @@ func awsRestjson1_deserializeOpDocumentRemoveFlowOutputOutput(v **RemoveFlowOutp return nil } -type awsRestjson1_deserializeOpRemoveFlowSource struct { +type awsRestjson1_deserializeOpDescribeReservation struct { } -func (*awsRestjson1_deserializeOpRemoveFlowSource) ID() string { +func (*awsRestjson1_deserializeOpDescribeReservation) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRemoveFlowSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeReservation) 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) @@ -3049,9 +3080,9 @@ func (m *awsRestjson1_deserializeOpRemoveFlowSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRemoveFlowSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeReservation(response, &metadata) } - output := &RemoveFlowSourceOutput{} + output := &DescribeReservationOutput{} out.Result = output var buff [1024]byte @@ -3072,7 +3103,7 @@ func (m *awsRestjson1_deserializeOpRemoveFlowSource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRemoveFlowSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeReservationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3085,7 +3116,7 @@ func (m *awsRestjson1_deserializeOpRemoveFlowSource) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorRemoveFlowSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeReservation(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)} @@ -3129,9 +3160,6 @@ func awsRestjson1_deserializeOpErrorRemoveFlowSource(response *smithyhttp.Respon case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -3154,7 +3182,7 @@ func awsRestjson1_deserializeOpErrorRemoveFlowSource(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentRemoveFlowSourceOutput(v **RemoveFlowSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeReservationOutput(v **DescribeReservationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3167,31 +3195,18 @@ func awsRestjson1_deserializeOpDocumentRemoveFlowSourceOutput(v **RemoveFlowSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RemoveFlowSourceOutput + var sv *DescribeReservationOutput if *v == nil { - sv = &RemoveFlowSourceOutput{} + sv = &DescribeReservationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.FlowArn = ptr.String(jtv) - } - - case "sourceArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.SourceArn = ptr.String(jtv) + case "reservation": + if err := awsRestjson1_deserializeDocumentReservation(&sv.Reservation, value); err != nil { + return err } default: @@ -3203,14 +3218,14 @@ func awsRestjson1_deserializeOpDocumentRemoveFlowSourceOutput(v **RemoveFlowSour return nil } -type awsRestjson1_deserializeOpRemoveFlowVpcInterface struct { +type awsRestjson1_deserializeOpGrantFlowEntitlements struct { } -func (*awsRestjson1_deserializeOpRemoveFlowVpcInterface) ID() string { +func (*awsRestjson1_deserializeOpGrantFlowEntitlements) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRemoveFlowVpcInterface) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGrantFlowEntitlements) 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) @@ -3224,9 +3239,9 @@ func (m *awsRestjson1_deserializeOpRemoveFlowVpcInterface) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRemoveFlowVpcInterface(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGrantFlowEntitlements(response, &metadata) } - output := &RemoveFlowVpcInterfaceOutput{} + output := &GrantFlowEntitlementsOutput{} out.Result = output var buff [1024]byte @@ -3247,7 +3262,7 @@ func (m *awsRestjson1_deserializeOpRemoveFlowVpcInterface) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRemoveFlowVpcInterfaceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGrantFlowEntitlementsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3260,7 +3275,7 @@ func (m *awsRestjson1_deserializeOpRemoveFlowVpcInterface) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorRemoveFlowVpcInterface(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGrantFlowEntitlements(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)} @@ -3307,6 +3322,9 @@ func awsRestjson1_deserializeOpErrorRemoveFlowVpcInterface(response *smithyhttp. case strings.EqualFold("ForbiddenException", errorCode): return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("GrantFlowEntitlements420Exception", errorCode): + return awsRestjson1_deserializeErrorGrantFlowEntitlements420Exception(response, errorBody) + case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) @@ -3329,7 +3347,7 @@ func awsRestjson1_deserializeOpErrorRemoveFlowVpcInterface(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentRemoveFlowVpcInterfaceOutput(v **RemoveFlowVpcInterfaceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGrantFlowEntitlementsOutput(v **GrantFlowEntitlementsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3342,36 +3360,27 @@ func awsRestjson1_deserializeOpDocumentRemoveFlowVpcInterfaceOutput(v **RemoveFl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RemoveFlowVpcInterfaceOutput + var sv *GrantFlowEntitlementsOutput if *v == nil { - sv = &RemoveFlowVpcInterfaceOutput{} + sv = &GrantFlowEntitlementsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.FlowArn = ptr.String(jtv) - } - - case "nonDeletedNetworkInterfaceIds": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.NonDeletedNetworkInterfaceIds, value); err != nil { + case "entitlements": + if err := awsRestjson1_deserializeDocument__listOfEntitlement(&sv.Entitlements, value); err != nil { return err } - case "vpcInterfaceName": + case "flowArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.VpcInterfaceName = ptr.String(jtv) + sv.FlowArn = ptr.String(jtv) } default: @@ -3383,14 +3392,14 @@ func awsRestjson1_deserializeOpDocumentRemoveFlowVpcInterfaceOutput(v **RemoveFl return nil } -type awsRestjson1_deserializeOpRevokeFlowEntitlement struct { +type awsRestjson1_deserializeOpListBridges struct { } -func (*awsRestjson1_deserializeOpRevokeFlowEntitlement) ID() string { +func (*awsRestjson1_deserializeOpListBridges) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRevokeFlowEntitlement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListBridges) 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) @@ -3404,9 +3413,9 @@ func (m *awsRestjson1_deserializeOpRevokeFlowEntitlement) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRevokeFlowEntitlement(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListBridges(response, &metadata) } - output := &RevokeFlowEntitlementOutput{} + output := &ListBridgesOutput{} out.Result = output var buff [1024]byte @@ -3427,7 +3436,7 @@ func (m *awsRestjson1_deserializeOpRevokeFlowEntitlement) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRevokeFlowEntitlementOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListBridgesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3440,7 +3449,7 @@ func (m *awsRestjson1_deserializeOpRevokeFlowEntitlement) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorRevokeFlowEntitlement(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListBridges(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)} @@ -3484,15 +3493,12 @@ func awsRestjson1_deserializeOpErrorRevokeFlowEntitlement(response *smithyhttp.R case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -3509,7 +3515,7 @@ func awsRestjson1_deserializeOpErrorRevokeFlowEntitlement(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentRevokeFlowEntitlementOutput(v **RevokeFlowEntitlementOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListBridgesOutput(v **ListBridgesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3522,31 +3528,27 @@ func awsRestjson1_deserializeOpDocumentRevokeFlowEntitlementOutput(v **RevokeFlo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RevokeFlowEntitlementOutput + var sv *ListBridgesOutput if *v == nil { - sv = &RevokeFlowEntitlementOutput{} + sv = &ListBridgesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "entitlementArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.EntitlementArn = ptr.String(jtv) + case "bridges": + if err := awsRestjson1_deserializeDocument__listOfListedBridge(&sv.Bridges, value); err != nil { + return err } - case "flowArn": + 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.FlowArn = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -3558,14 +3560,14 @@ func awsRestjson1_deserializeOpDocumentRevokeFlowEntitlementOutput(v **RevokeFlo return nil } -type awsRestjson1_deserializeOpStartFlow struct { +type awsRestjson1_deserializeOpListEntitlements struct { } -func (*awsRestjson1_deserializeOpStartFlow) ID() string { +func (*awsRestjson1_deserializeOpListEntitlements) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartFlow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEntitlements) 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,9 +3581,9 @@ func (m *awsRestjson1_deserializeOpStartFlow) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartFlow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEntitlements(response, &metadata) } - output := &StartFlowOutput{} + output := &ListEntitlementsOutput{} out.Result = output var buff [1024]byte @@ -3602,7 +3604,7 @@ func (m *awsRestjson1_deserializeOpStartFlow) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartFlowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEntitlementsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3615,7 +3617,7 @@ func (m *awsRestjson1_deserializeOpStartFlow) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartFlow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEntitlements(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)} @@ -3659,15 +3661,9 @@ func awsRestjson1_deserializeOpErrorStartFlow(response *smithyhttp.Response, met case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -3684,7 +3680,7 @@ func awsRestjson1_deserializeOpErrorStartFlow(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentStartFlowOutput(v **StartFlowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEntitlementsOutput(v **ListEntitlementsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3697,31 +3693,27 @@ func awsRestjson1_deserializeOpDocumentStartFlowOutput(v **StartFlowOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartFlowOutput + var sv *ListEntitlementsOutput if *v == nil { - sv = &StartFlowOutput{} + sv = &ListEntitlementsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.FlowArn = ptr.String(jtv) + case "entitlements": + if err := awsRestjson1_deserializeDocument__listOfListedEntitlement(&sv.Entitlements, value); err != nil { + return err } - case "status": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Status 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.Status(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -3733,14 +3725,14 @@ func awsRestjson1_deserializeOpDocumentStartFlowOutput(v **StartFlowOutput, valu return nil } -type awsRestjson1_deserializeOpStopFlow struct { +type awsRestjson1_deserializeOpListFlows struct { } -func (*awsRestjson1_deserializeOpStopFlow) ID() string { +func (*awsRestjson1_deserializeOpListFlows) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopFlow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListFlows) 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) @@ -3754,9 +3746,9 @@ func (m *awsRestjson1_deserializeOpStopFlow) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopFlow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListFlows(response, &metadata) } - output := &StopFlowOutput{} + output := &ListFlowsOutput{} out.Result = output var buff [1024]byte @@ -3777,7 +3769,7 @@ func (m *awsRestjson1_deserializeOpStopFlow) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStopFlowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListFlowsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3790,7 +3782,7 @@ func (m *awsRestjson1_deserializeOpStopFlow) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorStopFlow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListFlows(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)} @@ -3834,15 +3826,9 @@ func awsRestjson1_deserializeOpErrorStopFlow(response *smithyhttp.Response, meta case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -3859,7 +3845,7 @@ func awsRestjson1_deserializeOpErrorStopFlow(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentStopFlowOutput(v **StopFlowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListFlowsOutput(v **ListFlowsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3872,31 +3858,27 @@ func awsRestjson1_deserializeOpDocumentStopFlowOutput(v **StopFlowOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StopFlowOutput + var sv *ListFlowsOutput if *v == nil { - sv = &StopFlowOutput{} + sv = &ListFlowsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.FlowArn = ptr.String(jtv) + case "flows": + if err := awsRestjson1_deserializeDocument__listOfListedFlow(&sv.Flows, value); err != nil { + return err } - case "status": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Status 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.Status(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -3908,14 +3890,14 @@ func awsRestjson1_deserializeOpDocumentStopFlowOutput(v **StopFlowOutput, value return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpListGatewayInstances struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpListGatewayInstances) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListGatewayInstances) 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) @@ -3929,21 +3911,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListGatewayInstances(response, &metadata) } - output := &TagResourceOutput{} + output := &ListGatewayInstancesOutput{} 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_deserializeOpDocumentListGatewayInstancesOutput(&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(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListGatewayInstances(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)} @@ -3987,11 +3991,17 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4003,14 +4013,59 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpUntagResource struct { +func awsRestjson1_deserializeOpDocumentListGatewayInstancesOutput(v **ListGatewayInstancesOutput, 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 *ListGatewayInstancesOutput + if *v == nil { + sv = &ListGatewayInstancesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "instances": + if err := awsRestjson1_deserializeDocument__listOfListedGatewayInstance(&sv.Instances, 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_deserializeOpUntagResource) ID() string { +type awsRestjson1_deserializeOpListGateways struct { +} + +func (*awsRestjson1_deserializeOpListGateways) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListGateways) 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) @@ -4024,21 +4079,43 @@ func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListGateways(response, &metadata) } - output := &UntagResourceOutput{} + output := &ListGatewaysOutput{} 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_deserializeOpDocumentListGatewaysOutput(&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(), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListGateways(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)} @@ -4082,11 +4159,17 @@ func awsRestjson1_deserializeOpErrorUntagResource(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("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -4098,14 +4181,59 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateFlow struct { +func awsRestjson1_deserializeOpDocumentListGatewaysOutput(v **ListGatewaysOutput, 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 *ListGatewaysOutput + if *v == nil { + sv = &ListGatewaysOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "gateways": + if err := awsRestjson1_deserializeDocument__listOfListedGateway(&sv.Gateways, 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_deserializeOpUpdateFlow) ID() string { +type awsRestjson1_deserializeOpListOfferings struct { +} + +func (*awsRestjson1_deserializeOpListOfferings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateFlow) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListOfferings) 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) @@ -4119,9 +4247,9 @@ func (m *awsRestjson1_deserializeOpUpdateFlow) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateFlow(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListOfferings(response, &metadata) } - output := &UpdateFlowOutput{} + output := &ListOfferingsOutput{} out.Result = output var buff [1024]byte @@ -4142,7 +4270,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlow) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateFlowOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListOfferingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4155,7 +4283,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlow) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateFlow(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListOfferings(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)} @@ -4199,15 +4327,9 @@ func awsRestjson1_deserializeOpErrorUpdateFlow(response *smithyhttp.Response, me case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -4224,7 +4346,7 @@ func awsRestjson1_deserializeOpErrorUpdateFlow(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentUpdateFlowOutput(v **UpdateFlowOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListOfferingsOutput(v **ListOfferingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4237,17 +4359,26 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowOutput(v **UpdateFlowOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateFlowOutput + var sv *ListOfferingsOutput if *v == nil { - sv = &UpdateFlowOutput{} + sv = &ListOfferingsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flow": - if err := awsRestjson1_deserializeDocumentFlow(&sv.Flow, value); err != nil { + 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 "offerings": + if err := awsRestjson1_deserializeDocument__listOfOffering(&sv.Offerings, value); err != nil { return err } @@ -4260,14 +4391,14 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowOutput(v **UpdateFlowOutput, va return nil } -type awsRestjson1_deserializeOpUpdateFlowEntitlement struct { +type awsRestjson1_deserializeOpListReservations struct { } -func (*awsRestjson1_deserializeOpUpdateFlowEntitlement) ID() string { +func (*awsRestjson1_deserializeOpListReservations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateFlowEntitlement) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListReservations) 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) @@ -4281,9 +4412,9 @@ func (m *awsRestjson1_deserializeOpUpdateFlowEntitlement) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateFlowEntitlement(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListReservations(response, &metadata) } - output := &UpdateFlowEntitlementOutput{} + output := &ListReservationsOutput{} out.Result = output var buff [1024]byte @@ -4304,7 +4435,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlowEntitlement) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateFlowEntitlementOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListReservationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4317,7 +4448,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlowEntitlement) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateFlowEntitlement(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListReservations(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)} @@ -4361,15 +4492,9 @@ func awsRestjson1_deserializeOpErrorUpdateFlowEntitlement(response *smithyhttp.R case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) - case strings.EqualFold("NotFoundException", errorCode): - return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) @@ -4386,7 +4511,7 @@ func awsRestjson1_deserializeOpErrorUpdateFlowEntitlement(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentUpdateFlowEntitlementOutput(v **UpdateFlowEntitlementOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListReservationsOutput(v **ListReservationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4399,27 +4524,27 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowEntitlementOutput(v **UpdateFlo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateFlowEntitlementOutput + var sv *ListReservationsOutput if *v == nil { - sv = &UpdateFlowEntitlementOutput{} + sv = &ListReservationsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "entitlement": - if err := awsRestjson1_deserializeDocumentEntitlement(&sv.Entitlement, value); err != nil { - return err - } - - case "flowArn": + 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.FlowArn = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) + } + + case "reservations": + if err := awsRestjson1_deserializeDocument__listOfReservation(&sv.Reservations, value); err != nil { + return err } default: @@ -4431,14 +4556,14 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowEntitlementOutput(v **UpdateFlo return nil } -type awsRestjson1_deserializeOpUpdateFlowMediaStream struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpUpdateFlowMediaStream) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateFlowMediaStream) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -4452,9 +4577,9 @@ func (m *awsRestjson1_deserializeOpUpdateFlowMediaStream) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateFlowMediaStream(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &UpdateFlowMediaStreamOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -4475,7 +4600,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlowMediaStream) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateFlowMediaStreamOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4488,7 +4613,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlowMediaStream) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateFlowMediaStream(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -4532,21 +4657,12 @@ func awsRestjson1_deserializeOpErrorUpdateFlowMediaStream(response *smithyhttp.R case strings.EqualFold("BadRequestException", errorCode): return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) - case strings.EqualFold("ForbiddenException", errorCode): - return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) - case strings.EqualFold("InternalServerErrorException", errorCode): return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) case strings.EqualFold("NotFoundException", errorCode): return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) - case strings.EqualFold("ServiceUnavailableException", errorCode): - return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) - - case strings.EqualFold("TooManyRequestsException", errorCode): - return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -4557,7 +4673,7 @@ func awsRestjson1_deserializeOpErrorUpdateFlowMediaStream(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentUpdateFlowMediaStreamOutput(v **UpdateFlowMediaStreamOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4570,26 +4686,17 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowMediaStreamOutput(v **UpdateFlo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateFlowMediaStreamOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &UpdateFlowMediaStreamOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.FlowArn = ptr.String(jtv) - } - - case "mediaStream": - if err := awsRestjson1_deserializeDocumentMediaStream(&sv.MediaStream, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocument__mapOf__string(&sv.Tags, value); err != nil { return err } @@ -4602,14 +4709,14 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowMediaStreamOutput(v **UpdateFlo return nil } -type awsRestjson1_deserializeOpUpdateFlowOutput struct { +type awsRestjson1_deserializeOpPurchaseOffering struct { } -func (*awsRestjson1_deserializeOpUpdateFlowOutput) ID() string { +func (*awsRestjson1_deserializeOpPurchaseOffering) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateFlowOutput) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPurchaseOffering) 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) @@ -4623,9 +4730,9 @@ func (m *awsRestjson1_deserializeOpUpdateFlowOutput) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateFlowOutput(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPurchaseOffering(response, &metadata) } - output := &UpdateFlowOutputOutput{} + output := &PurchaseOfferingOutput{} out.Result = output var buff [1024]byte @@ -4646,7 +4753,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlowOutput) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateFlowOutputOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4659,7 +4766,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlowOutput) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateFlowOutput(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPurchaseOffering(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)} @@ -4728,7 +4835,7 @@ func awsRestjson1_deserializeOpErrorUpdateFlowOutput(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentUpdateFlowOutputOutput(v **UpdateFlowOutputOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPurchaseOfferingOutput(v **PurchaseOfferingOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4741,26 +4848,17 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowOutputOutput(v **UpdateFlowOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateFlowOutputOutput + var sv *PurchaseOfferingOutput if *v == nil { - sv = &UpdateFlowOutputOutput{} + sv = &PurchaseOfferingOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.FlowArn = ptr.String(jtv) - } - - case "output": - if err := awsRestjson1_deserializeDocumentOutput(&sv.Output, value); err != nil { + case "reservation": + if err := awsRestjson1_deserializeDocumentReservation(&sv.Reservation, value); err != nil { return err } @@ -4773,14 +4871,14 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowOutputOutput(v **UpdateFlowOutp return nil } -type awsRestjson1_deserializeOpUpdateFlowSource struct { +type awsRestjson1_deserializeOpRemoveBridgeOutput struct { } -func (*awsRestjson1_deserializeOpUpdateFlowSource) ID() string { +func (*awsRestjson1_deserializeOpRemoveBridgeOutput) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateFlowSource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRemoveBridgeOutput) 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) @@ -4794,9 +4892,9 @@ func (m *awsRestjson1_deserializeOpUpdateFlowSource) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateFlowSource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRemoveBridgeOutput(response, &metadata) } - output := &UpdateFlowSourceOutput{} + output := &RemoveBridgeOutputOutput{} out.Result = output var buff [1024]byte @@ -4817,7 +4915,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlowSource) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateFlowSourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRemoveBridgeOutputOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4830,7 +4928,7 @@ func (m *awsRestjson1_deserializeOpUpdateFlowSource) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateFlowSource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRemoveBridgeOutput(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)} @@ -4874,6 +4972,9 @@ func awsRestjson1_deserializeOpErrorUpdateFlowSource(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) @@ -4899,7 +5000,7 @@ func awsRestjson1_deserializeOpErrorUpdateFlowSource(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentUpdateFlowSourceOutput(v **UpdateFlowSourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRemoveBridgeOutputOutput(v **RemoveBridgeOutputOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4912,27 +5013,31 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowSourceOutput(v **UpdateFlowSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateFlowSourceOutput + var sv *RemoveBridgeOutputOutput if *v == nil { - sv = &UpdateFlowSourceOutput{} + sv = &RemoveBridgeOutputOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "flowArn": + case "bridgeArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.FlowArn = ptr.String(jtv) + sv.BridgeArn = ptr.String(jtv) } - case "source": - if err := awsRestjson1_deserializeDocumentSource(&sv.Source, value); err != nil { - return err + case "outputName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OutputName = ptr.String(jtv) } default: @@ -4944,48 +5049,37 @@ func awsRestjson1_deserializeOpDocumentUpdateFlowSourceOutput(v **UpdateFlowSour return nil } -func awsRestjson1_deserializeErrorAddFlowOutputs420Exception(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AddFlowOutputs420Exception{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +type awsRestjson1_deserializeOpRemoveBridgeSource struct { +} - 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_deserializeDocumentAddFlowOutputs420Exception(&output, shape) +func (*awsRestjson1_deserializeOpRemoveBridgeSource) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpRemoveBridgeSource) 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 { - var 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 + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorRemoveBridgeSource(response, &metadata) + } + output := &RemoveBridgeSourceOutput{} + 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(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -4996,36 +5090,45 @@ func awsRestjson1_deserializeErrorBadRequestException(response *smithyhttp.Respo Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentBadRequestException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentRemoveBridgeSourceOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorCreateFlow420Exception(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.CreateFlow420Exception{} +func awsRestjson1_deserializeOpErrorRemoveBridgeSource(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() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -5035,65 +5138,126 @@ func awsRestjson1_deserializeErrorCreateFlow420Exception(response *smithyhttp.Re return err } - err := awsRestjson1_deserializeDocumentCreateFlow420Exception(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - 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(), + 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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentRemoveBridgeSourceOutput(v **RemoveBridgeSourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output -} + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } -func awsRestjson1_deserializeErrorForbiddenException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ForbiddenException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + var sv *RemoveBridgeSourceOutput + if *v == nil { + sv = &RemoveBridgeSourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bridgeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.BridgeArn = ptr.String(jtv) + } + + case "sourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.SourceName = ptr.String(jtv) + } + + default: + _, _ = key, 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 } + *v = sv + return nil +} - err := awsRestjson1_deserializeDocumentForbiddenException(&output, shape) +type awsRestjson1_deserializeOpRemoveFlowMediaStream struct { +} + +func (*awsRestjson1_deserializeOpRemoveFlowMediaStream) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpRemoveFlowMediaStream) 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 { - var 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 + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorRemoveFlowMediaStream(response, &metadata) + } + output := &RemoveFlowMediaStreamOutput{} + out.Result = output -func awsRestjson1_deserializeErrorGrantFlowEntitlements420Exception(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.GrantFlowEntitlements420Exception{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -5104,47 +5268,44 @@ func awsRestjson1_deserializeErrorGrantFlowEntitlements420Exception(response *sm Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentGrantFlowEntitlements420Exception(&output, shape) - + err = awsRestjson1_deserializeOpDocumentRemoveFlowMediaStreamOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorInternalServerErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerErrorException{} +func awsRestjson1_deserializeOpErrorRemoveFlowMediaStream(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() - 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_deserializeDocumentInternalServerErrorException(&output, shape) - + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5156,52 +5317,122 @@ func awsRestjson1_deserializeErrorInternalServerErrorException(response *smithyh } errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - 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(), + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - err := awsRestjson1_deserializeDocumentNotFoundException(&output, shape) +func awsRestjson1_deserializeOpDocumentRemoveFlowMediaStreamOutput(v **RemoveFlowMediaStreamOutput, 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 *RemoveFlowMediaStreamOutput + if *v == nil { + sv = &RemoveFlowMediaStreamOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "mediaStreamName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.MediaStreamName = ptr.String(jtv) + } + + default: + _, _ = key, value - 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 } + *v = sv + return nil +} - errorBody.Seek(0, io.SeekStart) +type awsRestjson1_deserializeOpRemoveFlowOutput struct { +} - return output +func (*awsRestjson1_deserializeOpRemoveFlowOutput) ID() string { + return "OperationDeserializer" } -func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceUnavailableException{} +func (m *awsRestjson1_deserializeOpRemoveFlowOutput) 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 + } + + 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_deserializeOpErrorRemoveFlowOutput(response, &metadata) + } + output := &RemoveFlowOutputOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -5212,36 +5443,45 @@ func awsRestjson1_deserializeErrorServiceUnavailableException(response *smithyht Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentServiceUnavailableException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentRemoveFlowOutputOutput(&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), + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), Snapshot: snapshot.Bytes(), } - return err } - errorBody.Seek(0, io.SeekStart) - - return output + return out, metadata, err } -func awsRestjson1_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.TooManyRequestsException{} +func awsRestjson1_deserializeOpErrorRemoveFlowOutput(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() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -5251,24 +5491,4182 @@ func awsRestjson1_deserializeErrorTooManyRequestsException(response *smithyhttp. return err } - err := awsRestjson1_deserializeDocumentTooManyRequestsException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - 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(), + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentRemoveFlowOutputOutput(v **RemoveFlowOutputOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *RemoveFlowOutputOutput + if *v == nil { + sv = &RemoveFlowOutputOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "outputArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OutputArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRemoveFlowSource struct { +} + +func (*awsRestjson1_deserializeOpRemoveFlowSource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRemoveFlowSource) 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 + } + + 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_deserializeOpErrorRemoveFlowSource(response, &metadata) + } + output := &RemoveFlowSourceOutput{} + 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_deserializeOpDocumentRemoveFlowSourceOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRemoveFlowSource(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRemoveFlowSourceOutput(v **RemoveFlowSourceOutput, 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 *RemoveFlowSourceOutput + if *v == nil { + sv = &RemoveFlowSourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "sourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.SourceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRemoveFlowVpcInterface struct { +} + +func (*awsRestjson1_deserializeOpRemoveFlowVpcInterface) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRemoveFlowVpcInterface) 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 + } + + 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_deserializeOpErrorRemoveFlowVpcInterface(response, &metadata) + } + output := &RemoveFlowVpcInterfaceOutput{} + 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_deserializeOpDocumentRemoveFlowVpcInterfaceOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRemoveFlowVpcInterface(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRemoveFlowVpcInterfaceOutput(v **RemoveFlowVpcInterfaceOutput, 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 *RemoveFlowVpcInterfaceOutput + if *v == nil { + sv = &RemoveFlowVpcInterfaceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "nonDeletedNetworkInterfaceIds": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.NonDeletedNetworkInterfaceIds, value); err != nil { + return err + } + + case "vpcInterfaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.VpcInterfaceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpRevokeFlowEntitlement struct { +} + +func (*awsRestjson1_deserializeOpRevokeFlowEntitlement) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRevokeFlowEntitlement) 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 + } + + 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_deserializeOpErrorRevokeFlowEntitlement(response, &metadata) + } + output := &RevokeFlowEntitlementOutput{} + 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_deserializeOpDocumentRevokeFlowEntitlementOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorRevokeFlowEntitlement(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentRevokeFlowEntitlementOutput(v **RevokeFlowEntitlementOutput, 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 *RevokeFlowEntitlementOutput + if *v == nil { + sv = &RevokeFlowEntitlementOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entitlementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.EntitlementArn = ptr.String(jtv) + } + + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStartFlow struct { +} + +func (*awsRestjson1_deserializeOpStartFlow) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStartFlow) 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 + } + + 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_deserializeOpErrorStartFlow(response, &metadata) + } + output := &StartFlowOutput{} + 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_deserializeOpDocumentStartFlowOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStartFlow(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStartFlowOutput(v **StartFlowOutput, 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 *StartFlowOutput + if *v == nil { + sv = &StartFlowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = types.Status(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpStopFlow struct { +} + +func (*awsRestjson1_deserializeOpStopFlow) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpStopFlow) 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 + } + + 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_deserializeOpErrorStopFlow(response, &metadata) + } + output := &StopFlowOutput{} + 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_deserializeOpDocumentStopFlowOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorStopFlow(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentStopFlowOutput(v **StopFlowOutput, 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 *StopFlowOutput + if *v == nil { + sv = &StopFlowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Status to be of type string, got %T instead", value) + } + sv.Status = types.Status(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +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 + } + + 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), + } + } + + 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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(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 + } + + 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), + } + } + + 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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateBridge struct { +} + +func (*awsRestjson1_deserializeOpUpdateBridge) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateBridge) 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 + } + + 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_deserializeOpErrorUpdateBridge(response, &metadata) + } + output := &UpdateBridgeOutput{} + 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_deserializeOpDocumentUpdateBridgeOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateBridge(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateBridgeOutput(v **UpdateBridgeOutput, 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 *UpdateBridgeOutput + if *v == nil { + sv = &UpdateBridgeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bridge": + if err := awsRestjson1_deserializeDocumentBridge(&sv.Bridge, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateBridgeOutput struct { +} + +func (*awsRestjson1_deserializeOpUpdateBridgeOutput) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateBridgeOutput) 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 + } + + 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_deserializeOpErrorUpdateBridgeOutput(response, &metadata) + } + output := &UpdateBridgeOutputOutput{} + 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_deserializeOpDocumentUpdateBridgeOutputOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateBridgeOutput(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateBridgeOutputOutput(v **UpdateBridgeOutputOutput, 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 *UpdateBridgeOutputOutput + if *v == nil { + sv = &UpdateBridgeOutputOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bridgeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.BridgeArn = ptr.String(jtv) + } + + case "output": + if err := awsRestjson1_deserializeDocumentBridgeOutput(&sv.Output, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateBridgeSource struct { +} + +func (*awsRestjson1_deserializeOpUpdateBridgeSource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateBridgeSource) 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 + } + + 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_deserializeOpErrorUpdateBridgeSource(response, &metadata) + } + output := &UpdateBridgeSourceOutput{} + 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_deserializeOpDocumentUpdateBridgeSourceOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateBridgeSource(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateBridgeSourceOutput(v **UpdateBridgeSourceOutput, 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 *UpdateBridgeSourceOutput + if *v == nil { + sv = &UpdateBridgeSourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bridgeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.BridgeArn = ptr.String(jtv) + } + + case "source": + if err := awsRestjson1_deserializeDocumentBridgeSource(&sv.Source, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateBridgeState struct { +} + +func (*awsRestjson1_deserializeOpUpdateBridgeState) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateBridgeState) 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 + } + + 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_deserializeOpErrorUpdateBridgeState(response, &metadata) + } + output := &UpdateBridgeStateOutput{} + 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_deserializeOpDocumentUpdateBridgeStateOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateBridgeState(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateBridgeStateOutput(v **UpdateBridgeStateOutput, 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 *UpdateBridgeStateOutput + if *v == nil { + sv = &UpdateBridgeStateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bridgeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.BridgeArn = ptr.String(jtv) + } + + case "desiredState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DesiredState to be of type string, got %T instead", value) + } + sv.DesiredState = types.DesiredState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFlow struct { +} + +func (*awsRestjson1_deserializeOpUpdateFlow) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFlow) 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 + } + + 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_deserializeOpErrorUpdateFlow(response, &metadata) + } + output := &UpdateFlowOutput{} + 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_deserializeOpDocumentUpdateFlowOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFlow(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFlowOutput(v **UpdateFlowOutput, 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 *UpdateFlowOutput + if *v == nil { + sv = &UpdateFlowOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flow": + if err := awsRestjson1_deserializeDocumentFlow(&sv.Flow, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFlowEntitlement struct { +} + +func (*awsRestjson1_deserializeOpUpdateFlowEntitlement) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFlowEntitlement) 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 + } + + 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_deserializeOpErrorUpdateFlowEntitlement(response, &metadata) + } + output := &UpdateFlowEntitlementOutput{} + 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_deserializeOpDocumentUpdateFlowEntitlementOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFlowEntitlement(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFlowEntitlementOutput(v **UpdateFlowEntitlementOutput, 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 *UpdateFlowEntitlementOutput + if *v == nil { + sv = &UpdateFlowEntitlementOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "entitlement": + if err := awsRestjson1_deserializeDocumentEntitlement(&sv.Entitlement, value); err != nil { + return err + } + + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFlowMediaStream struct { +} + +func (*awsRestjson1_deserializeOpUpdateFlowMediaStream) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFlowMediaStream) 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 + } + + 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_deserializeOpErrorUpdateFlowMediaStream(response, &metadata) + } + output := &UpdateFlowMediaStreamOutput{} + 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_deserializeOpDocumentUpdateFlowMediaStreamOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFlowMediaStream(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFlowMediaStreamOutput(v **UpdateFlowMediaStreamOutput, 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 *UpdateFlowMediaStreamOutput + if *v == nil { + sv = &UpdateFlowMediaStreamOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "mediaStream": + if err := awsRestjson1_deserializeDocumentMediaStream(&sv.MediaStream, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFlowOutput struct { +} + +func (*awsRestjson1_deserializeOpUpdateFlowOutput) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFlowOutput) 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 + } + + 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_deserializeOpErrorUpdateFlowOutput(response, &metadata) + } + output := &UpdateFlowOutputOutput{} + 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_deserializeOpDocumentUpdateFlowOutputOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFlowOutput(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFlowOutputOutput(v **UpdateFlowOutputOutput, 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 *UpdateFlowOutputOutput + if *v == nil { + sv = &UpdateFlowOutputOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "output": + if err := awsRestjson1_deserializeDocumentOutput(&sv.Output, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateFlowSource struct { +} + +func (*awsRestjson1_deserializeOpUpdateFlowSource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateFlowSource) 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 + } + + 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_deserializeOpErrorUpdateFlowSource(response, &metadata) + } + output := &UpdateFlowSourceOutput{} + 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_deserializeOpDocumentUpdateFlowSourceOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateFlowSource(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateFlowSourceOutput(v **UpdateFlowSourceOutput, 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 *UpdateFlowSourceOutput + if *v == nil { + sv = &UpdateFlowSourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "source": + if err := awsRestjson1_deserializeDocumentSource(&sv.Source, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateGatewayInstance struct { +} + +func (*awsRestjson1_deserializeOpUpdateGatewayInstance) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateGatewayInstance) 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 + } + + 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_deserializeOpErrorUpdateGatewayInstance(response, &metadata) + } + output := &UpdateGatewayInstanceOutput{} + 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_deserializeOpDocumentUpdateGatewayInstanceOutput(&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(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUpdateGatewayInstance(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("InternalServerErrorException", errorCode): + return awsRestjson1_deserializeErrorInternalServerErrorException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("TooManyRequestsException", errorCode): + return awsRestjson1_deserializeErrorTooManyRequestsException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateGatewayInstanceOutput(v **UpdateGatewayInstanceOutput, 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 *UpdateGatewayInstanceOutput + if *v == nil { + sv = &UpdateGatewayInstanceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bridgePlacement": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BridgePlacement to be of type string, got %T instead", value) + } + sv.BridgePlacement = types.BridgePlacement(jtv) + } + + case "gatewayInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.GatewayInstanceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAddFlowOutputs420Exception(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AddFlowOutputs420Exception{} + 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_deserializeDocumentAddFlowOutputs420Exception(&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_deserializeErrorCreateBridge420Exception(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CreateBridge420Exception{} + 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_deserializeDocumentCreateBridge420Exception(&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_deserializeErrorCreateFlow420Exception(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CreateFlow420Exception{} + 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_deserializeDocumentCreateFlow420Exception(&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_deserializeErrorCreateGateway420Exception(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.CreateGateway420Exception{} + 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_deserializeDocumentCreateGateway420Exception(&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_deserializeErrorGrantFlowEntitlements420Exception(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.GrantFlowEntitlements420Exception{} + 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_deserializeDocumentGrantFlowEntitlements420Exception(&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_deserializeErrorInternalServerErrorException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerErrorException{} + 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_deserializeDocumentInternalServerErrorException(&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_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_deserializeErrorTooManyRequestsException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.TooManyRequestsException{} + 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_deserializeDocumentTooManyRequestsException(&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_deserializeDocument__listOf__integer(v *[]int32, 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 []int32 + if *v == nil { + cv = []int32{} + } else { + cv = *v + } + + for _, value := range shape { + var col int32 + 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 + } + col = int32(i64) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOf__string(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 __string to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfBridgeOutput(v *[]types.BridgeOutput, 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.BridgeOutput + if *v == nil { + cv = []types.BridgeOutput{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BridgeOutput + destAddr := &col + if err := awsRestjson1_deserializeDocumentBridgeOutput(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfBridgeSource(v *[]types.BridgeSource, 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.BridgeSource + if *v == nil { + cv = []types.BridgeSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.BridgeSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentBridgeSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfDestinationConfiguration(v *[]types.DestinationConfiguration, 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.DestinationConfiguration + if *v == nil { + cv = []types.DestinationConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DestinationConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentDestinationConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfEntitlement(v *[]types.Entitlement, 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.Entitlement + if *v == nil { + cv = []types.Entitlement{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Entitlement + destAddr := &col + if err := awsRestjson1_deserializeDocumentEntitlement(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfGatewayNetwork(v *[]types.GatewayNetwork, 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.GatewayNetwork + if *v == nil { + cv = []types.GatewayNetwork{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.GatewayNetwork + destAddr := &col + if err := awsRestjson1_deserializeDocumentGatewayNetwork(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfInputConfiguration(v *[]types.InputConfiguration, 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.InputConfiguration + if *v == nil { + cv = []types.InputConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.InputConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentInputConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfListedBridge(v *[]types.ListedBridge, 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.ListedBridge + if *v == nil { + cv = []types.ListedBridge{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListedBridge + destAddr := &col + if err := awsRestjson1_deserializeDocumentListedBridge(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfListedEntitlement(v *[]types.ListedEntitlement, 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.ListedEntitlement + if *v == nil { + cv = []types.ListedEntitlement{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListedEntitlement + destAddr := &col + if err := awsRestjson1_deserializeDocumentListedEntitlement(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfListedFlow(v *[]types.ListedFlow, 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.ListedFlow + if *v == nil { + cv = []types.ListedFlow{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListedFlow + destAddr := &col + if err := awsRestjson1_deserializeDocumentListedFlow(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfListedGateway(v *[]types.ListedGateway, 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.ListedGateway + if *v == nil { + cv = []types.ListedGateway{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListedGateway + destAddr := &col + if err := awsRestjson1_deserializeDocumentListedGateway(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfListedGatewayInstance(v *[]types.ListedGatewayInstance, 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.ListedGatewayInstance + if *v == nil { + cv = []types.ListedGatewayInstance{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ListedGatewayInstance + destAddr := &col + if err := awsRestjson1_deserializeDocumentListedGatewayInstance(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfMediaStream(v *[]types.MediaStream, 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.MediaStream + if *v == nil { + cv = []types.MediaStream{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MediaStream + destAddr := &col + if err := awsRestjson1_deserializeDocumentMediaStream(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfMediaStreamOutputConfiguration(v *[]types.MediaStreamOutputConfiguration, 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.MediaStreamOutputConfiguration + if *v == nil { + cv = []types.MediaStreamOutputConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MediaStreamOutputConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentMediaStreamOutputConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfMediaStreamSourceConfiguration(v *[]types.MediaStreamSourceConfiguration, 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.MediaStreamSourceConfiguration + if *v == nil { + cv = []types.MediaStreamSourceConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MediaStreamSourceConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentMediaStreamSourceConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfMessageDetail(v *[]types.MessageDetail, 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.MessageDetail + if *v == nil { + cv = []types.MessageDetail{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.MessageDetail + destAddr := &col + if err := awsRestjson1_deserializeDocumentMessageDetail(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfOffering(v *[]types.Offering, 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.Offering + if *v == nil { + cv = []types.Offering{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Offering + destAddr := &col + if err := awsRestjson1_deserializeDocumentOffering(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfOutput(v *[]types.Output, 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.Output + if *v == nil { + cv = []types.Output{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Output + destAddr := &col + if err := awsRestjson1_deserializeDocumentOutput(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfReservation(v *[]types.Reservation, 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.Reservation + if *v == nil { + cv = []types.Reservation{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Reservation + destAddr := &col + if err := awsRestjson1_deserializeDocumentReservation(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfSource(v *[]types.Source, 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.Source + if *v == nil { + cv = []types.Source{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Source + destAddr := &col + if err := awsRestjson1_deserializeDocumentSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__listOfVpcInterface(v *[]types.VpcInterface, 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.VpcInterface + if *v == nil { + cv = []types.VpcInterface{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.VpcInterface + destAddr := &col + if err := awsRestjson1_deserializeDocumentVpcInterface(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocument__mapOf__string(v *map[string]string, 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 mv map[string]string + if *v == nil { + mv = map[string]string{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + +func awsRestjson1_deserializeDocumentAddFlowOutputs420Exception(v **types.AddFlowOutputs420Exception, 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.AddFlowOutputs420Exception + if *v == nil { + sv = &types.AddFlowOutputs420Exception{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "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_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 "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_deserializeDocument__listOf__string(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentBridge(v **types.Bridge, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5276,35 +9674,96 @@ func awsRestjson1_deserializeDocument__listOf__string(v *[]string, value interfa return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.Bridge if *v == nil { - cv = []string{} + sv = &types.Bridge{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "bridgeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.BridgeArn = ptr.String(jtv) } - col = jtv - } - cv = append(cv, col) + case "bridgeMessages": + if err := awsRestjson1_deserializeDocument__listOfMessageDetail(&sv.BridgeMessages, value); err != nil { + return err + } + + case "bridgeState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BridgeState to be of type string, got %T instead", value) + } + sv.BridgeState = types.BridgeState(jtv) + } + + case "egressGatewayBridge": + if err := awsRestjson1_deserializeDocumentEgressGatewayBridge(&sv.EgressGatewayBridge, value); err != nil { + return err + } + + case "ingressGatewayBridge": + if err := awsRestjson1_deserializeDocumentIngressGatewayBridge(&sv.IngressGatewayBridge, value); err != nil { + return err + } + + 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 "outputs": + if err := awsRestjson1_deserializeDocument__listOfBridgeOutput(&sv.Outputs, value); err != nil { + return err + } + + case "placementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.PlacementArn = ptr.String(jtv) + } + + case "sourceFailoverConfig": + if err := awsRestjson1_deserializeDocumentFailoverConfig(&sv.SourceFailoverConfig, value); err != nil { + return err + } + + case "sources": + if err := awsRestjson1_deserializeDocument__listOfBridgeSource(&sv.Sources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfDestinationConfiguration(v *[]types.DestinationConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentBridgeFlowOutput(v **types.BridgeFlowOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5312,33 +9771,57 @@ func awsRestjson1_deserializeDocument__listOfDestinationConfiguration(v *[]types 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.DestinationConfiguration + var sv *types.BridgeFlowOutput if *v == nil { - cv = []types.DestinationConfiguration{} + sv = &types.BridgeFlowOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.DestinationConfiguration - destAddr := &col - if err := awsRestjson1_deserializeDocumentDestinationConfiguration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "flowSourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowSourceArn = ptr.String(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) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfEntitlement(v *[]types.Entitlement, value interface{}) error { +func awsRestjson1_deserializeDocumentBridgeFlowSource(v **types.BridgeFlowSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5346,33 +9829,62 @@ func awsRestjson1_deserializeDocument__listOfEntitlement(v *[]types.Entitlement, 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.Entitlement + var sv *types.BridgeFlowSource if *v == nil { - cv = []types.Entitlement{} + sv = &types.BridgeFlowSource{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Entitlement - destAddr := &col - if err := awsRestjson1_deserializeDocumentEntitlement(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } + + case "flowVpcInterfaceAttachment": + if err := awsRestjson1_deserializeDocumentVpcInterfaceAttachment(&sv.FlowVpcInterfaceAttachment, value); err != nil { + return err + } + + 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 "outputArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OutputArn = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfInputConfiguration(v *[]types.InputConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentBridgeNetworkOutput(v **types.BridgeNetworkOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5380,67 +9892,92 @@ func awsRestjson1_deserializeDocument__listOfInputConfiguration(v *[]types.Input 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.InputConfiguration + var sv *types.BridgeNetworkOutput if *v == nil { - cv = []types.InputConfiguration{} + sv = &types.BridgeNetworkOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.InputConfiguration - destAddr := &col - if err := awsRestjson1_deserializeDocumentInputConfiguration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "ipAddress": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.IpAddress = ptr.String(jtv) + } - } - *v = cv - return nil -} + 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) + } -func awsRestjson1_deserializeDocument__listOfListedEntitlement(v *[]types.ListedEntitlement, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "networkName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.NetworkName = ptr.String(jtv) + } - shape, ok := value.([]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "port": + 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.Port = int32(i64) + } + + case "protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) + } + sv.Protocol = types.Protocol(jtv) + } + + case "ttl": + 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.Ttl = int32(i64) + } - var cv []types.ListedEntitlement - if *v == nil { - cv = []types.ListedEntitlement{} - } else { - cv = *v - } + default: + _, _ = key, value - for _, value := range shape { - var col types.ListedEntitlement - destAddr := &col - if err := awsRestjson1_deserializeDocumentListedEntitlement(&destAddr, value); err != nil { - return err } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfListedFlow(v *[]types.ListedFlow, value interface{}) error { +func awsRestjson1_deserializeDocumentBridgeNetworkSource(v **types.BridgeNetworkSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5448,33 +9985,79 @@ func awsRestjson1_deserializeDocument__listOfListedFlow(v *[]types.ListedFlow, v 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.ListedFlow + var sv *types.BridgeNetworkSource if *v == nil { - cv = []types.ListedFlow{} + sv = &types.BridgeNetworkSource{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.ListedFlow - destAddr := &col - if err := awsRestjson1_deserializeDocumentListedFlow(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "multicastIp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.MulticastIp = ptr.String(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 "networkName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.NetworkName = ptr.String(jtv) + } + + case "port": + 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.Port = int32(i64) + } + + case "protocol": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Protocol to be of type string, got %T instead", value) + } + sv.Protocol = types.Protocol(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfMediaStream(v *[]types.MediaStream, value interface{}) error { +func awsRestjson1_deserializeDocumentBridgeOutput(v **types.BridgeOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5482,33 +10065,40 @@ func awsRestjson1_deserializeDocument__listOfMediaStream(v *[]types.MediaStream, 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.MediaStream + var sv *types.BridgeOutput if *v == nil { - cv = []types.MediaStream{} + sv = &types.BridgeOutput{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.MediaStream - destAddr := &col - if err := awsRestjson1_deserializeDocumentMediaStream(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "flowOutput": + if err := awsRestjson1_deserializeDocumentBridgeFlowOutput(&sv.FlowOutput, value); err != nil { + return err + } + case "networkOutput": + if err := awsRestjson1_deserializeDocumentBridgeNetworkOutput(&sv.NetworkOutput, value); err != nil { + return err + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfMediaStreamOutputConfiguration(v *[]types.MediaStreamOutputConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentBridgeSource(v **types.BridgeSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5516,33 +10106,40 @@ func awsRestjson1_deserializeDocument__listOfMediaStreamOutputConfiguration(v *[ 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.MediaStreamOutputConfiguration + var sv *types.BridgeSource if *v == nil { - cv = []types.MediaStreamOutputConfiguration{} + sv = &types.BridgeSource{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.MediaStreamOutputConfiguration - destAddr := &col - if err := awsRestjson1_deserializeDocumentMediaStreamOutputConfiguration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "flowSource": + if err := awsRestjson1_deserializeDocumentBridgeFlowSource(&sv.FlowSource, value); err != nil { + return err + } + + case "networkSource": + if err := awsRestjson1_deserializeDocumentBridgeNetworkSource(&sv.NetworkSource, value); err != nil { + return err + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfMediaStreamSourceConfiguration(v *[]types.MediaStreamSourceConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5550,33 +10147,39 @@ func awsRestjson1_deserializeDocument__listOfMediaStreamSourceConfiguration(v *[ 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.MediaStreamSourceConfiguration + var sv *types.ConflictException if *v == nil { - cv = []types.MediaStreamSourceConfiguration{} + sv = &types.ConflictException{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.MediaStreamSourceConfiguration - destAddr := &col - if err := awsRestjson1_deserializeDocumentMediaStreamSourceConfiguration(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "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_deserializeDocument__listOfOffering(v *[]types.Offering, value interface{}) error { +func awsRestjson1_deserializeDocumentCreateBridge420Exception(v **types.CreateBridge420Exception, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5584,33 +10187,39 @@ func awsRestjson1_deserializeDocument__listOfOffering(v *[]types.Offering, value 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.Offering + var sv *types.CreateBridge420Exception if *v == nil { - cv = []types.Offering{} + sv = &types.CreateBridge420Exception{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Offering - destAddr := &col - if err := awsRestjson1_deserializeDocumentOffering(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "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_deserializeDocument__listOfOutput(v *[]types.Output, value interface{}) error { +func awsRestjson1_deserializeDocumentCreateFlow420Exception(v **types.CreateFlow420Exception, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5618,33 +10227,39 @@ func awsRestjson1_deserializeDocument__listOfOutput(v *[]types.Output, value int 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.Output + var sv *types.CreateFlow420Exception if *v == nil { - cv = []types.Output{} + sv = &types.CreateFlow420Exception{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Output - destAddr := &col - if err := awsRestjson1_deserializeDocumentOutput(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "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_deserializeDocument__listOfReservation(v *[]types.Reservation, value interface{}) error { +func awsRestjson1_deserializeDocumentCreateGateway420Exception(v **types.CreateGateway420Exception, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5652,33 +10267,39 @@ func awsRestjson1_deserializeDocument__listOfReservation(v *[]types.Reservation, 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.Reservation + var sv *types.CreateGateway420Exception if *v == nil { - cv = []types.Reservation{} + sv = &types.CreateGateway420Exception{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Reservation - destAddr := &col - if err := awsRestjson1_deserializeDocumentReservation(&destAddr, value); err != nil { - return err + for key, value := range shape { + switch key { + case "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 + } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfSource(v *[]types.Source, value interface{}) error { +func awsRestjson1_deserializeDocumentDestinationConfiguration(v **types.DestinationConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5686,33 +10307,66 @@ func awsRestjson1_deserializeDocument__listOfSource(v *[]types.Source, value int 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.Source + var sv *types.DestinationConfiguration if *v == nil { - cv = []types.Source{} + sv = &types.DestinationConfiguration{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.Source - destAddr := &col - if err := awsRestjson1_deserializeDocumentSource(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "destinationIp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.DestinationIp = ptr.String(jtv) + } + + case "destinationPort": + 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.DestinationPort = int32(i64) + } + + case "interface": + if err := awsRestjson1_deserializeDocumentInterface(&sv.Interface, value); err != nil { + return err + } + + case "outboundIp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.OutboundIp = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__listOfVpcInterface(v *[]types.VpcInterface, value interface{}) error { +func awsRestjson1_deserializeDocumentEgressGatewayBridge(v **types.EgressGatewayBridge, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5720,33 +10374,52 @@ func awsRestjson1_deserializeDocument__listOfVpcInterface(v *[]types.VpcInterfac 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.VpcInterface + var sv *types.EgressGatewayBridge if *v == nil { - cv = []types.VpcInterface{} + sv = &types.EgressGatewayBridge{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.VpcInterface - destAddr := &col - if err := awsRestjson1_deserializeDocumentVpcInterface(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "instanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + case "maxBitrate": + 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.MaxBitrate = int32(i64) + } + + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocument__mapOf__string(v *map[string]string, value interface{}) error { +func awsRestjson1_deserializeDocumentEncodingParameters(v **types.EncodingParameters, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5759,30 +10432,68 @@ func awsRestjson1_deserializeDocument__mapOf__string(v *map[string]string, value return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]string + var sv *types.EncodingParameters if *v == nil { - mv = map[string]string{} + sv = &types.EncodingParameters{} } else { - mv = *v + sv = *v } for key, value := range shape { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) + switch key { + case "compressionFactor": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CompressionFactor = f64 + + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) + + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) + + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) + + } + sv.CompressionFactor = f64 + + default: + return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + + } } - parsedVal = jtv - } - mv[key] = parsedVal + case "encoderProfile": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EncoderProfile to be of type string, got %T instead", value) + } + sv.EncoderProfile = types.EncoderProfile(jtv) + } + + default: + _, _ = key, value + + } } - *v = mv + *v = sv return nil } -func awsRestjson1_deserializeDocumentAddFlowOutputs420Exception(v **types.AddFlowOutputs420Exception, value interface{}) error { +func awsRestjson1_deserializeDocumentEncryption(v **types.Encryption, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5795,22 +10506,94 @@ func awsRestjson1_deserializeDocumentAddFlowOutputs420Exception(v **types.AddFlo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AddFlowOutputs420Exception + var sv *types.Encryption if *v == nil { - sv = &types.AddFlowOutputs420Exception{} + sv = &types.Encryption{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "algorithm": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Algorithm to be of type string, got %T instead", value) + } + sv.Algorithm = types.Algorithm(jtv) + } + + case "constantInitializationVector": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ConstantInitializationVector = ptr.String(jtv) + } + + case "deviceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.DeviceId = ptr.String(jtv) + } + + case "keyType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected KeyType to be of type string, got %T instead", value) + } + sv.KeyType = types.KeyType(jtv) + } + + case "region": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Region = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "roleArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.RoleArn = ptr.String(jtv) + } + + case "secretArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.SecretArn = ptr.String(jtv) + } + + case "url": 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.Url = ptr.String(jtv) } default: @@ -5822,7 +10605,7 @@ func awsRestjson1_deserializeDocumentAddFlowOutputs420Exception(v **types.AddFlo return nil } -func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestException, value interface{}) error { +func awsRestjson1_deserializeDocumentEntitlement(v **types.Entitlement, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5835,62 +10618,72 @@ func awsRestjson1_deserializeDocumentBadRequestException(v **types.BadRequestExc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BadRequestException + var sv *types.Entitlement if *v == nil { - sv = &types.BadRequestException{} + sv = &types.Entitlement{} } else { sv = *v } for key, value := range shape { switch key { - case "message": + case "dataTransferSubscriberFeePercent": + 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.DataTransferSubscriberFeePercent = int32(i64) + } + + case "description": 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.Description = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentCreateFlow420Exception(v **types.CreateFlow420Exception, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case "encryption": + if err := awsRestjson1_deserializeDocumentEncryption(&sv.Encryption, value); err != nil { + return err + } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + case "entitlementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.EntitlementArn = ptr.String(jtv) + } - var sv *types.CreateFlow420Exception - if *v == nil { - sv = &types.CreateFlow420Exception{} - } else { - sv = *v - } + case "entitlementStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntitlementStatus to be of type string, got %T instead", value) + } + sv.EntitlementStatus = types.EntitlementStatus(jtv) + } - for key, value := range shape { - switch key { - case "message": + 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.Message = ptr.String(jtv) + sv.Name = ptr.String(jtv) + } + + case "subscribers": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.Subscribers, value); err != nil { + return err } default: @@ -5902,7 +10695,7 @@ func awsRestjson1_deserializeDocumentCreateFlow420Exception(v **types.CreateFlow return nil } -func awsRestjson1_deserializeDocumentDestinationConfiguration(v **types.DestinationConfiguration, value interface{}) error { +func awsRestjson1_deserializeDocumentFailoverConfig(v **types.FailoverConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5915,25 +10708,25 @@ func awsRestjson1_deserializeDocumentDestinationConfiguration(v **types.Destinat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DestinationConfiguration + var sv *types.FailoverConfig if *v == nil { - sv = &types.DestinationConfiguration{} + sv = &types.FailoverConfig{} } else { sv = *v } for key, value := range shape { switch key { - case "destinationIp": + case "failoverMode": 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 FailoverMode to be of type string, got %T instead", value) } - sv.DestinationIp = ptr.String(jtv) + sv.FailoverMode = types.FailoverMode(jtv) } - case "destinationPort": + case "recoveryWindow": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -5943,21 +10736,21 @@ func awsRestjson1_deserializeDocumentDestinationConfiguration(v **types.Destinat if err != nil { return err } - sv.DestinationPort = int32(i64) + sv.RecoveryWindow = int32(i64) } - case "interface": - if err := awsRestjson1_deserializeDocumentInterface(&sv.Interface, value); err != nil { + case "sourcePriority": + if err := awsRestjson1_deserializeDocumentSourcePriority(&sv.SourcePriority, value); err != nil { return err } - case "outboundIp": + case "state": 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 State to be of type string, got %T instead", value) } - sv.OutboundIp = ptr.String(jtv) + sv.State = types.State(jtv) } default: @@ -5969,7 +10762,7 @@ func awsRestjson1_deserializeDocumentDestinationConfiguration(v **types.Destinat return nil } -func awsRestjson1_deserializeDocumentEncodingParameters(v **types.EncodingParameters, value interface{}) error { +func awsRestjson1_deserializeDocumentFlow(v **types.Flow, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5982,56 +10775,107 @@ func awsRestjson1_deserializeDocumentEncodingParameters(v **types.EncodingParame return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EncodingParameters + var sv *types.Flow if *v == nil { - sv = &types.EncodingParameters{} + sv = &types.Flow{} } else { sv = *v } for key, value := range shape { switch key { - case "compressionFactor": + case "availabilityZone": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CompressionFactor = f64 + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.AvailabilityZone = ptr.String(jtv) + } - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) + case "egressIp": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.EgressIp = ptr.String(jtv) + } - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + case "entitlements": + if err := awsRestjson1_deserializeDocument__listOfEntitlement(&sv.Entitlements, value); err != nil { + return err + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + case "flowArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.FlowArn = ptr.String(jtv) + } - } - sv.CompressionFactor = f64 + case "maintenance": + if err := awsRestjson1_deserializeDocumentMaintenance(&sv.Maintenance, value); err != nil { + return err + } - default: - return fmt.Errorf("expected __double to be a JSON Number, got %T instead", value) + case "mediaStreams": + if err := awsRestjson1_deserializeDocument__listOfMediaStream(&sv.MediaStreams, value); err != nil { + return err + } + 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 "encoderProfile": + case "outputs": + if err := awsRestjson1_deserializeDocument__listOfOutput(&sv.Outputs, value); err != nil { + return err + } + + case "source": + if err := awsRestjson1_deserializeDocumentSource(&sv.Source, value); err != nil { + return err + } + + case "sourceFailoverConfig": + if err := awsRestjson1_deserializeDocumentFailoverConfig(&sv.SourceFailoverConfig, value); err != nil { + return err + } + + case "sources": + if err := awsRestjson1_deserializeDocument__listOfSource(&sv.Sources, value); err != nil { + return err + } + + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EncoderProfile to be of type string, got %T instead", value) + return fmt.Errorf("expected Status to be of type string, got %T instead", value) } - sv.EncoderProfile = types.EncoderProfile(jtv) + sv.Status = types.Status(jtv) + } + + case "vpcInterfaces": + if err := awsRestjson1_deserializeDocument__listOfVpcInterface(&sv.VpcInterfaces, value); err != nil { + return err } default: @@ -6043,7 +10887,7 @@ func awsRestjson1_deserializeDocumentEncodingParameters(v **types.EncodingParame return nil } -func awsRestjson1_deserializeDocumentEncryption(v **types.Encryption, value interface{}) error { +func awsRestjson1_deserializeDocumentFmtp(v **types.Fmtp, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6056,94 +10900,76 @@ func awsRestjson1_deserializeDocumentEncryption(v **types.Encryption, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Encryption + var sv *types.Fmtp if *v == nil { - sv = &types.Encryption{} + sv = &types.Fmtp{} } else { sv = *v } for key, value := range shape { switch key { - case "algorithm": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Algorithm to be of type string, got %T instead", value) - } - sv.Algorithm = types.Algorithm(jtv) - } - - case "constantInitializationVector": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.ConstantInitializationVector = ptr.String(jtv) - } - - case "deviceId": + case "channelOrder": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.DeviceId = ptr.String(jtv) + sv.ChannelOrder = ptr.String(jtv) } - case "keyType": + case "colorimetry": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected KeyType to be of type string, got %T instead", value) + return fmt.Errorf("expected Colorimetry to be of type string, got %T instead", value) } - sv.KeyType = types.KeyType(jtv) + sv.Colorimetry = types.Colorimetry(jtv) } - case "region": + case "exactFramerate": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.Region = ptr.String(jtv) + sv.ExactFramerate = ptr.String(jtv) } - case "resourceId": + case "par": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.ResourceId = ptr.String(jtv) + sv.Par = ptr.String(jtv) } - case "roleArn": + case "range": 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 Range to be of type string, got %T instead", value) } - sv.RoleArn = ptr.String(jtv) + sv.Range = types.Range(jtv) } - case "secretArn": + case "scanMode": 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 ScanMode to be of type string, got %T instead", value) } - sv.SecretArn = ptr.String(jtv) + sv.ScanMode = types.ScanMode(jtv) } - case "url": + case "tcs": 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 Tcs to be of type string, got %T instead", value) } - sv.Url = ptr.String(jtv) + sv.Tcs = types.Tcs(jtv) } default: @@ -6155,7 +10981,7 @@ func awsRestjson1_deserializeDocumentEncryption(v **types.Encryption, value inte return nil } -func awsRestjson1_deserializeDocumentEntitlement(v **types.Entitlement, value interface{}) error { +func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6168,58 +10994,81 @@ func awsRestjson1_deserializeDocumentEntitlement(v **types.Entitlement, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Entitlement + var sv *types.ForbiddenException if *v == nil { - sv = &types.Entitlement{} + sv = &types.ForbiddenException{} } else { sv = *v } for key, value := range shape { switch key { - case "dataTransferSubscriberFeePercent": - 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.DataTransferSubscriberFeePercent = int32(i64) - } - - case "description": + case "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.Description = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "encryption": - if err := awsRestjson1_deserializeDocumentEncryption(&sv.Encryption, value); err != nil { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentGateway(v **types.Gateway, 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.Gateway + if *v == nil { + sv = &types.Gateway{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "egressCidrBlocks": + if err := awsRestjson1_deserializeDocument__listOf__string(&sv.EgressCidrBlocks, value); err != nil { return err } - case "entitlementArn": + case "gatewayArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.EntitlementArn = ptr.String(jtv) + sv.GatewayArn = ptr.String(jtv) } - case "entitlementStatus": + case "gatewayMessages": + if err := awsRestjson1_deserializeDocument__listOfMessageDetail(&sv.GatewayMessages, value); err != nil { + return err + } + + case "gatewayState": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntitlementStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected GatewayState to be of type string, got %T instead", value) } - sv.EntitlementStatus = types.EntitlementStatus(jtv) + sv.GatewayState = types.GatewayState(jtv) } case "name": @@ -6231,8 +11080,8 @@ func awsRestjson1_deserializeDocumentEntitlement(v **types.Entitlement, value in sv.Name = ptr.String(jtv) } - case "subscribers": - if err := awsRestjson1_deserializeDocument__listOf__string(&sv.Subscribers, value); err != nil { + case "networks": + if err := awsRestjson1_deserializeDocument__listOfGatewayNetwork(&sv.Networks, value); err != nil { return err } @@ -6245,7 +11094,7 @@ func awsRestjson1_deserializeDocumentEntitlement(v **types.Entitlement, value in return nil } -func awsRestjson1_deserializeDocumentFailoverConfig(v **types.FailoverConfig, value interface{}) error { +func awsRestjson1_deserializeDocumentGatewayBridgeSource(v **types.GatewayBridgeSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6258,51 +11107,29 @@ func awsRestjson1_deserializeDocumentFailoverConfig(v **types.FailoverConfig, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.FailoverConfig + var sv *types.GatewayBridgeSource if *v == nil { - sv = &types.FailoverConfig{} + sv = &types.GatewayBridgeSource{} } else { sv = *v } for key, value := range shape { switch key { - case "failoverMode": + case "bridgeArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FailoverMode to be of type string, got %T instead", value) - } - sv.FailoverMode = types.FailoverMode(jtv) - } - - case "recoveryWindow": - 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 + return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.RecoveryWindow = int32(i64) + sv.BridgeArn = ptr.String(jtv) } - case "sourcePriority": - if err := awsRestjson1_deserializeDocumentSourcePriority(&sv.SourcePriority, value); err != nil { + case "vpcInterfaceAttachment": + if err := awsRestjson1_deserializeDocumentVpcInterfaceAttachment(&sv.VpcInterfaceAttachment, value); err != nil { return err } - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected State to be of type string, got %T instead", value) - } - sv.State = types.State(jtv) - } - default: _, _ = key, value @@ -6312,7 +11139,7 @@ func awsRestjson1_deserializeDocumentFailoverConfig(v **types.FailoverConfig, va return nil } -func awsRestjson1_deserializeDocumentFlow(v **types.Flow, value interface{}) error { +func awsRestjson1_deserializeDocumentGatewayInstance(v **types.GatewayInstance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6325,107 +11152,85 @@ func awsRestjson1_deserializeDocumentFlow(v **types.Flow, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Flow + var sv *types.GatewayInstance if *v == nil { - sv = &types.Flow{} + sv = &types.GatewayInstance{} } else { sv = *v } for key, value := range shape { switch key { - case "availabilityZone": + case "bridgePlacement": 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 BridgePlacement to be of type string, got %T instead", value) } - sv.AvailabilityZone = ptr.String(jtv) + sv.BridgePlacement = types.BridgePlacement(jtv) } - case "description": + case "connectionStatus": 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 ConnectionStatus to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.ConnectionStatus = types.ConnectionStatus(jtv) } - case "egressIp": + case "gatewayArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.EgressIp = ptr.String(jtv) - } - - case "entitlements": - if err := awsRestjson1_deserializeDocument__listOfEntitlement(&sv.Entitlements, value); err != nil { - return err + sv.GatewayArn = ptr.String(jtv) } - case "flowArn": + case "gatewayInstanceArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.FlowArn = ptr.String(jtv) - } - - case "maintenance": - if err := awsRestjson1_deserializeDocumentMaintenance(&sv.Maintenance, value); err != nil { - return err - } - - case "mediaStreams": - if err := awsRestjson1_deserializeDocument__listOfMediaStream(&sv.MediaStreams, value); err != nil { - return err + sv.GatewayInstanceArn = ptr.String(jtv) } - case "name": + case "instanceId": 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 "outputs": - if err := awsRestjson1_deserializeDocument__listOfOutput(&sv.Outputs, value); err != nil { - return err - } - - case "source": - if err := awsRestjson1_deserializeDocumentSource(&sv.Source, value); err != nil { - return err + sv.InstanceId = ptr.String(jtv) } - case "sourceFailoverConfig": - if err := awsRestjson1_deserializeDocumentFailoverConfig(&sv.SourceFailoverConfig, value); err != nil { - return err - } - - case "sources": - if err := awsRestjson1_deserializeDocument__listOfSource(&sv.Sources, value); err != nil { + case "instanceMessages": + if err := awsRestjson1_deserializeDocument__listOfMessageDetail(&sv.InstanceMessages, value); err != nil { return err } - case "status": + case "instanceState": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Status to be of type string, got %T instead", value) + return fmt.Errorf("expected InstanceState to be of type string, got %T instead", value) } - sv.Status = types.Status(jtv) + sv.InstanceState = types.InstanceState(jtv) } - case "vpcInterfaces": - if err := awsRestjson1_deserializeDocument__listOfVpcInterface(&sv.VpcInterfaces, value); err != nil { - return err + case "runningBridgeCount": + 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.RunningBridgeCount = int32(i64) } default: @@ -6437,7 +11242,7 @@ func awsRestjson1_deserializeDocumentFlow(v **types.Flow, value interface{}) err return nil } -func awsRestjson1_deserializeDocumentFmtp(v **types.Fmtp, value interface{}) error { +func awsRestjson1_deserializeDocumentGatewayNetwork(v **types.GatewayNetwork, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6450,76 +11255,31 @@ func awsRestjson1_deserializeDocumentFmtp(v **types.Fmtp, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Fmtp + var sv *types.GatewayNetwork if *v == nil { - sv = &types.Fmtp{} + sv = &types.GatewayNetwork{} } else { sv = *v } for key, value := range shape { switch key { - case "channelOrder": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected __string to be of type string, got %T instead", value) - } - sv.ChannelOrder = ptr.String(jtv) - } - - case "colorimetry": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Colorimetry to be of type string, got %T instead", value) - } - sv.Colorimetry = types.Colorimetry(jtv) - } - - case "exactFramerate": + case "cidrBlock": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected __string to be of type string, got %T instead", value) } - sv.ExactFramerate = ptr.String(jtv) + sv.CidrBlock = ptr.String(jtv) } - case "par": + 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.Par = ptr.String(jtv) - } - - case "range": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Range to be of type string, got %T instead", value) - } - sv.Range = types.Range(jtv) - } - - case "scanMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ScanMode to be of type string, got %T instead", value) - } - sv.ScanMode = types.ScanMode(jtv) - } - - case "tcs": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Tcs to be of type string, got %T instead", value) - } - sv.Tcs = types.Tcs(jtv) + sv.Name = ptr.String(jtv) } default: @@ -6531,7 +11291,7 @@ func awsRestjson1_deserializeDocumentFmtp(v **types.Fmtp, value interface{}) err return nil } -func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenException, value interface{}) error { +func awsRestjson1_deserializeDocumentGrantFlowEntitlements420Exception(v **types.GrantFlowEntitlements420Exception, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6544,9 +11304,9 @@ func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenExcep return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ForbiddenException + var sv *types.GrantFlowEntitlements420Exception if *v == nil { - sv = &types.ForbiddenException{} + sv = &types.GrantFlowEntitlements420Exception{} } else { sv = *v } @@ -6571,7 +11331,7 @@ func awsRestjson1_deserializeDocumentForbiddenException(v **types.ForbiddenExcep return nil } -func awsRestjson1_deserializeDocumentGrantFlowEntitlements420Exception(v **types.GrantFlowEntitlements420Exception, value interface{}) error { +func awsRestjson1_deserializeDocumentIngressGatewayBridge(v **types.IngressGatewayBridge, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6584,22 +11344,48 @@ func awsRestjson1_deserializeDocumentGrantFlowEntitlements420Exception(v **types return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.GrantFlowEntitlements420Exception + var sv *types.IngressGatewayBridge if *v == nil { - sv = &types.GrantFlowEntitlements420Exception{} + sv = &types.IngressGatewayBridge{} } else { sv = *v } - for key, value := range shape { - switch key { - case "message": + for key, value := range shape { + switch key { + case "instanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "maxBitrate": + 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.MaxBitrate = int32(i64) + } + + case "maxOutputs": 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 __integer to be json.Number, got %T instead", value) } - sv.Message = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.MaxOutputs = int32(i64) } default: @@ -6749,6 +11535,82 @@ func awsRestjson1_deserializeDocumentInternalServerErrorException(v **types.Inte return nil } +func awsRestjson1_deserializeDocumentListedBridge(v **types.ListedBridge, 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.ListedBridge + if *v == nil { + sv = &types.ListedBridge{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "bridgeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.BridgeArn = ptr.String(jtv) + } + + case "bridgeState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BridgeState to be of type string, got %T instead", value) + } + sv.BridgeState = types.BridgeState(jtv) + } + + case "bridgeType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.BridgeType = ptr.String(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 "placementArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.PlacementArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentListedEntitlement(v **types.ListedEntitlement, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6901,6 +11763,131 @@ func awsRestjson1_deserializeDocumentListedFlow(v **types.ListedFlow, value inte return nil } +func awsRestjson1_deserializeDocumentListedGateway(v **types.ListedGateway, 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.ListedGateway + if *v == nil { + sv = &types.ListedGateway{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "gatewayArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.GatewayArn = ptr.String(jtv) + } + + case "gatewayState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GatewayState to be of type string, got %T instead", value) + } + sv.GatewayState = types.GatewayState(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) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentListedGatewayInstance(v **types.ListedGatewayInstance, 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.ListedGatewayInstance + if *v == nil { + sv = &types.ListedGatewayInstance{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "gatewayArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.GatewayArn = ptr.String(jtv) + } + + case "gatewayInstanceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.GatewayInstanceArn = ptr.String(jtv) + } + + case "instanceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.InstanceId = ptr.String(jtv) + } + + case "instanceState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceState to be of type string, got %T instead", value) + } + sv.InstanceState = types.InstanceState(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMaintenance(v **types.Maintenance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7237,6 +12224,64 @@ func awsRestjson1_deserializeDocumentMediaStreamSourceConfiguration(v **types.Me return nil } +func awsRestjson1_deserializeDocumentMessageDetail(v **types.MessageDetail, 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.MessageDetail + if *v == nil { + sv = &types.MessageDetail{} + } 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 __string to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } + + case "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) + } + + case "resourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.ResourceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentMessages(v **types.Messages, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7438,6 +12483,20 @@ func awsRestjson1_deserializeDocumentOutput(v **types.Output, value interface{}) for key, value := range shape { switch key { + case "bridgeArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected __string to be of type string, got %T instead", value) + } + sv.BridgeArn = ptr.String(jtv) + } + + case "bridgePorts": + if err := awsRestjson1_deserializeDocument__listOf__integer(&sv.BridgePorts, value); err != nil { + return err + } + case "dataTransferSubscriberFeePercent": if value != nil { jtv, ok := value.(json.Number) @@ -7855,6 +12914,11 @@ func awsRestjson1_deserializeDocumentSource(v **types.Source, value interface{}) sv.EntitlementArn = ptr.String(jtv) } + case "gatewayBridgeSource": + if err := awsRestjson1_deserializeDocumentGatewayBridgeSource(&sv.GatewayBridgeSource, value); err != nil { + return err + } + case "ingestIp": if value != nil { jtv, ok := value.(string) diff --git a/service/mediaconnect/generated.json b/service/mediaconnect/generated.json index e86d244b4b0..64b4b11baa8 100644 --- a/service/mediaconnect/generated.json +++ b/service/mediaconnect/generated.json @@ -9,22 +9,37 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AddBridgeOutputs.go", + "api_op_AddBridgeSources.go", "api_op_AddFlowMediaStreams.go", "api_op_AddFlowOutputs.go", "api_op_AddFlowSources.go", "api_op_AddFlowVpcInterfaces.go", + "api_op_CreateBridge.go", "api_op_CreateFlow.go", + "api_op_CreateGateway.go", + "api_op_DeleteBridge.go", "api_op_DeleteFlow.go", + "api_op_DeleteGateway.go", + "api_op_DeregisterGatewayInstance.go", + "api_op_DescribeBridge.go", "api_op_DescribeFlow.go", + "api_op_DescribeGateway.go", + "api_op_DescribeGatewayInstance.go", "api_op_DescribeOffering.go", "api_op_DescribeReservation.go", "api_op_GrantFlowEntitlements.go", + "api_op_ListBridges.go", "api_op_ListEntitlements.go", "api_op_ListFlows.go", + "api_op_ListGatewayInstances.go", + "api_op_ListGateways.go", "api_op_ListOfferings.go", "api_op_ListReservations.go", "api_op_ListTagsForResource.go", "api_op_PurchaseOffering.go", + "api_op_RemoveBridgeOutput.go", + "api_op_RemoveBridgeSource.go", "api_op_RemoveFlowMediaStream.go", "api_op_RemoveFlowOutput.go", "api_op_RemoveFlowSource.go", @@ -34,11 +49,16 @@ "api_op_StopFlow.go", "api_op_TagResource.go", "api_op_UntagResource.go", + "api_op_UpdateBridge.go", + "api_op_UpdateBridgeOutput.go", + "api_op_UpdateBridgeSource.go", + "api_op_UpdateBridgeState.go", "api_op_UpdateFlow.go", "api_op_UpdateFlowEntitlement.go", "api_op_UpdateFlowMediaStream.go", "api_op_UpdateFlowOutput.go", "api_op_UpdateFlowSource.go", + "api_op_UpdateGatewayInstance.go", "deserializers.go", "doc.go", "endpoints.go", diff --git a/service/mediaconnect/serializers.go b/service/mediaconnect/serializers.go index fb06ed38d03..452cb3bb5a0 100644 --- a/service/mediaconnect/serializers.go +++ b/service/mediaconnect/serializers.go @@ -15,6 +15,172 @@ import ( "math" ) +type awsRestjson1_serializeOpAddBridgeOutputs struct { +} + +func (*awsRestjson1_serializeOpAddBridgeOutputs) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAddBridgeOutputs) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*AddBridgeOutputsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}/outputs") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAddBridgeOutputsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAddBridgeOutputsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAddBridgeOutputsInput(v *AddBridgeOutputsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} + } + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAddBridgeOutputsInput(v *AddBridgeOutputsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Outputs != nil { + ok := object.Key("outputs") + if err := awsRestjson1_serializeDocument__listOfAddBridgeOutputRequest(v.Outputs, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpAddBridgeSources struct { +} + +func (*awsRestjson1_serializeOpAddBridgeSources) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAddBridgeSources) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*AddBridgeSourcesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}/sources") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsAddBridgeSourcesInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAddBridgeSourcesInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsAddBridgeSourcesInput(v *AddBridgeSourcesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} + } + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAddBridgeSourcesInput(v *AddBridgeSourcesInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Sources != nil { + ok := object.Key("sources") + if err := awsRestjson1_serializeDocument__listOfAddBridgeSourceRequest(v.Sources, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpAddFlowMediaStreams struct { } @@ -347,6 +513,114 @@ func awsRestjson1_serializeOpDocumentAddFlowVpcInterfacesInput(v *AddFlowVpcInte return nil } +type awsRestjson1_serializeOpCreateBridge struct { +} + +func (*awsRestjson1_serializeOpCreateBridge) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateBridge) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*CreateBridgeInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/bridges") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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_serializeOpDocumentCreateBridgeInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsCreateBridgeInput(v *CreateBridgeInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateBridgeInput(v *CreateBridgeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EgressGatewayBridge != nil { + ok := object.Key("egressGatewayBridge") + if err := awsRestjson1_serializeDocumentAddEgressGatewayBridgeRequest(v.EgressGatewayBridge, ok); err != nil { + return err + } + } + + if v.IngressGatewayBridge != nil { + ok := object.Key("ingressGatewayBridge") + if err := awsRestjson1_serializeDocumentAddIngressGatewayBridgeRequest(v.IngressGatewayBridge, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Outputs != nil { + ok := object.Key("outputs") + if err := awsRestjson1_serializeDocument__listOfAddBridgeOutputRequest(v.Outputs, ok); err != nil { + return err + } + } + + if v.PlacementArn != nil { + ok := object.Key("placementArn") + ok.String(*v.PlacementArn) + } + + if v.SourceFailoverConfig != nil { + ok := object.Key("sourceFailoverConfig") + if err := awsRestjson1_serializeDocumentFailoverConfig(v.SourceFailoverConfig, ok); err != nil { + return err + } + } + + if v.Sources != nil { + ok := object.Key("sources") + if err := awsRestjson1_serializeDocument__listOfAddBridgeSourceRequest(v.Sources, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpCreateFlow struct { } @@ -476,14 +750,14 @@ func awsRestjson1_serializeOpDocumentCreateFlowInput(v *CreateFlowInput, value s return nil } -type awsRestjson1_serializeOpDeleteFlow struct { +type awsRestjson1_serializeOpCreateGateway struct { } -func (*awsRestjson1_serializeOpDeleteFlow) ID() string { +func (*awsRestjson1_serializeOpCreateGateway) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDeleteFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpCreateGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -491,22 +765,29 @@ func (m *awsRestjson1_serializeOpDeleteFlow) HandleSerialize(ctx context.Context return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DeleteFlowInput) + input, ok := in.Parameters.(*CreateGatewayInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/gateways") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDeleteFlowInput(input, restEncoder); err != nil { + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateGatewayInput(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} } @@ -517,31 +798,48 @@ func (m *awsRestjson1_serializeOpDeleteFlow) HandleSerialize(ctx context.Context return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDeleteFlowInput(v *DeleteFlowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsCreateGatewayInput(v *CreateGatewayInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.FlowArn == nil || len(*v.FlowArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} - } - if v.FlowArn != nil { - if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { - return err - } - } - return nil } -type awsRestjson1_serializeOpDescribeFlow struct { -} +func awsRestjson1_serializeOpDocumentCreateGatewayInput(v *CreateGatewayInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() -func (*awsRestjson1_serializeOpDescribeFlow) ID() string { + if v.EgressCidrBlocks != nil { + ok := object.Key("egressCidrBlocks") + if err := awsRestjson1_serializeDocument__listOf__string(v.EgressCidrBlocks, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.Networks != nil { + ok := object.Key("networks") + if err := awsRestjson1_serializeDocument__listOfGatewayNetwork(v.Networks, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteBridge struct { +} + +func (*awsRestjson1_serializeOpDeleteBridge) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteBridge) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -549,22 +847,22 @@ func (m *awsRestjson1_serializeOpDescribeFlow) HandleSerialize(ctx context.Conte return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeFlowInput) + input, ok := in.Parameters.(*DeleteBridgeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeFlowInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteBridgeInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -575,16 +873,16 @@ func (m *awsRestjson1_serializeOpDescribeFlow) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeFlowInput(v *DescribeFlowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteBridgeInput(v *DeleteBridgeInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.FlowArn == nil || len(*v.FlowArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} } - if v.FlowArn != nil { - if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { return err } } @@ -592,14 +890,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeFlowInput(v *DescribeFlowInput, return nil } -type awsRestjson1_serializeOpDescribeOffering struct { +type awsRestjson1_serializeOpDeleteFlow struct { } -func (*awsRestjson1_serializeOpDescribeOffering) ID() string { +func (*awsRestjson1_serializeOpDeleteFlow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -607,22 +905,22 @@ func (m *awsRestjson1_serializeOpDescribeOffering) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeOfferingInput) + input, ok := in.Parameters.(*DeleteFlowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/offerings/{OfferingArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeOfferingInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteFlowInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -633,16 +931,16 @@ func (m *awsRestjson1_serializeOpDescribeOffering) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeOfferingInput(v *DescribeOfferingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteFlowInput(v *DeleteFlowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.OfferingArn == nil || len(*v.OfferingArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member OfferingArn must not be empty")} + if v.FlowArn == nil || len(*v.FlowArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} } - if v.OfferingArn != nil { - if err := encoder.SetURI("OfferingArn").String(*v.OfferingArn); err != nil { + if v.FlowArn != nil { + if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { return err } } @@ -650,14 +948,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeOfferingInput(v *DescribeOfferi return nil } -type awsRestjson1_serializeOpDescribeReservation struct { +type awsRestjson1_serializeOpDeleteGateway struct { } -func (*awsRestjson1_serializeOpDescribeReservation) ID() string { +func (*awsRestjson1_serializeOpDeleteGateway) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpDescribeReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeleteGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -665,22 +963,22 @@ func (m *awsRestjson1_serializeOpDescribeReservation) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*DescribeReservationInput) + input, ok := in.Parameters.(*DeleteGatewayInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/reservations/{ReservationArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/gateways/{GatewayArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "GET" + request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsDescribeReservationInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDeleteGatewayInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -691,16 +989,16 @@ func (m *awsRestjson1_serializeOpDescribeReservation) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsDescribeReservationInput(v *DescribeReservationInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeleteGatewayInput(v *DeleteGatewayInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ReservationArn == nil || len(*v.ReservationArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ReservationArn must not be empty")} + if v.GatewayArn == nil || len(*v.GatewayArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GatewayArn must not be empty")} } - if v.ReservationArn != nil { - if err := encoder.SetURI("ReservationArn").String(*v.ReservationArn); err != nil { + if v.GatewayArn != nil { + if err := encoder.SetURI("GatewayArn").String(*v.GatewayArn); err != nil { return err } } @@ -708,14 +1006,14 @@ func awsRestjson1_serializeOpHttpBindingsDescribeReservationInput(v *DescribeRes return nil } -type awsRestjson1_serializeOpGrantFlowEntitlements struct { +type awsRestjson1_serializeOpDeregisterGatewayInstance struct { } -func (*awsRestjson1_serializeOpGrantFlowEntitlements) ID() string { +func (*awsRestjson1_serializeOpDeregisterGatewayInstance) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpGrantFlowEntitlements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDeregisterGatewayInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -723,33 +1021,22 @@ func (m *awsRestjson1_serializeOpGrantFlowEntitlements) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*GrantFlowEntitlementsInput) + input, ok := in.Parameters.(*DeregisterGatewayInstanceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/entitlements") + opPath, opQuery := httpbinding.SplitURI("/v1/gateway-instances/{GatewayInstanceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "DELETE" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsGrantFlowEntitlementsInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentGrantFlowEntitlementsInput(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_serializeOpHttpBindingsDeregisterGatewayInstanceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -760,30 +1047,20 @@ func (m *awsRestjson1_serializeOpGrantFlowEntitlements) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsGrantFlowEntitlementsInput(v *GrantFlowEntitlementsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDeregisterGatewayInstanceInput(v *DeregisterGatewayInstanceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.FlowArn == nil || len(*v.FlowArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} - } - if v.FlowArn != nil { - if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { - return err - } + if v.Force { + encoder.SetQuery("force").Boolean(v.Force) } - return nil -} - -func awsRestjson1_serializeOpDocumentGrantFlowEntitlementsInput(v *GrantFlowEntitlementsInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Entitlements != nil { - ok := object.Key("entitlements") - if err := awsRestjson1_serializeDocument__listOfGrantEntitlementRequest(v.Entitlements, ok); err != nil { + if v.GatewayInstanceArn == nil || len(*v.GatewayInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GatewayInstanceArn must not be empty")} + } + if v.GatewayInstanceArn != nil { + if err := encoder.SetURI("GatewayInstanceArn").String(*v.GatewayInstanceArn); err != nil { return err } } @@ -791,14 +1068,14 @@ func awsRestjson1_serializeOpDocumentGrantFlowEntitlementsInput(v *GrantFlowEnti return nil } -type awsRestjson1_serializeOpListEntitlements struct { +type awsRestjson1_serializeOpDescribeBridge struct { } -func (*awsRestjson1_serializeOpListEntitlements) ID() string { +func (*awsRestjson1_serializeOpDescribeBridge) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListEntitlements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeBridge) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -806,13 +1083,13 @@ func (m *awsRestjson1_serializeOpListEntitlements) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListEntitlementsInput) + input, ok := in.Parameters.(*DescribeBridgeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/entitlements") + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -821,7 +1098,7 @@ func (m *awsRestjson1_serializeOpListEntitlements) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListEntitlementsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeBridgeInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -832,30 +1109,31 @@ func (m *awsRestjson1_serializeOpListEntitlements) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListEntitlementsInput(v *ListEntitlementsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeBridgeInput(v *DescribeBridgeInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListFlows struct { +type awsRestjson1_serializeOpDescribeFlow struct { } -func (*awsRestjson1_serializeOpListFlows) ID() string { +func (*awsRestjson1_serializeOpDescribeFlow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListFlows) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -863,13 +1141,13 @@ func (m *awsRestjson1_serializeOpListFlows) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListFlowsInput) + input, ok := in.Parameters.(*DescribeFlowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows") + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -878,7 +1156,7 @@ func (m *awsRestjson1_serializeOpListFlows) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListFlowsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeFlowInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -889,30 +1167,31 @@ func (m *awsRestjson1_serializeOpListFlows) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListFlowsInput(v *ListFlowsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeFlowInput(v *DescribeFlowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.FlowArn == nil || len(*v.FlowArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.FlowArn != nil { + if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListOfferings struct { +type awsRestjson1_serializeOpDescribeGateway struct { } -func (*awsRestjson1_serializeOpListOfferings) ID() string { +func (*awsRestjson1_serializeOpDescribeGateway) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeGateway) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -920,13 +1199,13 @@ func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListOfferingsInput) + input, ok := in.Parameters.(*DescribeGatewayInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/offerings") + opPath, opQuery := httpbinding.SplitURI("/v1/gateways/{GatewayArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -935,7 +1214,7 @@ func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListOfferingsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeGatewayInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -946,30 +1225,31 @@ func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListOfferingsInput(v *ListOfferingsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeGatewayInput(v *DescribeGatewayInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.GatewayArn == nil || len(*v.GatewayArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GatewayArn must not be empty")} } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.GatewayArn != nil { + if err := encoder.SetURI("GatewayArn").String(*v.GatewayArn); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListReservations struct { +type awsRestjson1_serializeOpDescribeGatewayInstance struct { } -func (*awsRestjson1_serializeOpListReservations) ID() string { +func (*awsRestjson1_serializeOpDescribeGatewayInstance) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeGatewayInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -977,13 +1257,13 @@ func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListReservationsInput) + input, ok := in.Parameters.(*DescribeGatewayInstanceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/reservations") + opPath, opQuery := httpbinding.SplitURI("/v1/gateway-instances/{GatewayInstanceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -992,7 +1272,7 @@ func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListReservationsInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeGatewayInstanceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1003,30 +1283,31 @@ func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListReservationsInput(v *ListReservationsInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeGatewayInstanceInput(v *DescribeGatewayInstanceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.MaxResults != 0 { - encoder.SetQuery("maxResults").Integer(v.MaxResults) + if v.GatewayInstanceArn == nil || len(*v.GatewayInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GatewayInstanceArn must not be empty")} } - - if v.NextToken != nil { - encoder.SetQuery("nextToken").String(*v.NextToken) + if v.GatewayInstanceArn != nil { + if err := encoder.SetURI("GatewayInstanceArn").String(*v.GatewayInstanceArn); err != nil { + return err + } } return nil } -type awsRestjson1_serializeOpListTagsForResource struct { +type awsRestjson1_serializeOpDescribeOffering struct { } -func (*awsRestjson1_serializeOpListTagsForResource) ID() string { +func (*awsRestjson1_serializeOpDescribeOffering) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1034,13 +1315,13 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*ListTagsForResourceInput) + input, ok := in.Parameters.(*DescribeOfferingInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/offerings/{OfferingArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "GET" @@ -1049,7 +1330,7 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsDescribeOfferingInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1060,16 +1341,16 @@ func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeOfferingInput(v *DescribeOfferingInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.OfferingArn == nil || len(*v.OfferingArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OfferingArn must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.OfferingArn != nil { + if err := encoder.SetURI("OfferingArn").String(*v.OfferingArn); err != nil { return err } } @@ -1077,14 +1358,14 @@ func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsFor return nil } -type awsRestjson1_serializeOpPurchaseOffering struct { +type awsRestjson1_serializeOpDescribeReservation struct { } -func (*awsRestjson1_serializeOpPurchaseOffering) ID() string { +func (*awsRestjson1_serializeOpDescribeReservation) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpDescribeReservation) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1092,33 +1373,22 @@ func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*PurchaseOfferingInput) + input, ok := in.Parameters.(*DescribeReservationInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/offerings/{OfferingArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/reservations/{ReservationArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "GET" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(input, restEncoder); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - - restEncoder.SetHeader("Content-Type").String("application/json") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsRestjson1_serializeOpDocumentPurchaseOfferingInput(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_serializeOpHttpBindingsDescribeReservationInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1129,16 +1399,16 @@ func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(v *PurchaseOfferingInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsDescribeReservationInput(v *DescribeReservationInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.OfferingArn == nil || len(*v.OfferingArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member OfferingArn must not be empty")} + if v.ReservationArn == nil || len(*v.ReservationArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ReservationArn must not be empty")} } - if v.OfferingArn != nil { - if err := encoder.SetURI("OfferingArn").String(*v.OfferingArn); err != nil { + if v.ReservationArn != nil { + if err := encoder.SetURI("ReservationArn").String(*v.ReservationArn); err != nil { return err } } @@ -1146,31 +1416,14 @@ func awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(v *PurchaseOfferi return nil } -func awsRestjson1_serializeOpDocumentPurchaseOfferingInput(v *PurchaseOfferingInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ReservationName != nil { - ok := object.Key("reservationName") - ok.String(*v.ReservationName) - } - - if v.Start != nil { - ok := object.Key("start") - ok.String(*v.Start) - } - - return nil -} - -type awsRestjson1_serializeOpRemoveFlowMediaStream struct { +type awsRestjson1_serializeOpGrantFlowEntitlements struct { } -func (*awsRestjson1_serializeOpRemoveFlowMediaStream) ID() string { +func (*awsRestjson1_serializeOpGrantFlowEntitlements) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRemoveFlowMediaStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpGrantFlowEntitlements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1178,13 +1431,915 @@ func (m *awsRestjson1_serializeOpRemoveFlowMediaStream) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RemoveFlowMediaStreamInput) + input, ok := in.Parameters.(*GrantFlowEntitlementsInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/mediaStreams/{MediaStreamName}") + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/entitlements") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGrantFlowEntitlementsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentGrantFlowEntitlementsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsGrantFlowEntitlementsInput(v *GrantFlowEntitlementsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FlowArn == nil || len(*v.FlowArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} + } + if v.FlowArn != nil { + if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentGrantFlowEntitlementsInput(v *GrantFlowEntitlementsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Entitlements != nil { + ok := object.Key("entitlements") + if err := awsRestjson1_serializeDocument__listOfGrantEntitlementRequest(v.Entitlements, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpListBridges struct { +} + +func (*awsRestjson1_serializeOpListBridges) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListBridges) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListBridgesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/bridges") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListBridgesInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListBridgesInput(v *ListBridgesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FilterArn != nil { + encoder.SetQuery("filterArn").String(*v.FilterArn) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListEntitlements struct { +} + +func (*awsRestjson1_serializeOpListEntitlements) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListEntitlements) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListEntitlementsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/entitlements") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListEntitlementsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListEntitlementsInput(v *ListEntitlementsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListFlows struct { +} + +func (*awsRestjson1_serializeOpListFlows) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListFlows) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListFlowsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/flows") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListFlowsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListFlowsInput(v *ListFlowsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListGatewayInstances struct { +} + +func (*awsRestjson1_serializeOpListGatewayInstances) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListGatewayInstances) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListGatewayInstancesInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/gateway-instances") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListGatewayInstancesInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListGatewayInstancesInput(v *ListGatewayInstancesInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FilterArn != nil { + encoder.SetQuery("filterArn").String(*v.FilterArn) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListGateways struct { +} + +func (*awsRestjson1_serializeOpListGateways) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListGateways) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListGatewaysInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/gateways") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListGatewaysInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListGatewaysInput(v *ListGatewaysInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListOfferings struct { +} + +func (*awsRestjson1_serializeOpListOfferings) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListOfferings) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListOfferingsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/offerings") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListOfferingsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListOfferingsInput(v *ListOfferingsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListReservations struct { +} + +func (*awsRestjson1_serializeOpListReservations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListReservations) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*ListReservationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/reservations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListReservationsInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListReservationsInput(v *ListReservationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.MaxResults != 0 { + encoder.SetQuery("maxResults").Integer(v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + 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, +) { + 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/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, 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 + + 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 || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpPurchaseOffering struct { +} + +func (*awsRestjson1_serializeOpPurchaseOffering) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPurchaseOffering) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*PurchaseOfferingInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/offerings/{OfferingArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPurchaseOfferingInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsPurchaseOfferingInput(v *PurchaseOfferingInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.OfferingArn == nil || len(*v.OfferingArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OfferingArn must not be empty")} + } + if v.OfferingArn != nil { + if err := encoder.SetURI("OfferingArn").String(*v.OfferingArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPurchaseOfferingInput(v *PurchaseOfferingInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ReservationName != nil { + ok := object.Key("reservationName") + ok.String(*v.ReservationName) + } + + if v.Start != nil { + ok := object.Key("start") + ok.String(*v.Start) + } + + return nil +} + +type awsRestjson1_serializeOpRemoveBridgeOutput struct { +} + +func (*awsRestjson1_serializeOpRemoveBridgeOutput) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemoveBridgeOutput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*RemoveBridgeOutputInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}/outputs/{OutputName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRemoveBridgeOutputInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRemoveBridgeOutputInput(v *RemoveBridgeOutputInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} + } + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { + return err + } + } + + if v.OutputName == nil || len(*v.OutputName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutputName must not be empty")} + } + if v.OutputName != nil { + if err := encoder.SetURI("OutputName").String(*v.OutputName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpRemoveBridgeSource struct { +} + +func (*awsRestjson1_serializeOpRemoveBridgeSource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemoveBridgeSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*RemoveBridgeSourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}/sources/{SourceName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRemoveBridgeSourceInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRemoveBridgeSourceInput(v *RemoveBridgeSourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} + } + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { + return err + } + } + + if v.SourceName == nil || len(*v.SourceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SourceName must not be empty")} + } + if v.SourceName != nil { + if err := encoder.SetURI("SourceName").String(*v.SourceName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpRemoveFlowMediaStream struct { +} + +func (*awsRestjson1_serializeOpRemoveFlowMediaStream) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemoveFlowMediaStream) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*RemoveFlowMediaStreamInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/mediaStreams/{MediaStreamName}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRemoveFlowMediaStreamInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRemoveFlowMediaStreamInput(v *RemoveFlowMediaStreamInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FlowArn == nil || len(*v.FlowArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} + } + if v.FlowArn != nil { + if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { + return err + } + } + + if v.MediaStreamName == nil || len(*v.MediaStreamName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member MediaStreamName must not be empty")} + } + if v.MediaStreamName != nil { + if err := encoder.SetURI("MediaStreamName").String(*v.MediaStreamName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpRemoveFlowOutput struct { +} + +func (*awsRestjson1_serializeOpRemoveFlowOutput) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemoveFlowOutput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*RemoveFlowOutputInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/outputs/{OutputArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsRemoveFlowOutputInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsRemoveFlowOutputInput(v *RemoveFlowOutputInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FlowArn == nil || len(*v.FlowArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} + } + if v.FlowArn != nil { + if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { + return err + } + } + + if v.OutputArn == nil || len(*v.OutputArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutputArn must not be empty")} + } + if v.OutputArn != nil { + if err := encoder.SetURI("OutputArn").String(*v.OutputArn); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpRemoveFlowSource struct { +} + +func (*awsRestjson1_serializeOpRemoveFlowSource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRemoveFlowSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*RemoveFlowSourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/source/{SourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -1193,7 +2348,7 @@ func (m *awsRestjson1_serializeOpRemoveFlowMediaStream) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRemoveFlowMediaStreamInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRemoveFlowSourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1204,7 +2359,7 @@ func (m *awsRestjson1_serializeOpRemoveFlowMediaStream) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRemoveFlowMediaStreamInput(v *RemoveFlowMediaStreamInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRemoveFlowSourceInput(v *RemoveFlowSourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1218,11 +2373,11 @@ func awsRestjson1_serializeOpHttpBindingsRemoveFlowMediaStreamInput(v *RemoveFlo } } - if v.MediaStreamName == nil || len(*v.MediaStreamName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member MediaStreamName must not be empty")} + if v.SourceArn == nil || len(*v.SourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SourceArn must not be empty")} } - if v.MediaStreamName != nil { - if err := encoder.SetURI("MediaStreamName").String(*v.MediaStreamName); err != nil { + if v.SourceArn != nil { + if err := encoder.SetURI("SourceArn").String(*v.SourceArn); err != nil { return err } } @@ -1230,14 +2385,14 @@ func awsRestjson1_serializeOpHttpBindingsRemoveFlowMediaStreamInput(v *RemoveFlo return nil } -type awsRestjson1_serializeOpRemoveFlowOutput struct { +type awsRestjson1_serializeOpRemoveFlowVpcInterface struct { } -func (*awsRestjson1_serializeOpRemoveFlowOutput) ID() string { +func (*awsRestjson1_serializeOpRemoveFlowVpcInterface) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRemoveFlowOutput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRemoveFlowVpcInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1245,13 +2400,13 @@ func (m *awsRestjson1_serializeOpRemoveFlowOutput) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RemoveFlowOutputInput) + input, ok := in.Parameters.(*RemoveFlowVpcInterfaceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/outputs/{OutputArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/vpcInterfaces/{VpcInterfaceName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -1260,7 +2415,7 @@ func (m *awsRestjson1_serializeOpRemoveFlowOutput) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRemoveFlowOutputInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRemoveFlowVpcInterfaceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1271,7 +2426,7 @@ func (m *awsRestjson1_serializeOpRemoveFlowOutput) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRemoveFlowOutputInput(v *RemoveFlowOutputInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRemoveFlowVpcInterfaceInput(v *RemoveFlowVpcInterfaceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1285,11 +2440,11 @@ func awsRestjson1_serializeOpHttpBindingsRemoveFlowOutputInput(v *RemoveFlowOutp } } - if v.OutputArn == nil || len(*v.OutputArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member OutputArn must not be empty")} + if v.VpcInterfaceName == nil || len(*v.VpcInterfaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member VpcInterfaceName must not be empty")} } - if v.OutputArn != nil { - if err := encoder.SetURI("OutputArn").String(*v.OutputArn); err != nil { + if v.VpcInterfaceName != nil { + if err := encoder.SetURI("VpcInterfaceName").String(*v.VpcInterfaceName); err != nil { return err } } @@ -1297,14 +2452,14 @@ func awsRestjson1_serializeOpHttpBindingsRemoveFlowOutputInput(v *RemoveFlowOutp return nil } -type awsRestjson1_serializeOpRemoveFlowSource struct { +type awsRestjson1_serializeOpRevokeFlowEntitlement struct { } -func (*awsRestjson1_serializeOpRemoveFlowSource) ID() string { +func (*awsRestjson1_serializeOpRevokeFlowEntitlement) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRemoveFlowSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpRevokeFlowEntitlement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1312,13 +2467,13 @@ func (m *awsRestjson1_serializeOpRemoveFlowSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RemoveFlowSourceInput) + input, ok := in.Parameters.(*RevokeFlowEntitlementInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/source/{SourceArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/entitlements/{EntitlementArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -1327,7 +2482,7 @@ func (m *awsRestjson1_serializeOpRemoveFlowSource) HandleSerialize(ctx context.C return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRemoveFlowSourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsRevokeFlowEntitlementInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1338,11 +2493,20 @@ func (m *awsRestjson1_serializeOpRemoveFlowSource) HandleSerialize(ctx context.C return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRemoveFlowSourceInput(v *RemoveFlowSourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsRevokeFlowEntitlementInput(v *RevokeFlowEntitlementInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } + if v.EntitlementArn == nil || len(*v.EntitlementArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member EntitlementArn must not be empty")} + } + if v.EntitlementArn != nil { + if err := encoder.SetURI("EntitlementArn").String(*v.EntitlementArn); err != nil { + return err + } + } + if v.FlowArn == nil || len(*v.FlowArn) == 0 { return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} } @@ -1352,11 +2516,60 @@ func awsRestjson1_serializeOpHttpBindingsRemoveFlowSourceInput(v *RemoveFlowSour } } - if v.SourceArn == nil || len(*v.SourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member SourceArn must not be empty")} + return nil +} + +type awsRestjson1_serializeOpStartFlow struct { +} + +func (*awsRestjson1_serializeOpStartFlow) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.SourceArn != nil { - if err := encoder.SetURI("SourceArn").String(*v.SourceArn); err != nil { + + input, ok := in.Parameters.(*StartFlowInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/flows/start/{FlowArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsStartFlowInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsStartFlowInput(v *StartFlowInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.FlowArn == nil || len(*v.FlowArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} + } + if v.FlowArn != nil { + if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { return err } } @@ -1364,14 +2577,14 @@ func awsRestjson1_serializeOpHttpBindingsRemoveFlowSourceInput(v *RemoveFlowSour return nil } -type awsRestjson1_serializeOpRemoveFlowVpcInterface struct { +type awsRestjson1_serializeOpStopFlow struct { } -func (*awsRestjson1_serializeOpRemoveFlowVpcInterface) ID() string { +func (*awsRestjson1_serializeOpStopFlow) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRemoveFlowVpcInterface) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpStopFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1379,22 +2592,22 @@ func (m *awsRestjson1_serializeOpRemoveFlowVpcInterface) HandleSerialize(ctx con return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RemoveFlowVpcInterfaceInput) + input, ok := in.Parameters.(*StopFlowInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/{FlowArn}/vpcInterfaces/{VpcInterfaceName}") + opPath, opQuery := httpbinding.SplitURI("/v1/flows/stop/{FlowArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "POST" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRemoveFlowVpcInterfaceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsStopFlowInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1405,7 +2618,7 @@ func (m *awsRestjson1_serializeOpRemoveFlowVpcInterface) HandleSerialize(ctx con return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRemoveFlowVpcInterfaceInput(v *RemoveFlowVpcInterfaceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsStopFlowInput(v *StopFlowInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } @@ -1419,11 +2632,71 @@ func awsRestjson1_serializeOpHttpBindingsRemoveFlowVpcInterfaceInput(v *RemoveFl } } - if v.VpcInterfaceName == nil || len(*v.VpcInterfaceName) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member VpcInterfaceName must not be empty")} + 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, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - if v.VpcInterfaceName != nil { - if err := encoder.SetURI("VpcInterfaceName").String(*v.VpcInterfaceName); err != nil { + + 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/{ResourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); 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 + + 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) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } @@ -1431,14 +2704,28 @@ func awsRestjson1_serializeOpHttpBindingsRemoveFlowVpcInterfaceInput(v *RemoveFl return nil } -type awsRestjson1_serializeOpRevokeFlowEntitlement struct { +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocument__mapOf__string(v.Tags, ok); err != nil { + return err + } + } + + return nil } -func (*awsRestjson1_serializeOpRevokeFlowEntitlement) ID() string { +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpRevokeFlowEntitlement) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1446,13 +2733,13 @@ func (m *awsRestjson1_serializeOpRevokeFlowEntitlement) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*RevokeFlowEntitlementInput) + 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("/v1/flows/{FlowArn}/entitlements/{EntitlementArn}") + opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) request.Method = "DELETE" @@ -1461,7 +2748,7 @@ func (m *awsRestjson1_serializeOpRevokeFlowEntitlement) HandleSerialize(ctx cont return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsRevokeFlowEntitlementInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1472,40 +2759,37 @@ func (m *awsRestjson1_serializeOpRevokeFlowEntitlement) HandleSerialize(ctx cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsRevokeFlowEntitlementInput(v *RevokeFlowEntitlementInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.EntitlementArn == nil || len(*v.EntitlementArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member EntitlementArn must not be empty")} + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} } - if v.EntitlementArn != nil { - if err := encoder.SetURI("EntitlementArn").String(*v.EntitlementArn); err != nil { + if v.ResourceArn != nil { + if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { return err } } - if v.FlowArn == nil || len(*v.FlowArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} - } - if v.FlowArn != nil { - if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { - return err + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) } } return nil } -type awsRestjson1_serializeOpStartFlow struct { +type awsRestjson1_serializeOpUpdateBridge struct { } -func (*awsRestjson1_serializeOpStartFlow) ID() string { +func (*awsRestjson1_serializeOpUpdateBridge) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStartFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateBridge) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1513,22 +2797,33 @@ func (m *awsRestjson1_serializeOpStartFlow) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StartFlowInput) + input, ok := in.Parameters.(*UpdateBridgeInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/start/{FlowArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStartFlowInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateBridgeInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateBridgeInput(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} } @@ -1539,16 +2834,16 @@ func (m *awsRestjson1_serializeOpStartFlow) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStartFlowInput(v *StartFlowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateBridgeInput(v *UpdateBridgeInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.FlowArn == nil || len(*v.FlowArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} } - if v.FlowArn != nil { - if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { return err } } @@ -1556,14 +2851,42 @@ func awsRestjson1_serializeOpHttpBindingsStartFlowInput(v *StartFlowInput, encod return nil } -type awsRestjson1_serializeOpStopFlow struct { +func awsRestjson1_serializeOpDocumentUpdateBridgeInput(v *UpdateBridgeInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.EgressGatewayBridge != nil { + ok := object.Key("egressGatewayBridge") + if err := awsRestjson1_serializeDocumentUpdateEgressGatewayBridgeRequest(v.EgressGatewayBridge, ok); err != nil { + return err + } + } + + if v.IngressGatewayBridge != nil { + ok := object.Key("ingressGatewayBridge") + if err := awsRestjson1_serializeDocumentUpdateIngressGatewayBridgeRequest(v.IngressGatewayBridge, ok); err != nil { + return err + } + } + + if v.SourceFailoverConfig != nil { + ok := object.Key("sourceFailoverConfig") + if err := awsRestjson1_serializeDocumentUpdateFailoverConfig(v.SourceFailoverConfig, ok); err != nil { + return err + } + } + + return nil } -func (*awsRestjson1_serializeOpStopFlow) ID() string { +type awsRestjson1_serializeOpUpdateBridgeOutput struct { +} + +func (*awsRestjson1_serializeOpUpdateBridgeOutput) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpStopFlow) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateBridgeOutput) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1571,22 +2894,33 @@ func (m *awsRestjson1_serializeOpStopFlow) HandleSerialize(ctx context.Context, return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*StopFlowInput) + input, ok := in.Parameters.(*UpdateBridgeOutputInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/v1/flows/stop/{FlowArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}/outputs/{OutputName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsStopFlowInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateBridgeOutputInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateBridgeOutputInput(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} } @@ -1597,16 +2931,25 @@ func (m *awsRestjson1_serializeOpStopFlow) HandleSerialize(ctx context.Context, return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsStopFlowInput(v *StopFlowInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateBridgeOutputInput(v *UpdateBridgeOutputInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.FlowArn == nil || len(*v.FlowArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member FlowArn must not be empty")} + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} } - if v.FlowArn != nil { - if err := encoder.SetURI("FlowArn").String(*v.FlowArn); err != nil { + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { + return err + } + } + + if v.OutputName == nil || len(*v.OutputName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member OutputName must not be empty")} + } + if v.OutputName != nil { + if err := encoder.SetURI("OutputName").String(*v.OutputName); err != nil { return err } } @@ -1614,14 +2957,28 @@ func awsRestjson1_serializeOpHttpBindingsStopFlowInput(v *StopFlowInput, encoder return nil } -type awsRestjson1_serializeOpTagResource struct { +func awsRestjson1_serializeOpDocumentUpdateBridgeOutputInput(v *UpdateBridgeOutputInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NetworkOutput != nil { + ok := object.Key("networkOutput") + if err := awsRestjson1_serializeDocumentUpdateBridgeNetworkOutputRequest(v.NetworkOutput, ok); err != nil { + return err + } + } + + return nil } -func (*awsRestjson1_serializeOpTagResource) ID() string { +type awsRestjson1_serializeOpUpdateBridgeSource struct { +} + +func (*awsRestjson1_serializeOpUpdateBridgeSource) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateBridgeSource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1629,29 +2986,29 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*TagResourceInput) + input, ok := in.Parameters.(*UpdateBridgeSourceInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}/sources/{SourceName}") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "POST" + request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateBridgeSourceInput(input, restEncoder); 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 { + if err := awsRestjson1_serializeOpDocumentUpdateBridgeSourceInput(input, jsonEncoder.Value); err != nil { return out, metadata, &smithy.SerializationError{Err: err} } @@ -1666,16 +3023,25 @@ func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Contex return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateBridgeSourceInput(v *UpdateBridgeSourceInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { + return err + } + } + + if v.SourceName == nil || len(*v.SourceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member SourceName must not be empty")} + } + if v.SourceName != nil { + if err := encoder.SetURI("SourceName").String(*v.SourceName); err != nil { return err } } @@ -1683,13 +3049,20 @@ func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, e return nil } -func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { +func awsRestjson1_serializeOpDocumentUpdateBridgeSourceInput(v *UpdateBridgeSourceInput, value smithyjson.Value) error { object := value.Object() defer object.Close() - if v.Tags != nil { - ok := object.Key("tags") - if err := awsRestjson1_serializeDocument__mapOf__string(v.Tags, ok); err != nil { + if v.FlowSource != nil { + ok := object.Key("flowSource") + if err := awsRestjson1_serializeDocumentUpdateBridgeFlowSourceRequest(v.FlowSource, ok); err != nil { + return err + } + } + + if v.NetworkSource != nil { + ok := object.Key("networkSource") + if err := awsRestjson1_serializeDocumentUpdateBridgeNetworkSourceRequest(v.NetworkSource, ok); err != nil { return err } } @@ -1697,14 +3070,14 @@ func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value return nil } -type awsRestjson1_serializeOpUntagResource struct { +type awsRestjson1_serializeOpUpdateBridgeState struct { } -func (*awsRestjson1_serializeOpUntagResource) ID() string { +func (*awsRestjson1_serializeOpUpdateBridgeState) ID() string { return "OperationSerializer" } -func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( +func (m *awsRestjson1_serializeOpUpdateBridgeState) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( out middleware.SerializeOutput, metadata middleware.Metadata, err error, ) { request, ok := in.Request.(*smithyhttp.Request) @@ -1712,22 +3085,33 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} } - input, ok := in.Parameters.(*UntagResourceInput) + input, ok := in.Parameters.(*UpdateBridgeStateInput) _ = input if !ok { return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} } - opPath, opQuery := httpbinding.SplitURI("/tags/{ResourceArn}") + opPath, opQuery := httpbinding.SplitURI("/v1/bridges/{BridgeArn}/state") request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) - request.Method = "DELETE" + request.Method = "PUT" restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) if err != nil { return out, metadata, &smithy.SerializationError{Err: err} } - if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + if err := awsRestjson1_serializeOpHttpBindingsUpdateBridgeStateInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateBridgeStateInput(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} } @@ -1738,24 +3122,30 @@ func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Cont return next.HandleSerialize(ctx, in) } -func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { +func awsRestjson1_serializeOpHttpBindingsUpdateBridgeStateInput(v *UpdateBridgeStateInput, encoder *httpbinding.Encoder) error { if v == nil { return fmt.Errorf("unsupported serialization of nil %T", v) } - if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { - return &smithy.SerializationError{Err: fmt.Errorf("input member ResourceArn must not be empty")} + if v.BridgeArn == nil || len(*v.BridgeArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member BridgeArn must not be empty")} } - if v.ResourceArn != nil { - if err := encoder.SetURI("ResourceArn").String(*v.ResourceArn); err != nil { + if v.BridgeArn != nil { + if err := encoder.SetURI("BridgeArn").String(*v.BridgeArn); err != nil { return err } } - if v.TagKeys != nil { - for i := range v.TagKeys { - encoder.AddQuery("tagKeys").String(v.TagKeys[i]) - } + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateBridgeStateInput(v *UpdateBridgeStateInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DesiredState) > 0 { + ok := object.Key("desiredState") + ok.String(string(v.DesiredState)) } return nil @@ -2339,6 +3729,13 @@ func awsRestjson1_serializeOpDocumentUpdateFlowSourceInput(v *UpdateFlowSourceIn ok.String(*v.EntitlementArn) } + if v.GatewayBridgeSource != nil { + ok := object.Key("gatewayBridgeSource") + if err := awsRestjson1_serializeDocumentUpdateGatewayBridgeSourceRequest(v.GatewayBridgeSource, ok); err != nil { + return err + } + } + if v.IngestPort != 0 { ok := object.Key("ingestPort") ok.Integer(v.IngestPort) @@ -2414,6 +3811,87 @@ func awsRestjson1_serializeOpDocumentUpdateFlowSourceInput(v *UpdateFlowSourceIn return nil } +type awsRestjson1_serializeOpUpdateGatewayInstance struct { +} + +func (*awsRestjson1_serializeOpUpdateGatewayInstance) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateGatewayInstance) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + 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.(*UpdateGatewayInstanceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/gateway-instances/{GatewayInstanceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateGatewayInstanceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateGatewayInstanceInput(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 + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUpdateGatewayInstanceInput(v *UpdateGatewayInstanceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.GatewayInstanceArn == nil || len(*v.GatewayInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member GatewayInstanceArn must not be empty")} + } + if v.GatewayInstanceArn != nil { + if err := encoder.SetURI("GatewayInstanceArn").String(*v.GatewayInstanceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateGatewayInstanceInput(v *UpdateGatewayInstanceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.BridgePlacement) > 0 { + ok := object.Key("bridgePlacement") + ok.String(string(v.BridgePlacement)) + } + + return nil +} + func awsRestjson1_serializeDocument__listOf__string(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -2425,39 +3903,78 @@ func awsRestjson1_serializeDocument__listOf__string(v []string, value smithyjson return nil } -func awsRestjson1_serializeDocument__listOfAddMediaStreamRequest(v []types.AddMediaStreamRequest, value smithyjson.Value) error { +func awsRestjson1_serializeDocument__listOfAddBridgeOutputRequest(v []types.AddBridgeOutputRequest, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAddBridgeOutputRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocument__listOfAddBridgeSourceRequest(v []types.AddBridgeSourceRequest, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAddBridgeSourceRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocument__listOfAddMediaStreamRequest(v []types.AddMediaStreamRequest, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAddMediaStreamRequest(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocument__listOfAddOutputRequest(v []types.AddOutputRequest, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsRestjson1_serializeDocumentAddMediaStreamRequest(&v[i], av); err != nil { + if err := awsRestjson1_serializeDocumentAddOutputRequest(&v[i], av); err != nil { return err } } return nil } -func awsRestjson1_serializeDocument__listOfAddOutputRequest(v []types.AddOutputRequest, value smithyjson.Value) error { +func awsRestjson1_serializeDocument__listOfDestinationConfigurationRequest(v []types.DestinationConfigurationRequest, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsRestjson1_serializeDocumentAddOutputRequest(&v[i], av); err != nil { + if err := awsRestjson1_serializeDocumentDestinationConfigurationRequest(&v[i], av); err != nil { return err } } return nil } -func awsRestjson1_serializeDocument__listOfDestinationConfigurationRequest(v []types.DestinationConfigurationRequest, value smithyjson.Value) error { +func awsRestjson1_serializeDocument__listOfGatewayNetwork(v []types.GatewayNetwork, value smithyjson.Value) error { array := value.Array() defer array.Close() for i := range v { av := array.Value() - if err := awsRestjson1_serializeDocumentDestinationConfigurationRequest(&v[i], av); err != nil { + if err := awsRestjson1_serializeDocumentGatewayNetwork(&v[i], av); err != nil { return err } } @@ -2553,6 +4070,163 @@ func awsRestjson1_serializeDocument__mapOf__string(v map[string]string, value sm return nil } +func awsRestjson1_serializeDocumentAddBridgeFlowSourceRequest(v *types.AddBridgeFlowSourceRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FlowArn != nil { + ok := object.Key("flowArn") + ok.String(*v.FlowArn) + } + + if v.FlowVpcInterfaceAttachment != nil { + ok := object.Key("flowVpcInterfaceAttachment") + if err := awsRestjson1_serializeDocumentVpcInterfaceAttachment(v.FlowVpcInterfaceAttachment, ok); err != nil { + return err + } + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + +func awsRestjson1_serializeDocumentAddBridgeNetworkOutputRequest(v *types.AddBridgeNetworkOutputRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IpAddress != nil { + ok := object.Key("ipAddress") + ok.String(*v.IpAddress) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.NetworkName != nil { + ok := object.Key("networkName") + ok.String(*v.NetworkName) + } + + { + ok := object.Key("port") + ok.Integer(v.Port) + } + + if len(v.Protocol) > 0 { + ok := object.Key("protocol") + ok.String(string(v.Protocol)) + } + + { + ok := object.Key("ttl") + ok.Integer(v.Ttl) + } + + return nil +} + +func awsRestjson1_serializeDocumentAddBridgeNetworkSourceRequest(v *types.AddBridgeNetworkSourceRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MulticastIp != nil { + ok := object.Key("multicastIp") + ok.String(*v.MulticastIp) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + if v.NetworkName != nil { + ok := object.Key("networkName") + ok.String(*v.NetworkName) + } + + { + ok := object.Key("port") + ok.Integer(v.Port) + } + + if len(v.Protocol) > 0 { + ok := object.Key("protocol") + ok.String(string(v.Protocol)) + } + + return nil +} + +func awsRestjson1_serializeDocumentAddBridgeOutputRequest(v *types.AddBridgeOutputRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.NetworkOutput != nil { + ok := object.Key("networkOutput") + if err := awsRestjson1_serializeDocumentAddBridgeNetworkOutputRequest(v.NetworkOutput, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAddBridgeSourceRequest(v *types.AddBridgeSourceRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FlowSource != nil { + ok := object.Key("flowSource") + if err := awsRestjson1_serializeDocumentAddBridgeFlowSourceRequest(v.FlowSource, ok); err != nil { + return err + } + } + + if v.NetworkSource != nil { + ok := object.Key("networkSource") + if err := awsRestjson1_serializeDocumentAddBridgeNetworkSourceRequest(v.NetworkSource, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentAddEgressGatewayBridgeRequest(v *types.AddEgressGatewayBridgeRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("maxBitrate") + ok.Integer(v.MaxBitrate) + } + + return nil +} + +func awsRestjson1_serializeDocumentAddIngressGatewayBridgeRequest(v *types.AddIngressGatewayBridgeRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + { + ok := object.Key("maxBitrate") + ok.Integer(v.MaxBitrate) + } + + { + ok := object.Key("maxOutputs") + ok.Integer(v.MaxOutputs) + } + + return nil +} + func awsRestjson1_serializeDocumentAddMaintenance(v *types.AddMaintenance, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2881,6 +4555,23 @@ func awsRestjson1_serializeDocumentFmtpRequest(v *types.FmtpRequest, value smith return nil } +func awsRestjson1_serializeDocumentGatewayNetwork(v *types.GatewayNetwork, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CidrBlock != nil { + ok := object.Key("cidrBlock") + ok.String(*v.CidrBlock) + } + + if v.Name != nil { + ok := object.Key("name") + ok.String(*v.Name) + } + + return nil +} + func awsRestjson1_serializeDocumentGrantEntitlementRequest(v *types.GrantEntitlementRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3027,6 +4718,25 @@ func awsRestjson1_serializeDocumentMediaStreamSourceConfigurationRequest(v *type return nil } +func awsRestjson1_serializeDocumentSetGatewayBridgeSourceRequest(v *types.SetGatewayBridgeSourceRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BridgeArn != nil { + ok := object.Key("bridgeArn") + ok.String(*v.BridgeArn) + } + + if v.VpcInterfaceAttachment != nil { + ok := object.Key("vpcInterfaceAttachment") + if err := awsRestjson1_serializeDocumentVpcInterfaceAttachment(v.VpcInterfaceAttachment, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentSetSourceRequest(v *types.SetSourceRequest, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3048,6 +4758,13 @@ func awsRestjson1_serializeDocumentSetSourceRequest(v *types.SetSourceRequest, v ok.String(*v.EntitlementArn) } + if v.GatewayBridgeSource != nil { + ok := object.Key("gatewayBridgeSource") + if err := awsRestjson1_serializeDocumentSetGatewayBridgeSourceRequest(v.GatewayBridgeSource, ok); err != nil { + return err + } + } + if v.IngestPort != 0 { ok := object.Key("ingestPort") ok.Integer(v.IngestPort) @@ -3140,6 +4857,96 @@ func awsRestjson1_serializeDocumentSourcePriority(v *types.SourcePriority, value return nil } +func awsRestjson1_serializeDocumentUpdateBridgeFlowSourceRequest(v *types.UpdateBridgeFlowSourceRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.FlowArn != nil { + ok := object.Key("flowArn") + ok.String(*v.FlowArn) + } + + if v.FlowVpcInterfaceAttachment != nil { + ok := object.Key("flowVpcInterfaceAttachment") + if err := awsRestjson1_serializeDocumentVpcInterfaceAttachment(v.FlowVpcInterfaceAttachment, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentUpdateBridgeNetworkOutputRequest(v *types.UpdateBridgeNetworkOutputRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.IpAddress != nil { + ok := object.Key("ipAddress") + ok.String(*v.IpAddress) + } + + if v.NetworkName != nil { + ok := object.Key("networkName") + ok.String(*v.NetworkName) + } + + if v.Port != 0 { + ok := object.Key("port") + ok.Integer(v.Port) + } + + if len(v.Protocol) > 0 { + ok := object.Key("protocol") + ok.String(string(v.Protocol)) + } + + if v.Ttl != 0 { + ok := object.Key("ttl") + ok.Integer(v.Ttl) + } + + return nil +} + +func awsRestjson1_serializeDocumentUpdateBridgeNetworkSourceRequest(v *types.UpdateBridgeNetworkSourceRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MulticastIp != nil { + ok := object.Key("multicastIp") + ok.String(*v.MulticastIp) + } + + if v.NetworkName != nil { + ok := object.Key("networkName") + ok.String(*v.NetworkName) + } + + if v.Port != 0 { + ok := object.Key("port") + ok.Integer(v.Port) + } + + if len(v.Protocol) > 0 { + ok := object.Key("protocol") + ok.String(string(v.Protocol)) + } + + return nil +} + +func awsRestjson1_serializeDocumentUpdateEgressGatewayBridgeRequest(v *types.UpdateEgressGatewayBridgeRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxBitrate != 0 { + ok := object.Key("maxBitrate") + ok.Integer(v.MaxBitrate) + } + + return nil +} + func awsRestjson1_serializeDocumentUpdateEncryption(v *types.UpdateEncryption, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3221,6 +5028,42 @@ func awsRestjson1_serializeDocumentUpdateFailoverConfig(v *types.UpdateFailoverC return nil } +func awsRestjson1_serializeDocumentUpdateGatewayBridgeSourceRequest(v *types.UpdateGatewayBridgeSourceRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.BridgeArn != nil { + ok := object.Key("bridgeArn") + ok.String(*v.BridgeArn) + } + + if v.VpcInterfaceAttachment != nil { + ok := object.Key("vpcInterfaceAttachment") + if err := awsRestjson1_serializeDocumentVpcInterfaceAttachment(v.VpcInterfaceAttachment, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentUpdateIngressGatewayBridgeRequest(v *types.UpdateIngressGatewayBridgeRequest, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxBitrate != 0 { + ok := object.Key("maxBitrate") + ok.Integer(v.MaxBitrate) + } + + if v.MaxOutputs != 0 { + ok := object.Key("maxOutputs") + ok.Integer(v.MaxOutputs) + } + + return nil +} + func awsRestjson1_serializeDocumentUpdateMaintenance(v *types.UpdateMaintenance, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/mediaconnect/types/enums.go b/service/mediaconnect/types/enums.go index 3e5c4f4b2b3..e8495f28cdf 100644 --- a/service/mediaconnect/types/enums.go +++ b/service/mediaconnect/types/enums.go @@ -22,6 +22,62 @@ func (Algorithm) Values() []Algorithm { } } +type BridgePlacement string + +// Enum values for BridgePlacement +const ( + BridgePlacementAvailable BridgePlacement = "AVAILABLE" + BridgePlacementLocked BridgePlacement = "LOCKED" +) + +// Values returns all known values for BridgePlacement. 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 (BridgePlacement) Values() []BridgePlacement { + return []BridgePlacement{ + "AVAILABLE", + "LOCKED", + } +} + +type BridgeState string + +// Enum values for BridgeState +const ( + BridgeStateCreating BridgeState = "CREATING" + BridgeStateStandby BridgeState = "STANDBY" + BridgeStateStarting BridgeState = "STARTING" + BridgeStateDeploying BridgeState = "DEPLOYING" + BridgeStateActive BridgeState = "ACTIVE" + BridgeStateStopping BridgeState = "STOPPING" + BridgeStateDeleting BridgeState = "DELETING" + BridgeStateDeleted BridgeState = "DELETED" + BridgeStateStartFailed BridgeState = "START_FAILED" + BridgeStateStartPending BridgeState = "START_PENDING" + BridgeStateStopFailed BridgeState = "STOP_FAILED" + BridgeStateUpdating BridgeState = "UPDATING" +) + +// Values returns all known values for BridgeState. 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 (BridgeState) Values() []BridgeState { + return []BridgeState{ + "CREATING", + "STANDBY", + "STARTING", + "DEPLOYING", + "ACTIVE", + "STOPPING", + "DELETING", + "DELETED", + "START_FAILED", + "START_PENDING", + "STOP_FAILED", + "UPDATING", + } +} + type Colorimetry string // Enum values for Colorimetry @@ -50,6 +106,44 @@ func (Colorimetry) Values() []Colorimetry { } } +type ConnectionStatus string + +// Enum values for ConnectionStatus +const ( + ConnectionStatusConnected ConnectionStatus = "CONNECTED" + ConnectionStatusDisconnected ConnectionStatus = "DISCONNECTED" +) + +// Values returns all known values for ConnectionStatus. 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 (ConnectionStatus) Values() []ConnectionStatus { + return []ConnectionStatus{ + "CONNECTED", + "DISCONNECTED", + } +} + +type DesiredState string + +// Enum values for DesiredState +const ( + DesiredStateActive DesiredState = "ACTIVE" + DesiredStateStandby DesiredState = "STANDBY" + DesiredStateDeleted DesiredState = "DELETED" +) + +// Values returns all known values for DesiredState. 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 (DesiredState) Values() []DesiredState { + return []DesiredState{ + "ACTIVE", + "STANDBY", + "DELETED", + } +} + type DurationUnits string // Enum values for DurationUnits @@ -142,6 +236,58 @@ func (FailoverMode) Values() []FailoverMode { } } +type GatewayState string + +// Enum values for GatewayState +const ( + GatewayStateCreating GatewayState = "CREATING" + GatewayStateActive GatewayState = "ACTIVE" + GatewayStateUpdating GatewayState = "UPDATING" + GatewayStateError GatewayState = "ERROR" + GatewayStateDeleting GatewayState = "DELETING" + GatewayStateDeleted GatewayState = "DELETED" +) + +// Values returns all known values for GatewayState. 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 (GatewayState) Values() []GatewayState { + return []GatewayState{ + "CREATING", + "ACTIVE", + "UPDATING", + "ERROR", + "DELETING", + "DELETED", + } +} + +type InstanceState string + +// Enum values for InstanceState +const ( + InstanceStateRegistering InstanceState = "REGISTERING" + InstanceStateActive InstanceState = "ACTIVE" + InstanceStateDeregistering InstanceState = "DEREGISTERING" + InstanceStateDeregistered InstanceState = "DEREGISTERED" + InstanceStateRegistrationError InstanceState = "REGISTRATION_ERROR" + InstanceStateDeregistrationError InstanceState = "DEREGISTRATION_ERROR" +) + +// Values returns all known values for InstanceState. 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 (InstanceState) Values() []InstanceState { + return []InstanceState{ + "REGISTERING", + "ACTIVE", + "DEREGISTERING", + "DEREGISTERED", + "REGISTRATION_ERROR", + "DEREGISTRATION_ERROR", + } +} + type KeyType string // Enum values for KeyType @@ -258,6 +404,7 @@ const ( ProtocolSrtListener Protocol = "srt-listener" ProtocolSrtCaller Protocol = "srt-caller" ProtocolFujitsuQos Protocol = "fujitsu-qos" + ProtocolUdp Protocol = "udp" ) // Values returns all known values for Protocol. Note that this can be expanded in @@ -275,6 +422,7 @@ func (Protocol) Values() []Protocol { "srt-listener", "srt-caller", "fujitsu-qos", + "udp", } } diff --git a/service/mediaconnect/types/errors.go b/service/mediaconnect/types/errors.go index 32499a623df..5c8d0419a17 100644 --- a/service/mediaconnect/types/errors.go +++ b/service/mediaconnect/types/errors.go @@ -63,6 +63,62 @@ func (e *BadRequestException) ErrorCode() string { } func (e *BadRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +type ConflictException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ConflictException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ConflictException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ConflictException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ConflictException" + } + return *e.ErrorCodeOverride +} +func (e *ConflictException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +type CreateBridge420Exception struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CreateBridge420Exception) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CreateBridge420Exception) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CreateBridge420Exception) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CreateBridge420Exception" + } + return *e.ErrorCodeOverride +} +func (e *CreateBridge420Exception) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Exception raised by AWS Elemental MediaConnect. See the error message and // documentation for the operation for more information on the cause of this // exception. @@ -91,6 +147,34 @@ func (e *CreateFlow420Exception) ErrorCode() string { } func (e *CreateFlow420Exception) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Exception raised by AWS Elemental MediaConnect. See the error message and +// documentation for the operation for more information on the cause of this +// exception. +type CreateGateway420Exception struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *CreateGateway420Exception) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *CreateGateway420Exception) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *CreateGateway420Exception) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "CreateGateway420Exception" + } + return *e.ErrorCodeOverride +} +func (e *CreateGateway420Exception) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // Exception raised by AWS Elemental MediaConnect. See the error message and // documentation for the operation for more information on the cause of this // exception. diff --git a/service/mediaconnect/types/types.go b/service/mediaconnect/types/types.go index d2817fa5d77..33a67eda438 100644 --- a/service/mediaconnect/types/types.go +++ b/service/mediaconnect/types/types.go @@ -6,6 +6,142 @@ import ( smithydocument "github.com/aws/smithy-go/document" ) +// Add a flow source to an existing bridge. +type AddBridgeFlowSourceRequest struct { + + // The Amazon Resource Number (ARN) of the cloud flow to use as a source of this + // bridge. + // + // This member is required. + FlowArn *string + + // The name of the flow source. This name is used to reference the source and must + // be unique among sources in this bridge. + // + // This member is required. + Name *string + + // The name of the VPC interface attachment to use for this source. + FlowVpcInterfaceAttachment *VpcInterfaceAttachment + + noSmithyDocumentSerde +} + +// Add a network output to an existing bridge. +type AddBridgeNetworkOutputRequest struct { + + // The network output IP Address. + // + // This member is required. + IpAddress *string + + // The network output name. This name is used to reference the output and must be + // unique among outputs in this bridge. + // + // This member is required. + Name *string + + // The network output's gateway network name. + // + // This member is required. + NetworkName *string + + // The network output port. + // + // This member is required. + Port int32 + + // The network output protocol. + // + // This member is required. + Protocol Protocol + + // The network output TTL. + // + // This member is required. + Ttl int32 + + noSmithyDocumentSerde +} + +// Add a network source to an existing bridge. +type AddBridgeNetworkSourceRequest struct { + + // The network source multicast IP. + // + // This member is required. + MulticastIp *string + + // The name of the network source. This name is used to reference the source and + // must be unique among sources in this bridge. + // + // This member is required. + Name *string + + // The network source's gateway network name. + // + // This member is required. + NetworkName *string + + // The network source port. + // + // This member is required. + Port int32 + + // The network source protocol. + // + // This member is required. + Protocol Protocol + + noSmithyDocumentSerde +} + +// Add an output to a bridge. +type AddBridgeOutputRequest struct { + + // Add a network output to an existing bridge. + NetworkOutput *AddBridgeNetworkOutputRequest + + noSmithyDocumentSerde +} + +// Add a source to an existing bridge. +type AddBridgeSourceRequest struct { + + // Add a flow source to an existing bridge. + FlowSource *AddBridgeFlowSourceRequest + + // Add a network source to an existing bridge. + NetworkSource *AddBridgeNetworkSourceRequest + + noSmithyDocumentSerde +} + +type AddEgressGatewayBridgeRequest struct { + + // The maximum expected bitrate (in bps). + // + // This member is required. + MaxBitrate int32 + + noSmithyDocumentSerde +} + +type AddIngressGatewayBridgeRequest struct { + + // The maximum expected bitrate (in bps). + // + // This member is required. + MaxBitrate int32 + + // The maximum number of expected outputs. + // + // This member is required. + MaxOutputs int32 + + noSmithyDocumentSerde +} + // Create maintenance setting for a flow type AddMaintenance struct { @@ -81,7 +217,8 @@ type AddOutputRequest struct { Destination *string // The type of key used for the encryption. If no keyType is provided, the service - // will use the default setting (static-key). + // will use the default setting (static-key). Allowable encryption types: + // static-key. Encryption *Encryption // The maximum latency in milliseconds. This parameter applies only to RIST-based, @@ -116,7 +253,7 @@ type AddOutputRequest struct { SmoothingLatency int32 // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. + // only to Zixi and SRT caller-based streams. StreamId *string // The name of the VPC interface attachment to use for this output. @@ -125,6 +262,183 @@ type AddOutputRequest struct { noSmithyDocumentSerde } +// A Bridge is the connection between your datacenter's Instances and the AWS +// cloud. A bridge can be used to send video from the AWS cloud to your datacenter +// or from your datacenter to the AWS cloud. +type Bridge struct { + + // The Amazon Resource Number (ARN) of the bridge. + // + // This member is required. + BridgeArn *string + + // This member is required. + BridgeState BridgeState + + // The name of the bridge. + // + // This member is required. + Name *string + + // The placement Amazon Resource Number (ARN) of the bridge. + // + // This member is required. + PlacementArn *string + + BridgeMessages []MessageDetail + + EgressGatewayBridge *EgressGatewayBridge + + IngressGatewayBridge *IngressGatewayBridge + + // The outputs on this bridge. + Outputs []BridgeOutput + + // The settings for source failover. + SourceFailoverConfig *FailoverConfig + + // The sources on this bridge. + Sources []BridgeSource + + noSmithyDocumentSerde +} + +// The output of the bridge. A flow output is delivered to the AWS cloud. +type BridgeFlowOutput struct { + + // The Amazon Resource Number (ARN) of the cloud flow. + // + // This member is required. + FlowArn *string + + // The Amazon Resource Number (ARN) of the flow source. + // + // This member is required. + FlowSourceArn *string + + // The name of the bridge's output. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// The source of the bridge. A flow source originates in MediaConnect as an +// existing cloud flow. +type BridgeFlowSource struct { + + // The ARN of the cloud flow used as a source of this bridge. + // + // This member is required. + FlowArn *string + + // The name of the flow source. + // + // This member is required. + Name *string + + // The name of the VPC interface attachment to use for this source. + FlowVpcInterfaceAttachment *VpcInterfaceAttachment + + // The Amazon Resource Number (ARN) of the output. + OutputArn *string + + noSmithyDocumentSerde +} + +// The output of the bridge. A network output is delivered to your premises. +type BridgeNetworkOutput struct { + + // The network output IP Address. + // + // This member is required. + IpAddress *string + + // The network output name. + // + // This member is required. + Name *string + + // The network output's gateway network name. + // + // This member is required. + NetworkName *string + + // The network output port. + // + // This member is required. + Port int32 + + // The network output protocol. + // + // This member is required. + Protocol Protocol + + // The network output TTL. + // + // This member is required. + Ttl int32 + + noSmithyDocumentSerde +} + +// The source of the bridge. A network source originates at your premises. +type BridgeNetworkSource struct { + + // The network source multicast IP. + // + // This member is required. + MulticastIp *string + + // The name of the network source. + // + // This member is required. + Name *string + + // The network source's gateway network name. + // + // This member is required. + NetworkName *string + + // The network source port. + // + // This member is required. + Port int32 + + // The network source protocol. + // + // This member is required. + Protocol Protocol + + noSmithyDocumentSerde +} + +// The output of the bridge. +type BridgeOutput struct { + + // The output of the bridge. A flow output is delivered to the AWS cloud. + FlowOutput *BridgeFlowOutput + + // The output of the bridge. A network output is delivered to your premises. + NetworkOutput *BridgeNetworkOutput + + noSmithyDocumentSerde +} + +// The bridge's source. +type BridgeSource struct { + + // The source of the bridge. A flow source originates in MediaConnect as an + // existing cloud flow. + FlowSource *BridgeFlowSource + + // The source of the bridge. A network source originates at your premises. + NetworkSource *BridgeNetworkSource + + noSmithyDocumentSerde +} + // The transport parameters that are associated with an outbound media stream. type DestinationConfiguration struct { @@ -179,6 +493,19 @@ type DestinationConfigurationRequest struct { noSmithyDocumentSerde } +type EgressGatewayBridge struct { + + // The maximum expected bitrate (in bps) of the egress bridge. + // + // This member is required. + MaxBitrate int32 + + // The ID of the instance running this bridge. + InstanceId *string + + noSmithyDocumentSerde +} + // A collection of parameters that determine how MediaConnect will convert the // content. These fields only apply to outputs on flows that have a CDI source. type EncodingParameters struct { @@ -346,8 +673,7 @@ type Flow struct { // This member is required. Entitlements []Entitlement - // The Amazon Resource Name (ARN), a unique identifier for any AWS resource, of - // the flow. + // The Amazon Resource Name (ARN) of the flow. // // This member is required. FlowArn *string @@ -455,6 +781,120 @@ type FmtpRequest struct { noSmithyDocumentSerde } +// The settings for a gateway, including its networks. +type Gateway struct { + + // The range of IP addresses that contribute content or initiate output requests + // for flows communicating with this gateway. These IP addresses should be in the + // form of a Classless Inter-Domain Routing (CIDR) block; for example, 10.0.0.0/16. + // + // This member is required. + EgressCidrBlocks []string + + // The Amazon Resource Name (ARN) of the gateway. + // + // This member is required. + GatewayArn *string + + // The name of the gateway. This name can not be modified after the gateway is + // created. + // + // This member is required. + Name *string + + // The list of networks in the gateway. + // + // This member is required. + Networks []GatewayNetwork + + GatewayMessages []MessageDetail + + // The current status of the gateway. + GatewayState GatewayState + + noSmithyDocumentSerde +} + +// The source configuration for cloud flows receiving a stream from a bridge. +type GatewayBridgeSource struct { + + // The ARN of the bridge feeding this flow. + // + // This member is required. + BridgeArn *string + + // The name of the VPC interface attachment to use for this bridge source. + VpcInterfaceAttachment *VpcInterfaceAttachment + + noSmithyDocumentSerde +} + +// The settings for an instance in a gateway. +type GatewayInstance struct { + + // The availability of the instance to host new bridges. The bridgePlacement + // property can be LOCKED or AVAILABLE. If it is LOCKED, no new bridges can be + // deployed to this instance. If it is AVAILABLE, new bridges can be added to this + // instance. + // + // This member is required. + BridgePlacement BridgePlacement + + // The connection state of the instance. + // + // This member is required. + ConnectionStatus ConnectionStatus + + // The Amazon Resource Name (ARN) of the instance. + // + // This member is required. + GatewayArn *string + + // The Amazon Resource Name (ARN) of the gateway. + // + // This member is required. + GatewayInstanceArn *string + + // The managed instance ID generated by the SSM install. This will begin with + // "mi-". + // + // This member is required. + InstanceId *string + + // The status of the instance. + // + // This member is required. + InstanceState InstanceState + + // The running bridge count. + // + // This member is required. + RunningBridgeCount int32 + + InstanceMessages []MessageDetail + + noSmithyDocumentSerde +} + +// The network settings for a gateway. +type GatewayNetwork struct { + + // A unique IP address range to use for this network. These IP addresses should be + // in the form of a Classless Inter-Domain Routing (CIDR) block; for example, + // 10.0.0.0/16. + // + // This member is required. + CidrBlock *string + + // The name of the network. This name is used to reference the network and must be + // unique among networks in this gateway. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + // The entitlements that you want to grant on a flow. type GrantEntitlementRequest struct { @@ -474,7 +914,7 @@ type GrantEntitlementRequest struct { Description *string // The type of encryption that will be used on the output that is associated with - // this entitlement. + // this entitlement. Allowable encryption types: static-key, speke. Encryption *Encryption // An indication of whether the new entitlement should be enabled or disabled as @@ -488,6 +928,24 @@ type GrantEntitlementRequest struct { noSmithyDocumentSerde } +type IngressGatewayBridge struct { + + // The maximum expected bitrate (in bps) of the ingress bridge. + // + // This member is required. + MaxBitrate int32 + + // The maximum number of outputs on the ingress bridge. + // + // This member is required. + MaxOutputs int32 + + // The ID of the instance running this bridge. + InstanceId *string + + noSmithyDocumentSerde +} + // The transport parameters that are associated with an incoming media stream. type InputConfiguration struct { @@ -550,6 +1008,35 @@ type InterfaceRequest struct { noSmithyDocumentSerde } +// Displays details of the selected bridge. +type ListedBridge struct { + + // The ARN of the bridge. + // + // This member is required. + BridgeArn *string + + // This member is required. + BridgeState BridgeState + + // The type of the bridge. + // + // This member is required. + BridgeType *string + + // The name of the bridge. + // + // This member is required. + Name *string + + // The ARN of the gateway associated with the bridge. + // + // This member is required. + PlacementArn *string + + noSmithyDocumentSerde +} + // An entitlement that has been granted to you from other AWS accounts. type ListedEntitlement struct { @@ -611,6 +1098,50 @@ type ListedFlow struct { noSmithyDocumentSerde } +// Provides a summary of a gateway, including its name, ARN, and status. +type ListedGateway struct { + + // The Amazon Resource Name (ARN) of the gateway. + // + // This member is required. + GatewayArn *string + + // This member is required. + GatewayState GatewayState + + // The name of the gateway. + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +// Provides a summary of an instance. +type ListedGatewayInstance struct { + + // The Amazon Resource Name (ARN) of the gateway. + // + // This member is required. + GatewayArn *string + + // The Amazon Resource Name (ARN) of the instance. + // + // This member is required. + GatewayInstanceArn *string + + // The managed instance ID generated by the SSM install. This will begin with + // "mi-". + // + // This member is required. + InstanceId *string + + // The status of the instance. + InstanceState InstanceState + + noSmithyDocumentSerde +} + // The maintenance setting of a flow type Maintenance struct { @@ -802,6 +1333,25 @@ type MediaStreamSourceConfigurationRequest struct { noSmithyDocumentSerde } +type MessageDetail struct { + + // The error code. + // + // This member is required. + Code *string + + // The specific error message that MediaConnect returns to help you understand the + // reason that the request did not succeed. + // + // This member is required. + Message *string + + // The name of the resource. + ResourceName *string + + noSmithyDocumentSerde +} + // Messages that provide the state of the flow. type Messages struct { @@ -877,6 +1427,12 @@ type Output struct { // This member is required. OutputArn *string + // The ARN of the bridge that added this output. + BridgeArn *string + + // The bridge output ports currently in use. + BridgePorts []int32 + // Percentage from 0-100 of the data transfer cost to be billed to the subscriber. DataTransferSubscriberFeePercent int32 @@ -1021,10 +1577,25 @@ type ResourceSpecification struct { noSmithyDocumentSerde } +// The source configuration for cloud flows receiving a stream from a bridge. +type SetGatewayBridgeSourceRequest struct { + + // The ARN of the bridge feeding this flow. + // + // This member is required. + BridgeArn *string + + // The name of the VPC interface attachment to use for this bridge source. + VpcInterfaceAttachment *VpcInterfaceAttachment + + noSmithyDocumentSerde +} + // The settings for the source of the flow. type SetSourceRequest struct { // The type of encryption that is used on the content ingested from this source. + // Allowable encryption types: static-key. Decryption *Encryption // A description for the source. This value is not used or seen outside of the @@ -1036,10 +1607,13 @@ type SetSourceRequest struct { // the originator's flow. EntitlementArn *string + // The source configuration for cloud flows receiving a stream from a bridge. + GatewayBridgeSource *SetGatewayBridgeSourceRequest + // The port that the flow will be listening on for incoming content. IngestPort int32 - // The smoothing max bitrate for RIST, RTP, and RTP-FEC streams. + // The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams. MaxBitrate int32 // The maximum latency in milliseconds. This parameter applies only to RIST-based, @@ -1081,7 +1655,7 @@ type SetSourceRequest struct { SourceListenerPort int32 // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. + // only to Zixi and SRT caller-based streams. StreamId *string // The name of the VPC interface to use for this source. @@ -1123,6 +1697,9 @@ type Source struct { // the ARN is generated as part of the originator's flow. EntitlementArn *string + // The source configuration for cloud flows receiving a stream from a bridge. + GatewayBridgeSource *GatewayBridgeSource + // The IP address that the flow will be listening on for incoming content. IngestIp *string @@ -1178,7 +1755,7 @@ type Transport struct { // Routing (CIDR) block; for example, 10.0.0.0/16. CidrAllowList []string - // The smoothing max bitrate for RIST, RTP, and RTP-FEC streams. + // The smoothing max bitrate (in bps) for RIST, RTP, and RTP-FEC streams. MaxBitrate int32 // The maximum latency in milliseconds. This parameter applies only to RIST-based, @@ -1216,12 +1793,71 @@ type Transport struct { SourceListenerPort int32 // The stream ID that you want to use for this transport. This parameter applies - // only to Zixi-based streams. + // only to Zixi and SRT caller-based streams. StreamId *string noSmithyDocumentSerde } +// Update the flow source of the bridge. +type UpdateBridgeFlowSourceRequest struct { + + // The ARN of the cloud flow to use as a source of this bridge. + FlowArn *string + + // The name of the VPC interface attachment to use for this source. + FlowVpcInterfaceAttachment *VpcInterfaceAttachment + + noSmithyDocumentSerde +} + +// Update an existing network output. +type UpdateBridgeNetworkOutputRequest struct { + + // The network output IP Address. + IpAddress *string + + // The network output's gateway network name. + NetworkName *string + + // The network output port. + Port int32 + + // The network output protocol. + Protocol Protocol + + // The network output TTL. + Ttl int32 + + noSmithyDocumentSerde +} + +// Update the network source of the bridge. +type UpdateBridgeNetworkSourceRequest struct { + + // The network source multicast IP. + MulticastIp *string + + // The network source's gateway network name. + NetworkName *string + + // The network source port. + Port int32 + + // The network source protocol. + Protocol Protocol + + noSmithyDocumentSerde +} + +type UpdateEgressGatewayBridgeRequest struct { + + // Update an existing egress-type bridge. + MaxBitrate int32 + + noSmithyDocumentSerde +} + // Information about the encryption of the flow. type UpdateEncryption struct { @@ -1291,6 +1927,29 @@ type UpdateFailoverConfig struct { noSmithyDocumentSerde } +// The source configuration for cloud flows receiving a stream from a bridge. +type UpdateGatewayBridgeSourceRequest struct { + + // The ARN of the bridge feeding this flow. + BridgeArn *string + + // The name of the VPC interface attachment to use for this bridge source. + VpcInterfaceAttachment *VpcInterfaceAttachment + + noSmithyDocumentSerde +} + +type UpdateIngressGatewayBridgeRequest struct { + + // The maximum expected bitrate (in bps). + MaxBitrate int32 + + // The maximum number of expected outputs. + MaxOutputs int32 + + noSmithyDocumentSerde +} + // Update maintenance setting for a flow type UpdateMaintenance struct { @@ -1345,10 +2004,10 @@ type VpcInterface struct { noSmithyDocumentSerde } -// The settings for attaching a VPC interface to an output. +// The settings for attaching a VPC interface to an resource. type VpcInterfaceAttachment struct { - // The name of the VPC interface to use for this output. + // The name of the VPC interface to use for this resource. VpcInterfaceName *string noSmithyDocumentSerde diff --git a/service/mediaconnect/validators.go b/service/mediaconnect/validators.go index aef1471b721..de61001e114 100644 --- a/service/mediaconnect/validators.go +++ b/service/mediaconnect/validators.go @@ -10,6 +10,46 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAddBridgeOutputs struct { +} + +func (*validateOpAddBridgeOutputs) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddBridgeOutputs) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddBridgeOutputsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddBridgeOutputsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpAddBridgeSources struct { +} + +func (*validateOpAddBridgeSources) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAddBridgeSources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AddBridgeSourcesInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAddBridgeSourcesInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpAddFlowMediaStreams struct { } @@ -90,6 +130,26 @@ func (m *validateOpAddFlowVpcInterfaces) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpCreateBridge struct { +} + +func (*validateOpCreateBridge) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateBridge) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateBridgeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateBridgeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateFlow struct { } @@ -110,6 +170,46 @@ func (m *validateOpCreateFlow) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpCreateGateway struct { +} + +func (*validateOpCreateGateway) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateGatewayInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateGatewayInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteBridge struct { +} + +func (*validateOpDeleteBridge) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteBridge) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteBridgeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteBridgeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteFlow struct { } @@ -130,6 +230,66 @@ func (m *validateOpDeleteFlow) HandleInitialize(ctx context.Context, in middlewa return next.HandleInitialize(ctx, in) } +type validateOpDeleteGateway struct { +} + +func (*validateOpDeleteGateway) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteGatewayInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteGatewayInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeregisterGatewayInstance struct { +} + +func (*validateOpDeregisterGatewayInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeregisterGatewayInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeregisterGatewayInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeregisterGatewayInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeBridge struct { +} + +func (*validateOpDescribeBridge) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeBridge) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeBridgeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeBridgeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeFlow struct { } @@ -150,6 +310,46 @@ func (m *validateOpDescribeFlow) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpDescribeGateway struct { +} + +func (*validateOpDescribeGateway) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeGateway) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeGatewayInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeGatewayInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDescribeGatewayInstance struct { +} + +func (*validateOpDescribeGatewayInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeGatewayInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeGatewayInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeGatewayInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeOffering struct { } @@ -250,6 +450,46 @@ func (m *validateOpPurchaseOffering) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpRemoveBridgeOutput struct { +} + +func (*validateOpRemoveBridgeOutput) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveBridgeOutput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveBridgeOutputInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveBridgeOutputInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpRemoveBridgeSource struct { +} + +func (*validateOpRemoveBridgeSource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRemoveBridgeSource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RemoveBridgeSourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRemoveBridgeSourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRemoveFlowMediaStream struct { } @@ -430,6 +670,86 @@ func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpUpdateBridge struct { +} + +func (*validateOpUpdateBridge) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBridge) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBridgeInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBridgeInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateBridgeOutput struct { +} + +func (*validateOpUpdateBridgeOutput) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBridgeOutput) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBridgeOutputInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBridgeOutputInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateBridgeSource struct { +} + +func (*validateOpUpdateBridgeSource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBridgeSource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBridgeSourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBridgeSourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateBridgeState struct { +} + +func (*validateOpUpdateBridgeState) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateBridgeState) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateBridgeStateInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateBridgeStateInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateFlowEntitlement struct { } @@ -530,6 +850,34 @@ func (m *validateOpUpdateFlowSource) HandleInitialize(ctx context.Context, in mi return next.HandleInitialize(ctx, in) } +type validateOpUpdateGatewayInstance struct { +} + +func (*validateOpUpdateGatewayInstance) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateGatewayInstance) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateGatewayInstanceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateGatewayInstanceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +func addOpAddBridgeOutputsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddBridgeOutputs{}, middleware.After) +} + +func addOpAddBridgeSourcesValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAddBridgeSources{}, middleware.After) +} + func addOpAddFlowMediaStreamsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddFlowMediaStreams{}, middleware.After) } @@ -546,18 +894,50 @@ func addOpAddFlowVpcInterfacesValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpAddFlowVpcInterfaces{}, middleware.After) } +func addOpCreateBridgeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateBridge{}, middleware.After) +} + func addOpCreateFlowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateFlow{}, middleware.After) } +func addOpCreateGatewayValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateGateway{}, middleware.After) +} + +func addOpDeleteBridgeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteBridge{}, middleware.After) +} + func addOpDeleteFlowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteFlow{}, middleware.After) } +func addOpDeleteGatewayValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteGateway{}, middleware.After) +} + +func addOpDeregisterGatewayInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeregisterGatewayInstance{}, middleware.After) +} + +func addOpDescribeBridgeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeBridge{}, middleware.After) +} + func addOpDescribeFlowValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeFlow{}, middleware.After) } +func addOpDescribeGatewayValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeGateway{}, middleware.After) +} + +func addOpDescribeGatewayInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeGatewayInstance{}, middleware.After) +} + func addOpDescribeOfferingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeOffering{}, middleware.After) } @@ -578,6 +958,14 @@ func addOpPurchaseOfferingValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpPurchaseOffering{}, middleware.After) } +func addOpRemoveBridgeOutputValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveBridgeOutput{}, middleware.After) +} + +func addOpRemoveBridgeSourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRemoveBridgeSource{}, middleware.After) +} + func addOpRemoveFlowMediaStreamValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveFlowMediaStream{}, middleware.After) } @@ -614,6 +1002,22 @@ func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) } +func addOpUpdateBridgeValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBridge{}, middleware.After) +} + +func addOpUpdateBridgeOutputValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBridgeOutput{}, middleware.After) +} + +func addOpUpdateBridgeSourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBridgeSource{}, middleware.After) +} + +func addOpUpdateBridgeStateValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateBridgeState{}, middleware.After) +} + func addOpUpdateFlowEntitlementValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateFlowEntitlement{}, middleware.After) } @@ -634,6 +1038,44 @@ func addOpUpdateFlowSourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateFlowSource{}, middleware.After) } +func addOpUpdateGatewayInstanceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateGatewayInstance{}, middleware.After) +} + +func validate__listOfAddBridgeOutputRequest(v []types.AddBridgeOutputRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOfAddBridgeOutputRequest"} + for i := range v { + if err := validateAddBridgeOutputRequest(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validate__listOfAddBridgeSourceRequest(v []types.AddBridgeSourceRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOfAddBridgeSourceRequest"} + for i := range v { + if err := validateAddBridgeSourceRequest(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validate__listOfAddMediaStreamRequest(v []types.AddMediaStreamRequest) error { if v == nil { return nil @@ -685,6 +1127,23 @@ func validate__listOfDestinationConfigurationRequest(v []types.DestinationConfig } } +func validate__listOfGatewayNetwork(v []types.GatewayNetwork) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListOfGatewayNetwork"} + for i := range v { + if err := validateGatewayNetwork(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validate__listOfGrantEntitlementRequest(v []types.GrantEntitlementRequest) error { if v == nil { return nil @@ -787,6 +1246,135 @@ func validate__listOfVpcInterfaceRequest(v []types.VpcInterfaceRequest) error { } } +func validateAddBridgeFlowSourceRequest(v *types.AddBridgeFlowSourceRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddBridgeFlowSourceRequest"} + if v.FlowArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("FlowArn")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddBridgeNetworkOutputRequest(v *types.AddBridgeNetworkOutputRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddBridgeNetworkOutputRequest"} + if v.IpAddress == nil { + invalidParams.Add(smithy.NewErrParamRequired("IpAddress")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.NetworkName == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkName")) + } + if len(v.Protocol) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Protocol")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddBridgeNetworkSourceRequest(v *types.AddBridgeNetworkSourceRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddBridgeNetworkSourceRequest"} + if v.MulticastIp == nil { + invalidParams.Add(smithy.NewErrParamRequired("MulticastIp")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.NetworkName == nil { + invalidParams.Add(smithy.NewErrParamRequired("NetworkName")) + } + if len(v.Protocol) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("Protocol")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddBridgeOutputRequest(v *types.AddBridgeOutputRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddBridgeOutputRequest"} + if v.NetworkOutput != nil { + if err := validateAddBridgeNetworkOutputRequest(v.NetworkOutput); err != nil { + invalidParams.AddNested("NetworkOutput", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddBridgeSourceRequest(v *types.AddBridgeSourceRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddBridgeSourceRequest"} + if v.FlowSource != nil { + if err := validateAddBridgeFlowSourceRequest(v.FlowSource); err != nil { + invalidParams.AddNested("FlowSource", err.(smithy.InvalidParamsError)) + } + } + if v.NetworkSource != nil { + if err := validateAddBridgeNetworkSourceRequest(v.NetworkSource); err != nil { + invalidParams.AddNested("NetworkSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddEgressGatewayBridgeRequest(v *types.AddEgressGatewayBridgeRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddEgressGatewayBridgeRequest"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAddIngressGatewayBridgeRequest(v *types.AddIngressGatewayBridgeRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddIngressGatewayBridgeRequest"} + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateAddMaintenance(v *types.AddMaintenance) error { if v == nil { return nil @@ -900,6 +1488,24 @@ func validateEncryption(v *types.Encryption) error { } } +func validateGatewayNetwork(v *types.GatewayNetwork) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GatewayNetwork"} + if v.CidrBlock == nil { + invalidParams.Add(smithy.NewErrParamRequired("CidrBlock")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateGrantEntitlementRequest(v *types.GrantEntitlementRequest) error { if v == nil { return nil @@ -1005,6 +1611,21 @@ func validateMediaStreamSourceConfigurationRequest(v *types.MediaStreamSourceCon } } +func validateSetGatewayBridgeSourceRequest(v *types.SetGatewayBridgeSourceRequest) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "SetGatewayBridgeSourceRequest"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSetSourceRequest(v *types.SetSourceRequest) error { if v == nil { return nil @@ -1020,6 +1641,11 @@ func validateSetSourceRequest(v *types.SetSourceRequest) error { invalidParams.AddNested("MediaStreamSourceConfigurations", err.(smithy.InvalidParamsError)) } } + if v.GatewayBridgeSource != nil { + if err := validateSetGatewayBridgeSourceRequest(v.GatewayBridgeSource); err != nil { + invalidParams.AddNested("GatewayBridgeSource", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -1051,6 +1677,50 @@ func validateVpcInterfaceRequest(v *types.VpcInterfaceRequest) error { } } +func validateOpAddBridgeOutputsInput(v *AddBridgeOutputsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddBridgeOutputsInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if v.Outputs == nil { + invalidParams.Add(smithy.NewErrParamRequired("Outputs")) + } else if v.Outputs != nil { + if err := validate__listOfAddBridgeOutputRequest(v.Outputs); err != nil { + invalidParams.AddNested("Outputs", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpAddBridgeSourcesInput(v *AddBridgeSourcesInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AddBridgeSourcesInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if v.Sources == nil { + invalidParams.Add(smithy.NewErrParamRequired("Sources")) + } else if v.Sources != nil { + if err := validate__listOfAddBridgeSourceRequest(v.Sources); err != nil { + invalidParams.AddNested("Sources", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAddFlowMediaStreamsInput(v *AddFlowMediaStreamsInput) error { if v == nil { return nil @@ -1139,6 +1809,46 @@ func validateOpAddFlowVpcInterfacesInput(v *AddFlowVpcInterfacesInput) error { } } +func validateOpCreateBridgeInput(v *CreateBridgeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateBridgeInput"} + if v.EgressGatewayBridge != nil { + if err := validateAddEgressGatewayBridgeRequest(v.EgressGatewayBridge); err != nil { + invalidParams.AddNested("EgressGatewayBridge", err.(smithy.InvalidParamsError)) + } + } + if v.IngressGatewayBridge != nil { + if err := validateAddIngressGatewayBridgeRequest(v.IngressGatewayBridge); err != nil { + invalidParams.AddNested("IngressGatewayBridge", err.(smithy.InvalidParamsError)) + } + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Outputs != nil { + if err := validate__listOfAddBridgeOutputRequest(v.Outputs); err != nil { + invalidParams.AddNested("Outputs", err.(smithy.InvalidParamsError)) + } + } + if v.PlacementArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("PlacementArn")) + } + if v.Sources == nil { + invalidParams.Add(smithy.NewErrParamRequired("Sources")) + } else if v.Sources != nil { + if err := validate__listOfAddBridgeSourceRequest(v.Sources); err != nil { + invalidParams.AddNested("Sources", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateFlowInput(v *CreateFlowInput) error { if v == nil { return nil @@ -1189,6 +1899,46 @@ func validateOpCreateFlowInput(v *CreateFlowInput) error { } } +func validateOpCreateGatewayInput(v *CreateGatewayInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateGatewayInput"} + if v.EgressCidrBlocks == nil { + invalidParams.Add(smithy.NewErrParamRequired("EgressCidrBlocks")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.Networks == nil { + invalidParams.Add(smithy.NewErrParamRequired("Networks")) + } else if v.Networks != nil { + if err := validate__listOfGatewayNetwork(v.Networks); err != nil { + invalidParams.AddNested("Networks", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteBridgeInput(v *DeleteBridgeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteBridgeInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteFlowInput(v *DeleteFlowInput) error { if v == nil { return nil @@ -1204,6 +1954,51 @@ func validateOpDeleteFlowInput(v *DeleteFlowInput) error { } } +func validateOpDeleteGatewayInput(v *DeleteGatewayInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteGatewayInput"} + if v.GatewayArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("GatewayArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeregisterGatewayInstanceInput(v *DeregisterGatewayInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeregisterGatewayInstanceInput"} + if v.GatewayInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("GatewayInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeBridgeInput(v *DescribeBridgeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeBridgeInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeFlowInput(v *DescribeFlowInput) error { if v == nil { return nil @@ -1219,6 +2014,36 @@ func validateOpDescribeFlowInput(v *DescribeFlowInput) error { } } +func validateOpDescribeGatewayInput(v *DescribeGatewayInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeGatewayInput"} + if v.GatewayArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("GatewayArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDescribeGatewayInstanceInput(v *DescribeGatewayInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeGatewayInstanceInput"} + if v.GatewayInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("GatewayInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeOfferingInput(v *DescribeOfferingInput) error { if v == nil { return nil @@ -1307,6 +2132,42 @@ func validateOpPurchaseOfferingInput(v *PurchaseOfferingInput) error { } } +func validateOpRemoveBridgeOutputInput(v *RemoveBridgeOutputInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveBridgeOutputInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if v.OutputName == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpRemoveBridgeSourceInput(v *RemoveBridgeSourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RemoveBridgeSourceInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if v.SourceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRemoveFlowMediaStreamInput(v *RemoveFlowMediaStreamInput) error { if v == nil { return nil @@ -1463,6 +2324,75 @@ func validateOpUntagResourceInput(v *UntagResourceInput) error { } } +func validateOpUpdateBridgeInput(v *UpdateBridgeInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBridgeInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateBridgeOutputInput(v *UpdateBridgeOutputInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBridgeOutputInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if v.OutputName == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutputName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateBridgeSourceInput(v *UpdateBridgeSourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBridgeSourceInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if v.SourceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SourceName")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateBridgeStateInput(v *UpdateBridgeStateInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateBridgeStateInput"} + if v.BridgeArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("BridgeArn")) + } + if len(v.DesiredState) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DesiredState")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateFlowEntitlementInput(v *UpdateFlowEntitlementInput) error { if v == nil { return nil @@ -1559,3 +2489,18 @@ func validateOpUpdateFlowSourceInput(v *UpdateFlowSourceInput) error { return nil } } + +func validateOpUpdateGatewayInstanceInput(v *UpdateGatewayInstanceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateGatewayInstanceInput"} + if v.GatewayInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("GatewayInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/omics/internal/endpoints/endpoints.go b/service/omics/internal/endpoints/endpoints.go index 671977c91cb..95aca58d425 100644 --- a/service/omics/internal/endpoints/endpoints.go +++ b/service/omics/internal/endpoints/endpoints.go @@ -134,6 +134,92 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.Aws, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "ap-southeast-1", + }: endpoints.Endpoint{ + Hostname: "omics.ap-southeast-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ap-southeast-1", + }, + }, + endpoints.EndpointKey{ + Region: "eu-central-1", + }: endpoints.Endpoint{ + Hostname: "omics.eu-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-central-1", + }, + }, + endpoints.EndpointKey{ + Region: "eu-west-1", + }: endpoints.Endpoint{ + Hostname: "omics.eu-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-west-1", + }, + }, + endpoints.EndpointKey{ + Region: "eu-west-2", + }: endpoints.Endpoint{ + Hostname: "omics.eu-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "eu-west-2", + }, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-1", + }: endpoints.Endpoint{ + Hostname: "omics-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-2", + }: endpoints.Endpoint{ + Hostname: "omics-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "us-east-1", + }: endpoints.Endpoint{ + Hostname: "omics.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "omics-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "us-west-2", + }: endpoints.Endpoint{ + Hostname: "omics.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + }, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "omics-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + }, + }, }, { ID: "aws-cn",