From c37c72ab935cbaa8816613808c1153c9da810583 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Tue, 21 Mar 2023 18:12:50 +0000 Subject: [PATCH] Regenerated Clients --- .../01f3e52e1761475d964bf791bdec640e.json | 8 + .../194b4436a4f04c74a346dd53d0986008.json | 8 + .../9fe738cbfcc6464ea0f409e69b4b3b87.json | 8 + .../bc95245c568d4ba19782cf78152bdbb0.json | 8 + .../feb5eb0a859d4ebdac8d3cfa283438e7.json | 8 + ..._DeleteMessagingStreamingConfigurations.go | 119 + ..._op_GetMessagingStreamingConfigurations.go | 124 + ..._op_PutMessagingStreamingConfigurations.go | 129 + service/chimesdkmessaging/deserializers.go | 517 ++ service/chimesdkmessaging/generated.json | 3 + service/chimesdkmessaging/serializers.go | 229 + service/chimesdkmessaging/types/enums.go | 18 + service/chimesdkmessaging/types/types.go | 16 + service/chimesdkmessaging/validators.go | 159 + .../cleanrooms/api_op_CreateCollaboration.go | 6 + .../api_op_CreateConfiguredTable.go | 6 + ...api_op_CreateConfiguredTableAssociation.go | 6 + service/cleanrooms/api_op_CreateMembership.go | 6 + .../cleanrooms/api_op_ListTagsForResource.go | 123 + service/cleanrooms/api_op_TagResource.go | 121 + service/cleanrooms/api_op_UntagResource.go | 122 + service/cleanrooms/deserializers.go | 364 + service/cleanrooms/doc.go | 15 +- service/cleanrooms/generated.json | 3 + service/cleanrooms/serializers.go | 244 + service/cleanrooms/types/enums.go | 2 + service/cleanrooms/types/types.go | 4 +- service/cleanrooms/validators.go | 123 + service/ec2/api_op_AllocateIpamPoolCidr.go | 4 +- .../ec2/api_op_CreateNetworkInsightsPath.go | 30 +- service/ec2/api_op_CreateSecurityGroup.go | 6 +- service/ec2/api_op_CreateSnapshot.go | 14 +- .../api_op_DescribeNetworkInsightsPaths.go | 31 +- service/ec2/api_op_GetIpamPoolAllocations.go | 9 +- .../ec2/api_op_ReleaseIpamPoolAllocation.go | 5 +- service/ec2/deserializers.go | 960 +++ service/ec2/serializers.go | 62 + service/ec2/types/types.go | 226 +- service/ec2/validators.go | 3 - .../api_op_BatchGetAssetPropertyValue.go | 2 +- .../iotsitewise/api_op_DescribeTimeSeries.go | 8 + service/iotsitewise/deserializers.go | 18 + service/iotsitewise/types/types.go | 8 + .../keyspaces/internal/endpoints/endpoints.go | 36 + service/mgn/api_client.go | 20 + .../mgn/api_op_ChangeServerLifeCycleState.go | 6 + service/mgn/api_op_DisconnectFromService.go | 6 + service/mgn/api_op_FinalizeCutover.go | 6 + service/mgn/api_op_ListExportErrors.go | 219 + service/mgn/api_op_ListExports.go | 213 + service/mgn/api_op_ListImportErrors.go | 219 + service/mgn/api_op_ListImports.go | 213 + service/mgn/api_op_MarkAsArchived.go | 6 + service/mgn/api_op_PutSourceServerAction.go | 18 + service/mgn/api_op_PutTemplateAction.go | 18 + service/mgn/api_op_RetryDataReplication.go | 6 + service/mgn/api_op_StartExport.go | 131 + service/mgn/api_op_StartImport.go | 163 + service/mgn/api_op_StartReplication.go | 6 + ...pi_op_UpdateSourceServerReplicationType.go | 6 + service/mgn/deserializers.go | 6210 +++++++++++------ service/mgn/generated.json | 7 + service/mgn/serializers.go | 614 ++ service/mgn/types/enums.go | 116 +- service/mgn/types/types.go | 279 + service/mgn/types/types_exported_test.go | 26 + service/mgn/validators.go | 181 + service/oam/internal/endpoints/endpoints.go | 8 + .../ssmsap/internal/endpoints/endpoints.go | 75 + 69 files changed, 10635 insertions(+), 2058 deletions(-) create mode 100644 .changelog/01f3e52e1761475d964bf791bdec640e.json create mode 100644 .changelog/194b4436a4f04c74a346dd53d0986008.json create mode 100644 .changelog/9fe738cbfcc6464ea0f409e69b4b3b87.json create mode 100644 .changelog/bc95245c568d4ba19782cf78152bdbb0.json create mode 100644 .changelog/feb5eb0a859d4ebdac8d3cfa283438e7.json create mode 100644 service/chimesdkmessaging/api_op_DeleteMessagingStreamingConfigurations.go create mode 100644 service/chimesdkmessaging/api_op_GetMessagingStreamingConfigurations.go create mode 100644 service/chimesdkmessaging/api_op_PutMessagingStreamingConfigurations.go create mode 100644 service/cleanrooms/api_op_ListTagsForResource.go create mode 100644 service/cleanrooms/api_op_TagResource.go create mode 100644 service/cleanrooms/api_op_UntagResource.go create mode 100644 service/mgn/api_op_ListExportErrors.go create mode 100644 service/mgn/api_op_ListExports.go create mode 100644 service/mgn/api_op_ListImportErrors.go create mode 100644 service/mgn/api_op_ListImports.go create mode 100644 service/mgn/api_op_StartExport.go create mode 100644 service/mgn/api_op_StartImport.go create mode 100644 service/mgn/types/types_exported_test.go diff --git a/.changelog/01f3e52e1761475d964bf791bdec640e.json b/.changelog/01f3e52e1761475d964bf791bdec640e.json new file mode 100644 index 00000000000..55c6b80f78d --- /dev/null +++ b/.changelog/01f3e52e1761475d964bf791bdec640e.json @@ -0,0 +1,8 @@ +{ + "id": "01f3e52e-1761-475d-964b-f791bdec640e", + "type": "feature", + "description": "Amazon Chime SDK messaging customers can now manage streaming configuration for messaging data for archival and analysis.", + "modules": [ + "service/chimesdkmessaging" + ] +} \ No newline at end of file diff --git a/.changelog/194b4436a4f04c74a346dd53d0986008.json b/.changelog/194b4436a4f04c74a346dd53d0986008.json new file mode 100644 index 00000000000..02d5bd0b181 --- /dev/null +++ b/.changelog/194b4436a4f04c74a346dd53d0986008.json @@ -0,0 +1,8 @@ +{ + "id": "194b4436-a4f0-4c74-a346-dd53d0986008", + "type": "feature", + "description": "This release adds support for AWS Network Firewall, AWS PrivateLink, and Gateway Load Balancers to Amazon VPC Reachability Analyzer, and it makes the path destination optional as long as a destination address in the filter at source is provided.", + "modules": [ + "service/ec2" + ] +} \ No newline at end of file diff --git a/.changelog/9fe738cbfcc6464ea0f409e69b4b3b87.json b/.changelog/9fe738cbfcc6464ea0f409e69b4b3b87.json new file mode 100644 index 00000000000..04fabdb4689 --- /dev/null +++ b/.changelog/9fe738cbfcc6464ea0f409e69b4b3b87.json @@ -0,0 +1,8 @@ +{ + "id": "9fe738cb-fcc6-464e-a0f4-09e69b4b3b87", + "type": "feature", + "description": "GA Release of AWS Clean Rooms, Added Tagging Functionality", + "modules": [ + "service/cleanrooms" + ] +} \ No newline at end of file diff --git a/.changelog/bc95245c568d4ba19782cf78152bdbb0.json b/.changelog/bc95245c568d4ba19782cf78152bdbb0.json new file mode 100644 index 00000000000..10915876672 --- /dev/null +++ b/.changelog/bc95245c568d4ba19782cf78152bdbb0.json @@ -0,0 +1,8 @@ +{ + "id": "bc95245c-568d-4ba1-9782-cf78152bdbb0", + "type": "feature", + "description": "This release introduces the Import and export feature and expansion of the post-launch actions", + "modules": [ + "service/mgn" + ] +} \ No newline at end of file diff --git a/.changelog/feb5eb0a859d4ebdac8d3cfa283438e7.json b/.changelog/feb5eb0a859d4ebdac8d3cfa283438e7.json new file mode 100644 index 00000000000..c8dc46ced05 --- /dev/null +++ b/.changelog/feb5eb0a859d4ebdac8d3cfa283438e7.json @@ -0,0 +1,8 @@ +{ + "id": "feb5eb0a-859d-4ebd-ac8d-3cfa283438e7", + "type": "feature", + "description": "Provide support for tagging of data streams and enabling tag based authorization for property alias", + "modules": [ + "service/iotsitewise" + ] +} \ No newline at end of file diff --git a/service/chimesdkmessaging/api_op_DeleteMessagingStreamingConfigurations.go b/service/chimesdkmessaging/api_op_DeleteMessagingStreamingConfigurations.go new file mode 100644 index 00000000000..96fd19ff3f4 --- /dev/null +++ b/service/chimesdkmessaging/api_op_DeleteMessagingStreamingConfigurations.go @@ -0,0 +1,119 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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 the streaming configurations for an AppInstance. For more information, +// see Streaming messaging data +// (https://docs.aws.amazon.com/chime-sdk/latest/dg/streaming-export.html) in the +// Amazon Chime SDK Developer Guide. +func (c *Client) DeleteMessagingStreamingConfigurations(ctx context.Context, params *DeleteMessagingStreamingConfigurationsInput, optFns ...func(*Options)) (*DeleteMessagingStreamingConfigurationsOutput, error) { + if params == nil { + params = &DeleteMessagingStreamingConfigurationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteMessagingStreamingConfigurations", params, optFns, c.addOperationDeleteMessagingStreamingConfigurationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteMessagingStreamingConfigurationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteMessagingStreamingConfigurationsInput struct { + + // The ARN of the streaming configurations being deleted. + // + // This member is required. + AppInstanceArn *string + + noSmithyDocumentSerde +} + +type DeleteMessagingStreamingConfigurationsOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteMessagingStreamingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteMessagingStreamingConfigurations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteMessagingStreamingConfigurations{}, 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 = addOpDeleteMessagingStreamingConfigurationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteMessagingStreamingConfigurations(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_opDeleteMessagingStreamingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "DeleteMessagingStreamingConfigurations", + } +} diff --git a/service/chimesdkmessaging/api_op_GetMessagingStreamingConfigurations.go b/service/chimesdkmessaging/api_op_GetMessagingStreamingConfigurations.go new file mode 100644 index 00000000000..0cd254d610e --- /dev/null +++ b/service/chimesdkmessaging/api_op_GetMessagingStreamingConfigurations.go @@ -0,0 +1,124 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the data streaming configuration for an AppInstance. For more +// information, see Streaming messaging data +// (https://docs.aws.amazon.com/chime-sdk/latest/dg/streaming-export.html) in the +// Amazon Chime SDK Developer Guide. +func (c *Client) GetMessagingStreamingConfigurations(ctx context.Context, params *GetMessagingStreamingConfigurationsInput, optFns ...func(*Options)) (*GetMessagingStreamingConfigurationsOutput, error) { + if params == nil { + params = &GetMessagingStreamingConfigurationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetMessagingStreamingConfigurations", params, optFns, c.addOperationGetMessagingStreamingConfigurationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetMessagingStreamingConfigurationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetMessagingStreamingConfigurationsInput struct { + + // The ARN of the streaming configurations. + // + // This member is required. + AppInstanceArn *string + + noSmithyDocumentSerde +} + +type GetMessagingStreamingConfigurationsOutput struct { + + // The streaming settings. + StreamingConfigurations []types.StreamingConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetMessagingStreamingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetMessagingStreamingConfigurations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetMessagingStreamingConfigurations{}, 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 = addOpGetMessagingStreamingConfigurationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetMessagingStreamingConfigurations(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_opGetMessagingStreamingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "GetMessagingStreamingConfigurations", + } +} diff --git a/service/chimesdkmessaging/api_op_PutMessagingStreamingConfigurations.go b/service/chimesdkmessaging/api_op_PutMessagingStreamingConfigurations.go new file mode 100644 index 00000000000..38ad43a0077 --- /dev/null +++ b/service/chimesdkmessaging/api_op_PutMessagingStreamingConfigurations.go @@ -0,0 +1,129 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package chimesdkmessaging + +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/chimesdkmessaging/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Sets the data streaming configuration for an AppInstance. For more information, +// see Streaming messaging data +// (https://docs.aws.amazon.com/chime-sdk/latest/dg/streaming-export.html) in the +// Amazon Chime SDK Developer Guide. +func (c *Client) PutMessagingStreamingConfigurations(ctx context.Context, params *PutMessagingStreamingConfigurationsInput, optFns ...func(*Options)) (*PutMessagingStreamingConfigurationsOutput, error) { + if params == nil { + params = &PutMessagingStreamingConfigurationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "PutMessagingStreamingConfigurations", params, optFns, c.addOperationPutMessagingStreamingConfigurationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*PutMessagingStreamingConfigurationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type PutMessagingStreamingConfigurationsInput struct { + + // The ARN of the streaming configuration. + // + // This member is required. + AppInstanceArn *string + + // The streaming configurations. + // + // This member is required. + StreamingConfigurations []types.StreamingConfiguration + + noSmithyDocumentSerde +} + +type PutMessagingStreamingConfigurationsOutput struct { + + // The requested streaming configurations. + StreamingConfigurations []types.StreamingConfiguration + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationPutMessagingStreamingConfigurationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpPutMessagingStreamingConfigurations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpPutMessagingStreamingConfigurations{}, 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 = addOpPutMessagingStreamingConfigurationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opPutMessagingStreamingConfigurations(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_opPutMessagingStreamingConfigurations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "chime", + OperationName: "PutMessagingStreamingConfigurations", + } +} diff --git a/service/chimesdkmessaging/deserializers.go b/service/chimesdkmessaging/deserializers.go index bc39b371c1c..88dff5ba52e 100644 --- a/service/chimesdkmessaging/deserializers.go +++ b/service/chimesdkmessaging/deserializers.go @@ -1998,6 +1998,107 @@ func awsRestjson1_deserializeOpErrorDeleteChannelModerator(response *smithyhttp. } } +type awsRestjson1_deserializeOpDeleteMessagingStreamingConfigurations struct { +} + +func (*awsRestjson1_deserializeOpDeleteMessagingStreamingConfigurations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteMessagingStreamingConfigurations) 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_deserializeOpErrorDeleteMessagingStreamingConfigurations(response, &metadata) + } + output := &DeleteMessagingStreamingConfigurationsOutput{} + 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_deserializeOpErrorDeleteMessagingStreamingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpDescribeChannel struct { } @@ -3913,6 +4014,171 @@ func awsRestjson1_deserializeOpDocumentGetMessagingSessionEndpointOutput(v **Get return nil } +type awsRestjson1_deserializeOpGetMessagingStreamingConfigurations struct { +} + +func (*awsRestjson1_deserializeOpGetMessagingStreamingConfigurations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetMessagingStreamingConfigurations) 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_deserializeOpErrorGetMessagingStreamingConfigurations(response, &metadata) + } + output := &GetMessagingStreamingConfigurationsOutput{} + 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_deserializeOpDocumentGetMessagingStreamingConfigurationsOutput(&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_deserializeOpErrorGetMessagingStreamingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentGetMessagingStreamingConfigurationsOutput(v **GetMessagingStreamingConfigurationsOutput, 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 *GetMessagingStreamingConfigurationsOutput + if *v == nil { + sv = &GetMessagingStreamingConfigurationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StreamingConfigurations": + if err := awsRestjson1_deserializeDocumentStreamingConfigurationList(&sv.StreamingConfigurations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpListChannelBans struct { } @@ -6018,6 +6284,174 @@ func awsRestjson1_deserializeOpDocumentPutChannelMembershipPreferencesOutput(v * return nil } +type awsRestjson1_deserializeOpPutMessagingStreamingConfigurations struct { +} + +func (*awsRestjson1_deserializeOpPutMessagingStreamingConfigurations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutMessagingStreamingConfigurations) 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_deserializeOpErrorPutMessagingStreamingConfigurations(response, &metadata) + } + output := &PutMessagingStreamingConfigurationsOutput{} + 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_deserializeOpDocumentPutMessagingStreamingConfigurationsOutput(&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_deserializeOpErrorPutMessagingStreamingConfigurations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ForbiddenException", errorCode): + return awsRestjson1_deserializeErrorForbiddenException(response, errorBody) + + case strings.EqualFold("NotFoundException", errorCode): + return awsRestjson1_deserializeErrorNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceFailureException", errorCode): + return awsRestjson1_deserializeErrorServiceFailureException(response, errorBody) + + case strings.EqualFold("ServiceUnavailableException", errorCode): + return awsRestjson1_deserializeErrorServiceUnavailableException(response, errorBody) + + case strings.EqualFold("ThrottledClientException", errorCode): + return awsRestjson1_deserializeErrorThrottledClientException(response, errorBody) + + case strings.EqualFold("UnauthorizedClientException", errorCode): + return awsRestjson1_deserializeErrorUnauthorizedClientException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentPutMessagingStreamingConfigurationsOutput(v **PutMessagingStreamingConfigurationsOutput, 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 *PutMessagingStreamingConfigurationsOutput + if *v == nil { + sv = &PutMessagingStreamingConfigurationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "StreamingConfigurations": + if err := awsRestjson1_deserializeDocumentStreamingConfigurationList(&sv.StreamingConfigurations, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpRedactChannelMessage struct { } @@ -10478,6 +10912,89 @@ func awsRestjson1_deserializeDocumentServiceUnavailableException(v **types.Servi return nil } +func awsRestjson1_deserializeDocumentStreamingConfiguration(v **types.StreamingConfiguration, 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.StreamingConfiguration + if *v == nil { + sv = &types.StreamingConfiguration{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "DataType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected MessagingDataType to be of type string, got %T instead", value) + } + sv.DataType = types.MessagingDataType(jtv) + } + + case "ResourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ChimeArn to be of type string, got %T instead", value) + } + sv.ResourceArn = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentStreamingConfigurationList(v *[]types.StreamingConfiguration, 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.StreamingConfiguration + if *v == nil { + cv = []types.StreamingConfiguration{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.StreamingConfiguration + destAddr := &col + if err := awsRestjson1_deserializeDocumentStreamingConfiguration(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSubChannelSummary(v **types.SubChannelSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/chimesdkmessaging/generated.json b/service/chimesdkmessaging/generated.json index 06d99278ed3..abda0fed0b4 100644 --- a/service/chimesdkmessaging/generated.json +++ b/service/chimesdkmessaging/generated.json @@ -22,6 +22,7 @@ "api_op_DeleteChannelMembership.go", "api_op_DeleteChannelMessage.go", "api_op_DeleteChannelModerator.go", + "api_op_DeleteMessagingStreamingConfigurations.go", "api_op_DescribeChannel.go", "api_op_DescribeChannelBan.go", "api_op_DescribeChannelFlow.go", @@ -34,6 +35,7 @@ "api_op_GetChannelMessage.go", "api_op_GetChannelMessageStatus.go", "api_op_GetMessagingSessionEndpoint.go", + "api_op_GetMessagingStreamingConfigurations.go", "api_op_ListChannelBans.go", "api_op_ListChannelFlows.go", "api_op_ListChannelMemberships.go", @@ -46,6 +48,7 @@ "api_op_ListSubChannels.go", "api_op_ListTagsForResource.go", "api_op_PutChannelMembershipPreferences.go", + "api_op_PutMessagingStreamingConfigurations.go", "api_op_RedactChannelMessage.go", "api_op_SearchChannels.go", "api_op_SendChannelMessage.go", diff --git a/service/chimesdkmessaging/serializers.go b/service/chimesdkmessaging/serializers.go index 1d936f830cd..76e637a226a 100644 --- a/service/chimesdkmessaging/serializers.go +++ b/service/chimesdkmessaging/serializers.go @@ -1208,6 +1208,64 @@ func awsRestjson1_serializeOpHttpBindingsDeleteChannelModeratorInput(v *DeleteCh return nil } +type awsRestjson1_serializeOpDeleteMessagingStreamingConfigurations struct { +} + +func (*awsRestjson1_serializeOpDeleteMessagingStreamingConfigurations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteMessagingStreamingConfigurations) 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.(*DeleteMessagingStreamingConfigurationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/streaming-configurations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "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_serializeOpHttpBindingsDeleteMessagingStreamingConfigurationsInput(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_serializeOpHttpBindingsDeleteMessagingStreamingConfigurationsInput(v *DeleteMessagingStreamingConfigurationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpDescribeChannel struct { } @@ -2024,6 +2082,64 @@ func awsRestjson1_serializeOpHttpBindingsGetMessagingSessionEndpointInput(v *Get return nil } +type awsRestjson1_serializeOpGetMessagingStreamingConfigurations struct { +} + +func (*awsRestjson1_serializeOpGetMessagingStreamingConfigurations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetMessagingStreamingConfigurations) 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.(*GetMessagingStreamingConfigurationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/streaming-configurations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + 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_serializeOpHttpBindingsGetMessagingStreamingConfigurationsInput(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_serializeOpHttpBindingsGetMessagingStreamingConfigurationsInput(v *GetMessagingStreamingConfigurationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpListChannelBans struct { } @@ -2877,6 +2993,89 @@ func awsRestjson1_serializeOpDocumentPutChannelMembershipPreferencesInput(v *Put return nil } +type awsRestjson1_serializeOpPutMessagingStreamingConfigurations struct { +} + +func (*awsRestjson1_serializeOpPutMessagingStreamingConfigurations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpPutMessagingStreamingConfigurations) 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.(*PutMessagingStreamingConfigurationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/app-instances/{AppInstanceArn}/streaming-configurations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + 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_serializeOpHttpBindingsPutMessagingStreamingConfigurationsInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentPutMessagingStreamingConfigurationsInput(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_serializeOpHttpBindingsPutMessagingStreamingConfigurationsInput(v *PutMessagingStreamingConfigurationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppInstanceArn == nil || len(*v.AppInstanceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member AppInstanceArn must not be empty")} + } + if v.AppInstanceArn != nil { + if err := encoder.SetURI("AppInstanceArn").String(*v.AppInstanceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentPutMessagingStreamingConfigurationsInput(v *PutMessagingStreamingConfigurationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.StreamingConfigurations != nil { + ok := object.Key("StreamingConfigurations") + if err := awsRestjson1_serializeDocumentStreamingConfigurationList(v.StreamingConfigurations, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpRedactChannelMessage struct { } @@ -4018,6 +4217,36 @@ func awsRestjson1_serializeDocumentSearchFieldValues(v []string, value smithyjso return nil } +func awsRestjson1_serializeDocumentStreamingConfiguration(v *types.StreamingConfiguration, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if len(v.DataType) > 0 { + ok := object.Key("DataType") + ok.String(string(v.DataType)) + } + + if v.ResourceArn != nil { + ok := object.Key("ResourceArn") + ok.String(*v.ResourceArn) + } + + return nil +} + +func awsRestjson1_serializeDocumentStreamingConfigurationList(v []types.StreamingConfiguration, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentStreamingConfiguration(&v[i], av); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/chimesdkmessaging/types/enums.go b/service/chimesdkmessaging/types/enums.go index c93bd170714..78b4cae7299 100644 --- a/service/chimesdkmessaging/types/enums.go +++ b/service/chimesdkmessaging/types/enums.go @@ -213,6 +213,24 @@ func (InvocationType) Values() []InvocationType { } } +type MessagingDataType string + +// Enum values for MessagingDataType +const ( + MessagingDataTypeChannel MessagingDataType = "Channel" + MessagingDataTypeChannelMessage MessagingDataType = "ChannelMessage" +) + +// Values returns all known values for MessagingDataType. 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 (MessagingDataType) Values() []MessagingDataType { + return []MessagingDataType{ + "Channel", + "ChannelMessage", + } +} + type PushNotificationType string // Enum values for PushNotificationType diff --git a/service/chimesdkmessaging/types/types.go b/service/chimesdkmessaging/types/types.go index a1d6790ed47..ce536c34aba 100644 --- a/service/chimesdkmessaging/types/types.go +++ b/service/chimesdkmessaging/types/types.go @@ -608,6 +608,22 @@ type SearchField struct { noSmithyDocumentSerde } +// The configuration for connecting a messaging stream to Amazon Kinesis. +type StreamingConfiguration struct { + + // The data type of the configuration. + // + // This member is required. + DataType MessagingDataType + + // The ARN of the resource in the configuration. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + // Summary of the sub-channels associated with the elastic channel. type SubChannelSummary struct { diff --git a/service/chimesdkmessaging/validators.go b/service/chimesdkmessaging/validators.go index 84097a977a9..74d58124bf3 100644 --- a/service/chimesdkmessaging/validators.go +++ b/service/chimesdkmessaging/validators.go @@ -290,6 +290,26 @@ func (m *validateOpDeleteChannelModerator) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +type validateOpDeleteMessagingStreamingConfigurations struct { +} + +func (*validateOpDeleteMessagingStreamingConfigurations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteMessagingStreamingConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteMessagingStreamingConfigurationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteMessagingStreamingConfigurationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDescribeChannelBan struct { } @@ -510,6 +530,26 @@ func (m *validateOpGetChannelMessageStatus) HandleInitialize(ctx context.Context return next.HandleInitialize(ctx, in) } +type validateOpGetMessagingStreamingConfigurations struct { +} + +func (*validateOpGetMessagingStreamingConfigurations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetMessagingStreamingConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetMessagingStreamingConfigurationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetMessagingStreamingConfigurationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListChannelBans struct { } @@ -750,6 +790,26 @@ func (m *validateOpPutChannelMembershipPreferences) HandleInitialize(ctx context return next.HandleInitialize(ctx, in) } +type validateOpPutMessagingStreamingConfigurations struct { +} + +func (*validateOpPutMessagingStreamingConfigurations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpPutMessagingStreamingConfigurations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*PutMessagingStreamingConfigurationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpPutMessagingStreamingConfigurationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRedactChannelMessage struct { } @@ -986,6 +1046,10 @@ func addOpDeleteChannelModeratorValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpDeleteChannelModerator{}, middleware.After) } +func addOpDeleteMessagingStreamingConfigurationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteMessagingStreamingConfigurations{}, middleware.After) +} + func addOpDescribeChannelBanValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDescribeChannelBan{}, middleware.After) } @@ -1030,6 +1094,10 @@ func addOpGetChannelMessageStatusValidationMiddleware(stack *middleware.Stack) e return stack.Initialize.Add(&validateOpGetChannelMessageStatus{}, middleware.After) } +func addOpGetMessagingStreamingConfigurationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetMessagingStreamingConfigurations{}, middleware.After) +} + func addOpListChannelBansValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListChannelBans{}, middleware.After) } @@ -1078,6 +1146,10 @@ func addOpPutChannelMembershipPreferencesValidationMiddleware(stack *middleware. return stack.Initialize.Add(&validateOpPutChannelMembershipPreferences{}, middleware.After) } +func addOpPutMessagingStreamingConfigurationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpPutMessagingStreamingConfigurations{}, middleware.After) +} + func addOpRedactChannelMessageValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRedactChannelMessage{}, middleware.After) } @@ -1302,6 +1374,41 @@ func validateSearchFields(v []types.SearchField) error { } } +func validateStreamingConfiguration(v *types.StreamingConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StreamingConfiguration"} + if len(v.DataType) == 0 { + invalidParams.Add(smithy.NewErrParamRequired("DataType")) + } + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateStreamingConfigurationList(v []types.StreamingConfiguration) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StreamingConfigurationList"} + for i := range v { + if err := validateStreamingConfiguration(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTag(v *types.Tag) error { if v == nil { return nil @@ -1654,6 +1761,21 @@ func validateOpDeleteChannelModeratorInput(v *DeleteChannelModeratorInput) error } } +func validateOpDeleteMessagingStreamingConfigurationsInput(v *DeleteMessagingStreamingConfigurationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteMessagingStreamingConfigurationsInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDescribeChannelBanInput(v *DescribeChannelBanInput) error { if v == nil { return nil @@ -1876,6 +1998,21 @@ func validateOpGetChannelMessageStatusInput(v *GetChannelMessageStatusInput) err } } +func validateOpGetMessagingStreamingConfigurationsInput(v *GetMessagingStreamingConfigurationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetMessagingStreamingConfigurationsInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListChannelBansInput(v *ListChannelBansInput) error { if v == nil { return nil @@ -2087,6 +2224,28 @@ func validateOpPutChannelMembershipPreferencesInput(v *PutChannelMembershipPrefe } } +func validateOpPutMessagingStreamingConfigurationsInput(v *PutMessagingStreamingConfigurationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "PutMessagingStreamingConfigurationsInput"} + if v.AppInstanceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppInstanceArn")) + } + if v.StreamingConfigurations == nil { + invalidParams.Add(smithy.NewErrParamRequired("StreamingConfigurations")) + } else if v.StreamingConfigurations != nil { + if err := validateStreamingConfigurationList(v.StreamingConfigurations); err != nil { + invalidParams.AddNested("StreamingConfigurations", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRedactChannelMessageInput(v *RedactChannelMessageInput) error { if v == nil { return nil diff --git a/service/cleanrooms/api_op_CreateCollaboration.go b/service/cleanrooms/api_op_CreateCollaboration.go index 366dcedfe98..4791d6cc050 100644 --- a/service/cleanrooms/api_op_CreateCollaboration.go +++ b/service/cleanrooms/api_op_CreateCollaboration.go @@ -64,6 +64,12 @@ type CreateCollaborationInput struct { // Rooms. DataEncryptionMetadata *types.DataEncryptionMetadata + // An optional label that you can assign to a resource when you create it. Each tag + // consists of a key and an optional value, both of which you define. When you use + // tagging, you can also use tag-based access control in IAM policies to control + // access to this resource. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/cleanrooms/api_op_CreateConfiguredTable.go b/service/cleanrooms/api_op_CreateConfiguredTable.go index 89ddd228550..95f278d242b 100644 --- a/service/cleanrooms/api_op_CreateConfiguredTable.go +++ b/service/cleanrooms/api_op_CreateConfiguredTable.go @@ -54,6 +54,12 @@ type CreateConfiguredTableInput struct { // A description for the configured table. Description *string + // An optional label that you can assign to a resource when you create it. Each tag + // consists of a key and an optional value, both of which you define. When you use + // tagging, you can also use tag-based access control in IAM policies to control + // access to this resource. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/cleanrooms/api_op_CreateConfiguredTableAssociation.go b/service/cleanrooms/api_op_CreateConfiguredTableAssociation.go index 8b0eac8f21b..021cf548fa1 100644 --- a/service/cleanrooms/api_op_CreateConfiguredTableAssociation.go +++ b/service/cleanrooms/api_op_CreateConfiguredTableAssociation.go @@ -58,6 +58,12 @@ type CreateConfiguredTableAssociationInput struct { // A description for the configured table association. Description *string + // An optional label that you can assign to a resource when you create it. Each tag + // consists of a key and an optional value, both of which you define. When you use + // tagging, you can also use tag-based access control in IAM policies to control + // access to this resource. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/cleanrooms/api_op_CreateMembership.go b/service/cleanrooms/api_op_CreateMembership.go index 8fe88c6060f..3b9a073cfc2 100644 --- a/service/cleanrooms/api_op_CreateMembership.go +++ b/service/cleanrooms/api_op_CreateMembership.go @@ -41,6 +41,12 @@ type CreateMembershipInput struct { // This member is required. QueryLogStatus types.MembershipQueryLogStatus + // An optional label that you can assign to a resource when you create it. Each tag + // consists of a key and an optional value, both of which you define. When you use + // tagging, you can also use tag-based access control in IAM policies to control + // access to this resource. + Tags map[string]string + noSmithyDocumentSerde } diff --git a/service/cleanrooms/api_op_ListTagsForResource.go b/service/cleanrooms/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..b5a15c1f6e5 --- /dev/null +++ b/service/cleanrooms/api_op_ListTagsForResource.go @@ -0,0 +1,123 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cleanrooms + +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" +) + +// Lists all of the tags that have been added to a resource. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name (ARN) associated with the resource you want to list + // tags on. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // A map of objects specifying each key name and value. + // + // This member is required. + Tags map[string]string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = 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 = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(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_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cleanrooms", + OperationName: "ListTagsForResource", + } +} diff --git a/service/cleanrooms/api_op_TagResource.go b/service/cleanrooms/api_op_TagResource.go new file mode 100644 index 00000000000..d7d01c0dbc1 --- /dev/null +++ b/service/cleanrooms/api_op_TagResource.go @@ -0,0 +1,121 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cleanrooms + +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" +) + +// Tags a resource. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) associated with the resource you want to tag. + // + // This member is required. + ResourceArn *string + + // A map of objects specifying each key name and value. + // + // This member is required. + Tags map[string]string + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = 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 = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(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_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cleanrooms", + OperationName: "TagResource", + } +} diff --git a/service/cleanrooms/api_op_UntagResource.go b/service/cleanrooms/api_op_UntagResource.go new file mode 100644 index 00000000000..ad23088c3e6 --- /dev/null +++ b/service/cleanrooms/api_op_UntagResource.go @@ -0,0 +1,122 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package cleanrooms + +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 tag or list of tags from a resource. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) associated with the resource you want to remove + // the tag from. + // + // This member is required. + ResourceArn *string + + // A list of key names of tags to be removed. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = 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 = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(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_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "cleanrooms", + OperationName: "UntagResource", + } +} diff --git a/service/cleanrooms/deserializers.go b/service/cleanrooms/deserializers.go index 92d06a2f25b..d1714ace307 100644 --- a/service/cleanrooms/deserializers.go +++ b/service/cleanrooms/deserializers.go @@ -3120,6 +3120,9 @@ func awsRestjson1_deserializeOpErrorListConfiguredTableAssociations(response *sm case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -3783,6 +3786,9 @@ func awsRestjson1_deserializeOpErrorListProtectedQueries(response *smithyhttp.Re case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4012,6 +4018,156 @@ func awsRestjson1_deserializeOpDocumentListSchemasOutput(v **ListSchemasOutput, return nil } +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpStartProtectedQuery struct { } @@ -4174,6 +4330,178 @@ func awsRestjson1_deserializeOpDocumentStartProtectedQueryOutput(v **StartProtec 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 + + 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("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(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 + + 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("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpUpdateCollaboration struct { } @@ -9211,6 +9539,42 @@ loop: return nil } +func awsRestjson1_deserializeDocumentTagMap(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 TagValue to be of type string, got %T instead", value) + } + parsedVal = jtv + } + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/cleanrooms/doc.go b/service/cleanrooms/doc.go index f29c99bd1c7..26e49192515 100644 --- a/service/cleanrooms/doc.go +++ b/service/cleanrooms/doc.go @@ -3,12 +3,11 @@ // Package cleanrooms provides the API client, operations, and parameter types for // AWS Clean Rooms Service. // -// AWS Clean Rooms is in preview release and is subject to change. Welcome to the -// AWS Clean Rooms API Reference. AWS Clean Rooms is an AWS service that helps -// multiple parties to join their data together in a secure collaboration -// workspace. In the collaboration, members who can query and receive results can -// get insights into the combined data without either party getting access to the -// other party's raw data. To learn more about AWS Clean Rooms concepts, -// procedures, and best practices, see the AWS Clean Rooms User Guide -// (https://docs.aws.amazon.com/clean-rooms/latest/userguide/what-is.html). +// Welcome to the AWS Clean Rooms API Reference. AWS Clean Rooms is an AWS service +// that helps multiple parties to join their data together in a secure +// collaboration workspace. In the collaboration, members who can query and receive +// results can get insights into the collective datasets without either party +// getting access to the other party's raw data. To learn more about AWS Clean +// Rooms concepts, procedures, and best practices, see the AWS Clean Rooms User +// Guide (https://docs.aws.amazon.com/clean-rooms/latest/userguide/what-is.html). package cleanrooms diff --git a/service/cleanrooms/generated.json b/service/cleanrooms/generated.json index d7cd8bdcfc5..7cbd240201c 100644 --- a/service/cleanrooms/generated.json +++ b/service/cleanrooms/generated.json @@ -35,7 +35,10 @@ "api_op_ListMemberships.go", "api_op_ListProtectedQueries.go", "api_op_ListSchemas.go", + "api_op_ListTagsForResource.go", "api_op_StartProtectedQuery.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", "api_op_UpdateCollaboration.go", "api_op_UpdateConfiguredTable.go", "api_op_UpdateConfiguredTableAnalysisRule.go", diff --git a/service/cleanrooms/serializers.go b/service/cleanrooms/serializers.go index dd2b2ed1757..26ae24ae99a 100644 --- a/service/cleanrooms/serializers.go +++ b/service/cleanrooms/serializers.go @@ -198,6 +198,13 @@ func awsRestjson1_serializeOpDocumentCreateCollaborationInput(v *CreateCollabora ok.String(string(v.QueryLogStatus)) } + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -290,6 +297,13 @@ func awsRestjson1_serializeOpDocumentCreateConfiguredTableInput(v *CreateConfigu } } + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -474,6 +488,13 @@ func awsRestjson1_serializeOpDocumentCreateConfiguredTableAssociationInput(v *Cr ok.String(*v.RoleArn) } + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -547,6 +568,13 @@ func awsRestjson1_serializeOpDocumentCreateMembershipInput(v *CreateMembershipIn ok.String(string(v.QueryLogStatus)) } + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -1894,6 +1922,64 @@ func awsRestjson1_serializeOpHttpBindingsListSchemasInput(v *ListSchemasInput, e 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_serializeOpStartProtectedQuery struct { } @@ -1989,6 +2075,153 @@ func awsRestjson1_serializeOpDocumentStartProtectedQueryInput(v *StartProtectedQ 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)} + } + + 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 + } + } + + return nil +} + +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_serializeDocumentTagMap(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/tags/{resourceArn}") + 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_serializeOpHttpBindingsUntagResourceInput(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_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, 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 + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateCollaboration struct { } @@ -2926,3 +3159,14 @@ func awsRestjson1_serializeDocumentTableReference(v types.TableReference, value } return nil } + +func awsRestjson1_serializeDocumentTagMap(v map[string]string, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + om.String(v[key]) + } + return nil +} diff --git a/service/cleanrooms/types/enums.go b/service/cleanrooms/types/enums.go index a724b46540c..78cdd2b9095 100644 --- a/service/cleanrooms/types/enums.go +++ b/service/cleanrooms/types/enums.go @@ -423,6 +423,7 @@ type ValidationExceptionReason string const ( ValidationExceptionReasonFieldValidationFailed ValidationExceptionReason = "FIELD_VALIDATION_FAILED" ValidationExceptionReasonInvalidConfiguration ValidationExceptionReason = "INVALID_CONFIGURATION" + ValidationExceptionReasonInvalidQuery ValidationExceptionReason = "INVALID_QUERY" ) // Values returns all known values for ValidationExceptionReason. Note that this @@ -432,5 +433,6 @@ func (ValidationExceptionReason) Values() []ValidationExceptionReason { return []ValidationExceptionReason{ "FIELD_VALIDATION_FAILED", "INVALID_CONFIGURATION", + "INVALID_QUERY", } } diff --git a/service/cleanrooms/types/types.go b/service/cleanrooms/types/types.go index 3f2d4888327..1969d456411 100644 --- a/service/cleanrooms/types/types.go +++ b/service/cleanrooms/types/types.go @@ -1136,7 +1136,7 @@ type Schema struct { // This member is required. Name *string - // The partition keys for the data set underlying this schema. + // The partition keys for the dataset underlying this schema. // // This member is required. PartitionKeys []Column @@ -1208,7 +1208,7 @@ type SchemaSummary struct { noSmithyDocumentSerde } -// A pointer to the data set that underlies this table. Currently, this can only be +// A pointer to the dataset that underlies this table. Currently, this can only be // an AWS Glue table. // // The following types satisfy this interface: diff --git a/service/cleanrooms/validators.go b/service/cleanrooms/validators.go index 7cc81db1893..ca212a20866 100644 --- a/service/cleanrooms/validators.go +++ b/service/cleanrooms/validators.go @@ -490,6 +490,26 @@ func (m *validateOpListSchemas) HandleInitialize(ctx context.Context, in middlew return next.HandleInitialize(ctx, in) } +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartProtectedQuery struct { } @@ -510,6 +530,46 @@ func (m *validateOpStartProtectedQuery) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateCollaboration struct { } @@ -726,10 +786,22 @@ func addOpListSchemasValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListSchemas{}, middleware.After) } +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + func addOpStartProtectedQueryValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartProtectedQuery{}, middleware.After) } +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + func addOpUpdateCollaborationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateCollaboration{}, middleware.After) } @@ -1542,6 +1614,21 @@ func validateOpListSchemasInput(v *ListSchemasInput) error { } } +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartProtectedQueryInput(v *StartProtectedQueryInput) error { if v == nil { return nil @@ -1574,6 +1661,42 @@ func validateOpStartProtectedQueryInput(v *StartProtectedQueryInput) error { } } +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateCollaborationInput(v *UpdateCollaborationInput) error { if v == nil { return nil diff --git a/service/ec2/api_op_AllocateIpamPoolCidr.go b/service/ec2/api_op_AllocateIpamPoolCidr.go index f0eb955692f..1d87f35e8b1 100644 --- a/service/ec2/api_op_AllocateIpamPoolCidr.go +++ b/service/ec2/api_op_AllocateIpamPoolCidr.go @@ -16,7 +16,9 @@ import ( // from an IPAM pool to another IPAM pool or to a resource. For more information, // see Allocate CIDRs // (https://docs.aws.amazon.com/vpc/latest/ipam/allocate-cidrs-ipam.html) in the -// Amazon VPC IPAM User Guide. +// Amazon VPC IPAM User Guide. This action creates an allocation with strong +// consistency. The returned CIDR will not overlap with any other allocations from +// the same pool. func (c *Client) AllocateIpamPoolCidr(ctx context.Context, params *AllocateIpamPoolCidrInput, optFns ...func(*Options)) (*AllocateIpamPoolCidrOutput, error) { if params == nil { params = &AllocateIpamPoolCidrInput{} diff --git a/service/ec2/api_op_CreateNetworkInsightsPath.go b/service/ec2/api_op_CreateNetworkInsightsPath.go index 82402c4c4e5..7bc1e28065d 100644 --- a/service/ec2/api_op_CreateNetworkInsightsPath.go +++ b/service/ec2/api_op_CreateNetworkInsightsPath.go @@ -14,7 +14,7 @@ import ( // Creates a path to analyze for reachability. Reachability Analyzer enables you to // analyze and debug network reachability between two resources in your virtual -// private cloud (VPC). For more information, see What is Reachability Analyzer +// private cloud (VPC). For more information, see the Reachability Analyzer Guide // (https://docs.aws.amazon.com/vpc/latest/reachability/). func (c *Client) CreateNetworkInsightsPath(ctx context.Context, params *CreateNetworkInsightsPathInput, optFns ...func(*Options)) (*CreateNetworkInsightsPathOutput, error) { if params == nil { @@ -40,23 +40,22 @@ type CreateNetworkInsightsPathInput struct { // This member is required. ClientToken *string - // The Amazon Web Services resource that is the destination of the path. - // - // This member is required. - Destination *string - // The protocol. // // This member is required. Protocol types.Protocol - // The Amazon Web Services resource that is the source of the path. + // The ID or ARN of the source. If the resource is in another account, you must + // specify an ARN. // // This member is required. Source *string - // The IP address of the Amazon Web Services resource that is the destination of - // the path. + // The ID or ARN of the destination. If the resource is in another account, you + // must specify an ARN. + Destination *string + + // The IP address of the destination. DestinationIp *string // The destination port. @@ -68,8 +67,17 @@ type CreateNetworkInsightsPathInput struct { // UnauthorizedOperation. DryRun *bool - // The IP address of the Amazon Web Services resource that is the source of the - // path. + // Scopes the analysis to network paths that match specific filters at the + // destination. If you specify this parameter, you can't specify the parameter for + // the destination IP address. + FilterAtDestination *types.PathRequestFilter + + // Scopes the analysis to network paths that match specific filters at the source. + // If you specify this parameter, you can't specify the parameters for the source + // IP address or the destination port. + FilterAtSource *types.PathRequestFilter + + // The IP address of the source. SourceIp *string // The tags to add to the path. diff --git a/service/ec2/api_op_CreateSecurityGroup.go b/service/ec2/api_op_CreateSecurityGroup.go index 5e4c6926c92..e9597974aee 100644 --- a/service/ec2/api_op_CreateSecurityGroup.go +++ b/service/ec2/api_op_CreateSecurityGroup.go @@ -53,9 +53,9 @@ func (c *Client) CreateSecurityGroup(ctx context.Context, params *CreateSecurity type CreateSecurityGroupInput struct { - // A description for the security group. This is informational only. Constraints: - // Up to 255 characters in length Constraints for EC2-Classic: ASCII characters - // Constraints for EC2-VPC: a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* + // A description for the security group. Constraints: Up to 255 characters in + // length Constraints for EC2-Classic: ASCII characters Constraints for EC2-VPC: + // a-z, A-Z, 0-9, spaces, and ._-:/()#,@[]+=&;{}!$* // // This member is required. Description *string diff --git a/service/ec2/api_op_CreateSnapshot.go b/service/ec2/api_op_CreateSnapshot.go index 179173f629b..be832bf8bdd 100644 --- a/service/ec2/api_op_CreateSnapshot.go +++ b/service/ec2/api_op_CreateSnapshot.go @@ -29,13 +29,13 @@ import ( // cannot pause all file writes to the volume, you should unmount the volume from // within the instance, issue the snapshot command, and then remount the volume to // ensure a consistent and complete snapshot. You may remount and use your volume -// while the snapshot status is pending. To create a snapshot for Amazon EBS -// volumes that serve as root devices, you should stop the instance before taking -// the snapshot. Snapshots that are taken from encrypted volumes are automatically -// encrypted. Volumes that are created from encrypted snapshots are also -// automatically encrypted. Your encrypted volumes and any associated snapshots -// always remain protected. You can tag your snapshots during creation. For more -// information, see Tag your Amazon EC2 resources +// while the snapshot status is pending. When you create a snapshot for an EBS +// volume that serves as a root device, we recommend that you stop the instance +// before taking the snapshot. Snapshots that are taken from encrypted volumes are +// automatically encrypted. Volumes that are created from encrypted snapshots are +// also automatically encrypted. Your encrypted volumes and any associated +// snapshots always remain protected. You can tag your snapshots during creation. +// For more information, see Tag your Amazon EC2 resources // (https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) in the // Amazon Elastic Compute Cloud User Guide. For more information, see Amazon // Elastic Block Store diff --git a/service/ec2/api_op_DescribeNetworkInsightsPaths.go b/service/ec2/api_op_DescribeNetworkInsightsPaths.go index 15659844405..677c367272c 100644 --- a/service/ec2/api_op_DescribeNetworkInsightsPaths.go +++ b/service/ec2/api_op_DescribeNetworkInsightsPaths.go @@ -41,12 +41,35 @@ type DescribeNetworkInsightsPathsInput struct { // * destination - The ID of // the resource. // - // * destination-port - The destination port. + // * filter-at-source.source-address - The source IPv4 address at + // the source. // - // * protocol - The - // protocol. + // * filter-at-source.source-port-range - The source port range at the + // source. // - // * source - The ID of the resource. + // * filter-at-source.destination-address - The destination IPv4 address + // at the source. + // + // * filter-at-source.destination-port-range - The destination port + // range at the source. + // + // * filter-at-destination.source-address - The source IPv4 + // address at the destination. + // + // * filter-at-destination.source-port-range - The + // source port range at the destination. + // + // * + // filter-at-destination.destination-address - The destination IPv4 address at the + // destination. + // + // * filter-at-destination.destination-port-range - The destination + // port range at the destination. + // + // * protocol - The protocol. + // + // * source - The ID of + // the resource. Filters []types.Filter // The maximum number of results to return with a single call. To retrieve the diff --git a/service/ec2/api_op_GetIpamPoolAllocations.go b/service/ec2/api_op_GetIpamPoolAllocations.go index 536798a4226..5fec91fee44 100644 --- a/service/ec2/api_op_GetIpamPoolAllocations.go +++ b/service/ec2/api_op_GetIpamPoolAllocations.go @@ -12,7 +12,14 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Get a list of all the CIDR allocations in an IPAM pool. +// Get a list of all the CIDR allocations in an IPAM pool. If you use this action +// after AllocateIpamPoolCidr +// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_AllocateIpamPoolCidr.html) +// or ReleaseIpamPoolAllocation +// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ReleaseIpamPoolAllocation.html), +// note that all EC2 API actions follow an eventual consistency +// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-api-troubleshooting.html#eventual-consistency) +// model. func (c *Client) GetIpamPoolAllocations(ctx context.Context, params *GetIpamPoolAllocationsInput, optFns ...func(*Options)) (*GetIpamPoolAllocationsOutput, error) { if params == nil { params = &GetIpamPoolAllocationsInput{} diff --git a/service/ec2/api_op_ReleaseIpamPoolAllocation.go b/service/ec2/api_op_ReleaseIpamPoolAllocation.go index cd4be9abb1b..cdf4675cc74 100644 --- a/service/ec2/api_op_ReleaseIpamPoolAllocation.go +++ b/service/ec2/api_op_ReleaseIpamPoolAllocation.go @@ -17,7 +17,10 @@ import ( // (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_ModifyIpamResourceCidr.html). // For more information, see Release an allocation // (https://docs.aws.amazon.com/vpc/latest/ipam/release-pool-alloc-ipam.html) in -// the Amazon VPC IPAM User Guide. +// the Amazon VPC IPAM User Guide. All EC2 API actions follow an eventual +// consistency +// (https://docs.aws.amazon.com/AWSEC2/latest/APIReference/query-api-troubleshooting.html#eventual-consistency) +// model. func (c *Client) ReleaseIpamPoolAllocation(ctx context.Context, params *ReleaseIpamPoolAllocationInput, optFns ...func(*Options)) (*ReleaseIpamPoolAllocationOutput, error) { if params == nil { params = &ReleaseIpamPoolAllocationInput{} diff --git a/service/ec2/deserializers.go b/service/ec2/deserializers.go index cb20d6ffc55..f41d8f39657 100644 --- a/service/ec2/deserializers.go +++ b/service/ec2/deserializers.go @@ -53579,6 +53579,49 @@ func awsEc2query_deserializeDocumentAdditionalDetail(v **types.AdditionalDetail, return err } + case strings.EqualFold("loadBalancerSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentAnalysisComponentList(&sv.LoadBalancers, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ruleGroupRuleOptionsPairSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentRuleGroupRuleOptionsPairList(&sv.RuleGroupRuleOptionsPairs, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ruleGroupTypePairSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentRuleGroupTypePairList(&sv.RuleGroupTypePairs, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ruleOptionSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentRuleOptionList(&sv.RuleOptions, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("serviceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceName = ptr.String(xtv) + } + + case strings.EqualFold("vpcEndpointService", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.VpcEndpointService, nodeDecoder); err != nil { + return err + } + default: // Do nothing and ignore the unexpected tag element err = decoder.Decoder.Skip() @@ -55158,6 +55201,32 @@ func awsEc2query_deserializeDocumentAnalysisRouteTableRoute(v **types.AnalysisRo originalDecoder := decoder decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) switch { + case strings.EqualFold("carrierGatewayId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CarrierGatewayId = ptr.String(xtv) + } + + case strings.EqualFold("coreNetworkArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.CoreNetworkArn = ptr.String(xtv) + } + case strings.EqualFold("destinationCidr", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -55223,6 +55292,19 @@ func awsEc2query_deserializeDocumentAnalysisRouteTableRoute(v **types.AnalysisRo sv.InstanceId = ptr.String(xtv) } + case strings.EqualFold("localGatewayId", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.LocalGatewayId = ptr.String(xtv) + } + case strings.EqualFold("natGatewayId", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -69285,6 +69367,18 @@ func awsEc2query_deserializeDocumentExplanation(v **types.Explanation, decoder s sv.ExplanationCode = ptr.String(xtv) } + case strings.EqualFold("firewallStatefulRule", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentFirewallStatefulRule(&sv.FirewallStatefulRule, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("firewallStatelessRule", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentFirewallStatelessRule(&sv.FirewallStatelessRule, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("ingressRouteTable", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.IngressRouteTable, nodeDecoder); err != nil { @@ -70586,6 +70680,297 @@ func awsEc2query_deserializeDocumentFederatedAuthentication(v **types.FederatedA return nil } +func awsEc2query_deserializeDocumentFilterPortRange(v **types.FilterPortRange, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FilterPortRange + if *v == nil { + sv = &types.FilterPortRange{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("fromPort", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.FromPort = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("toPort", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.ToPort = ptr.Int32(int32(i64)) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentFirewallStatefulRule(v **types.FirewallStatefulRule, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FirewallStatefulRule + if *v == nil { + sv = &types.FirewallStatefulRule{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("destinationPortSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPortRangeList(&sv.DestinationPorts, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("destinationSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentValueStringList(&sv.Destinations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("direction", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Direction = ptr.String(xtv) + } + + case strings.EqualFold("protocol", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Protocol = ptr.String(xtv) + } + + case strings.EqualFold("ruleAction", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RuleAction = ptr.String(xtv) + } + + case strings.EqualFold("ruleGroupArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RuleGroupArn = ptr.String(xtv) + } + + case strings.EqualFold("sourcePortSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPortRangeList(&sv.SourcePorts, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("sourceSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentValueStringList(&sv.Sources, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentFirewallStatelessRule(v **types.FirewallStatelessRule, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.FirewallStatelessRule + if *v == nil { + sv = &types.FirewallStatelessRule{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("destinationPortSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPortRangeList(&sv.DestinationPorts, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("destinationSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentValueStringList(&sv.Destinations, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("priority", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + sv.Priority = ptr.Int32(int32(i64)) + } + + case strings.EqualFold("protocolSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentProtocolIntList(&sv.Protocols, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("ruleAction", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RuleAction = ptr.String(xtv) + } + + case strings.EqualFold("ruleGroupArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RuleGroupArn = ptr.String(xtv) + } + + case strings.EqualFold("sourcePortSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPortRangeList(&sv.SourcePorts, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("sourceSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentValueStringList(&sv.Sources, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentFleetCapacityReservation(v **types.FleetCapacityReservation, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -96411,6 +96796,18 @@ func awsEc2query_deserializeDocumentNetworkInsightsPath(v **types.NetworkInsight sv.DestinationPort = ptr.Int32(int32(i64)) } + case strings.EqualFold("filterAtDestination", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPathFilter(&sv.FilterAtDestination, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("filterAtSource", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentPathFilter(&sv.FilterAtSource, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("networkInsightsPathArn", t.Name.Local): val, err := decoder.Value() if err != nil { @@ -98313,6 +98710,18 @@ func awsEc2query_deserializeDocumentPathComponent(v **types.PathComponent, decod return err } + case strings.EqualFold("firewallStatefulRule", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentFirewallStatefulRule(&sv.FirewallStatefulRule, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("firewallStatelessRule", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentFirewallStatelessRule(&sv.FirewallStatelessRule, nodeDecoder); err != nil { + return err + } + case strings.EqualFold("inboundHeader", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentAnalysisPacketHeader(&sv.InboundHeader, nodeDecoder); err != nil { @@ -98354,6 +98763,19 @@ func awsEc2query_deserializeDocumentPathComponent(v **types.PathComponent, decod sv.SequenceNumber = ptr.Int32(int32(i64)) } + case strings.EqualFold("serviceName", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.ServiceName = ptr.String(xtv) + } + case strings.EqualFold("sourceVpc", t.Name.Local): nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) if err := awsEc2query_deserializeDocumentAnalysisComponent(&sv.SourceVpc, nodeDecoder); err != nil { @@ -98466,6 +98888,80 @@ func awsEc2query_deserializeDocumentPathComponentListUnwrapped(v *[]types.PathCo *v = sv return nil } +func awsEc2query_deserializeDocumentPathFilter(v **types.PathFilter, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.PathFilter + if *v == nil { + sv = &types.PathFilter{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("destinationAddress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.DestinationAddress = ptr.String(xtv) + } + + case strings.EqualFold("destinationPortRange", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentFilterPortRange(&sv.DestinationPortRange, nodeDecoder); err != nil { + return err + } + + case strings.EqualFold("sourceAddress", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.SourceAddress = ptr.String(xtv) + } + + case strings.EqualFold("sourcePortRange", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentFilterPortRange(&sv.SourcePortRange, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + func awsEc2query_deserializeDocumentPathStatement(v **types.PathStatement, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -102174,6 +102670,94 @@ func awsEc2query_deserializeDocumentPropagatingVgwListUnwrapped(v *[]types.Propa *v = sv return nil } +func awsEc2query_deserializeDocumentProtocolIntList(v *[]int32, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []int32 + if *v == nil { + sv = make([]int32, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + memberDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + decoder = memberDecoder + switch { + case strings.EqualFold("item", t.Name.Local): + var col int32 + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + col = int32(i64) + } + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentProtocolIntListUnwrapped(v *[]int32, decoder smithyxml.NodeDecoder) error { + var sv []int32 + if *v == nil { + sv = make([]int32, 0) + } else { + sv = *v + } + + switch { + default: + var mv int32 + t := decoder.StartEl + _ = t + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + i64, err := strconv.ParseInt(xtv, 10, 64) + if err != nil { + return err + } + mv = int32(i64) + } + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentProtocolList(v *[]types.Protocol, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -106815,6 +107399,382 @@ func awsEc2query_deserializeDocumentRouteTableListUnwrapped(v *[]types.RouteTabl *v = sv return nil } +func awsEc2query_deserializeDocumentRuleGroupRuleOptionsPair(v **types.RuleGroupRuleOptionsPair, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RuleGroupRuleOptionsPair + if *v == nil { + sv = &types.RuleGroupRuleOptionsPair{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ruleGroupArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RuleGroupArn = ptr.String(xtv) + } + + case strings.EqualFold("ruleOptionSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentRuleOptionList(&sv.RuleOptions, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentRuleGroupRuleOptionsPairList(v *[]types.RuleGroupRuleOptionsPair, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.RuleGroupRuleOptionsPair + if *v == nil { + sv = make([]types.RuleGroupRuleOptionsPair, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.RuleGroupRuleOptionsPair + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentRuleGroupRuleOptionsPair(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentRuleGroupRuleOptionsPairListUnwrapped(v *[]types.RuleGroupRuleOptionsPair, decoder smithyxml.NodeDecoder) error { + var sv []types.RuleGroupRuleOptionsPair + if *v == nil { + sv = make([]types.RuleGroupRuleOptionsPair, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.RuleGroupRuleOptionsPair + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentRuleGroupRuleOptionsPair(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsEc2query_deserializeDocumentRuleGroupTypePair(v **types.RuleGroupTypePair, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RuleGroupTypePair + if *v == nil { + sv = &types.RuleGroupTypePair{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("ruleGroupArn", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RuleGroupArn = ptr.String(xtv) + } + + case strings.EqualFold("ruleGroupType", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.RuleGroupType = ptr.String(xtv) + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentRuleGroupTypePairList(v *[]types.RuleGroupTypePair, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.RuleGroupTypePair + if *v == nil { + sv = make([]types.RuleGroupTypePair, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.RuleGroupTypePair + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentRuleGroupTypePair(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentRuleGroupTypePairListUnwrapped(v *[]types.RuleGroupTypePair, decoder smithyxml.NodeDecoder) error { + var sv []types.RuleGroupTypePair + if *v == nil { + sv = make([]types.RuleGroupTypePair, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.RuleGroupTypePair + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentRuleGroupTypePair(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} +func awsEc2query_deserializeDocumentRuleOption(v **types.RuleOption, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv *types.RuleOption + if *v == nil { + sv = &types.RuleOption{} + } else { + sv = *v + } + + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + originalDecoder := decoder + decoder = smithyxml.WrapNodeDecoder(originalDecoder.Decoder, t) + switch { + case strings.EqualFold("keyword", t.Name.Local): + val, err := decoder.Value() + if err != nil { + return err + } + if val == nil { + break + } + { + xtv := string(val) + sv.Keyword = ptr.String(xtv) + } + + case strings.EqualFold("settingSet", t.Name.Local): + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + if err := awsEc2query_deserializeDocumentStringList(&sv.Settings, nodeDecoder); err != nil { + return err + } + + default: + // Do nothing and ignore the unexpected tag element + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentRuleOptionList(v *[]types.RuleOption, decoder smithyxml.NodeDecoder) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + var sv []types.RuleOption + if *v == nil { + sv = make([]types.RuleOption, 0) + } else { + sv = *v + } + + originalDecoder := decoder + for { + t, done, err := decoder.Token() + if err != nil { + return err + } + if done { + break + } + switch { + case strings.EqualFold("item", t.Name.Local): + var col types.RuleOption + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &col + if err := awsEc2query_deserializeDocumentRuleOption(&destAddr, nodeDecoder); err != nil { + return err + } + col = *destAddr + sv = append(sv, col) + + default: + err = decoder.Decoder.Skip() + if err != nil { + return err + } + + } + decoder = originalDecoder + } + *v = sv + return nil +} + +func awsEc2query_deserializeDocumentRuleOptionListUnwrapped(v *[]types.RuleOption, decoder smithyxml.NodeDecoder) error { + var sv []types.RuleOption + if *v == nil { + sv = make([]types.RuleOption, 0) + } else { + sv = *v + } + + switch { + default: + var mv types.RuleOption + t := decoder.StartEl + _ = t + nodeDecoder := smithyxml.WrapNodeDecoder(decoder.Decoder, t) + destAddr := &mv + if err := awsEc2query_deserializeDocumentRuleOption(&destAddr, nodeDecoder); err != nil { + return err + } + mv = *destAddr + sv = append(sv, mv) + } + *v = sv + return nil +} func awsEc2query_deserializeDocumentRunInstancesMonitoringEnabled(v **types.RunInstancesMonitoringEnabled, decoder smithyxml.NodeDecoder) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/ec2/serializers.go b/service/ec2/serializers.go index 30bd37161fd..d4137439c84 100644 --- a/service/ec2/serializers.go +++ b/service/ec2/serializers.go @@ -42820,6 +42820,37 @@ func awsEc2query_serializeDocumentPacketHeaderStatementRequest(v *types.PacketHe return nil } +func awsEc2query_serializeDocumentPathRequestFilter(v *types.PathRequestFilter, value query.Value) error { + object := value.Object() + _ = object + + if v.DestinationAddress != nil { + objectKey := object.Key("DestinationAddress") + objectKey.String(*v.DestinationAddress) + } + + if v.DestinationPortRange != nil { + objectKey := object.Key("DestinationPortRange") + if err := awsEc2query_serializeDocumentRequestFilterPortRange(v.DestinationPortRange, objectKey); err != nil { + return err + } + } + + if v.SourceAddress != nil { + objectKey := object.Key("SourceAddress") + objectKey.String(*v.SourceAddress) + } + + if v.SourcePortRange != nil { + objectKey := object.Key("SourcePortRange") + if err := awsEc2query_serializeDocumentRequestFilterPortRange(v.SourcePortRange, objectKey); err != nil { + return err + } + } + + return nil +} + func awsEc2query_serializeDocumentPathStatementRequest(v *types.PathStatementRequest, value query.Value) error { object := value.Object() _ = object @@ -43441,6 +43472,23 @@ func awsEc2query_serializeDocumentReplaceRootVolumeTaskIds(v []string, value que return nil } +func awsEc2query_serializeDocumentRequestFilterPortRange(v *types.RequestFilterPortRange, value query.Value) error { + object := value.Object() + _ = object + + if v.FromPort != nil { + objectKey := object.Key("FromPort") + objectKey.Integer(*v.FromPort) + } + + if v.ToPort != nil { + objectKey := object.Key("ToPort") + objectKey.Integer(*v.ToPort) + } + + return nil +} + func awsEc2query_serializeDocumentRequestHostIdList(v []string, value query.Value) error { array := value.Array("Item") @@ -49627,6 +49675,20 @@ func awsEc2query_serializeOpDocumentCreateNetworkInsightsPathInput(v *CreateNetw objectKey.Boolean(*v.DryRun) } + if v.FilterAtDestination != nil { + objectKey := object.Key("FilterAtDestination") + if err := awsEc2query_serializeDocumentPathRequestFilter(v.FilterAtDestination, objectKey); err != nil { + return err + } + } + + if v.FilterAtSource != nil { + objectKey := object.Key("FilterAtSource") + if err := awsEc2query_serializeDocumentPathRequestFilter(v.FilterAtSource, objectKey); err != nil { + return err + } + } + if len(v.Protocol) > 0 { objectKey := object.Key("Protocol") objectKey.String(string(v.Protocol)) diff --git a/service/ec2/types/types.go b/service/ec2/types/types.go index 29644235f45..4c7d9aef803 100644 --- a/service/ec2/types/types.go +++ b/service/ec2/types/types.go @@ -187,15 +187,35 @@ type AddIpamOperatingRegion struct { noSmithyDocumentSerde } -// Describes an additional detail for a path analysis. +// Describes an additional detail for a path analysis. For more information, see +// Reachability Analyzer additional detail codes +// (https://docs.aws.amazon.com/vpc/latest/reachability/additional-detail-codes.html). type AdditionalDetail struct { - // The information type. + // The additional detail code. AdditionalDetailType *string // The path component. Component *AnalysisComponent + // The load balancers. + LoadBalancers []AnalysisComponent + + // The rule options. + RuleGroupRuleOptionsPairs []RuleGroupRuleOptionsPair + + // The rule group type. + RuleGroupTypePairs []RuleGroupTypePair + + // The rule options. + RuleOptions []RuleOption + + // The name of the VPC endpoint service. + ServiceName *string + + // The VPC endpoint service. + VpcEndpointService *AnalysisComponent + noSmithyDocumentSerde } @@ -441,6 +461,12 @@ type AnalysisPacketHeader struct { // Describes a route table route. type AnalysisRouteTableRoute struct { + // The ID of a carrier gateway. + CarrierGatewayId *string + + // The Amazon Resource Name (ARN) of a core network. + CoreNetworkArn *string + // The destination IPv4 address, in CIDR notation. DestinationCidr *string @@ -456,6 +482,9 @@ type AnalysisRouteTableRoute struct { // The ID of the instance, such as a NAT instance. InstanceId *string + // The ID of a local gateway. + LocalGatewayId *string + // The ID of a NAT gateway. NatGatewayId *string @@ -3580,6 +3609,12 @@ type Explanation struct { // The explanation code. ExplanationCode *string + // The Network Firewall stateful rule. + FirewallStatefulRule *FirewallStatefulRule + + // The Network Firewall stateless rule. + FirewallStatelessRule *FirewallStatelessRule + // The route table. IngressRouteTable *AnalysisComponent @@ -3946,6 +3981,78 @@ type Filter struct { noSmithyDocumentSerde } +// Describes a port range. +type FilterPortRange struct { + + // The first port in the range. + FromPort *int32 + + // The last port in the range. + ToPort *int32 + + noSmithyDocumentSerde +} + +// Describes a stateful rule. +type FirewallStatefulRule struct { + + // The destination ports. + DestinationPorts []PortRange + + // The destination IP addresses, in CIDR notation. + Destinations []string + + // The direction. The possible values are FORWARD and ANY. + Direction *string + + // The protocol. + Protocol *string + + // The rule action. The possible values are pass, drop, and alert. + RuleAction *string + + // The ARN of the stateful rule group. + RuleGroupArn *string + + // The source ports. + SourcePorts []PortRange + + // The source IP addresses, in CIDR notation. + Sources []string + + noSmithyDocumentSerde +} + +// Describes a stateless rule. +type FirewallStatelessRule struct { + + // The destination ports. + DestinationPorts []PortRange + + // The destination IP addresses, in CIDR notation. + Destinations []string + + // The rule priority. + Priority *int32 + + // The protocols. + Protocols []int32 + + // The rule action. The possible values are pass, drop, and forward_to_site. + RuleAction *string + + // The ARN of the stateless rule group. + RuleGroupArn *string + + // The source ports. + SourcePorts []PortRange + + // The source IP addresses, in CIDR notation. + Sources []string + + noSmithyDocumentSerde +} + // Information about a Capacity Reservation in a Capacity Reservation Fleet. type FleetCapacityReservation struct { @@ -10276,8 +10383,7 @@ type NetworkInsightsAnalysis struct { // (https://docs.aws.amazon.com/vpc/latest/reachability/explanation-codes.html). Explanations []Explanation - // The Amazon Resource Names (ARN) of the Amazon Web Services resources that the - // path must traverse. + // The Amazon Resource Names (ARN) of the resources that the path must traverse. FilterInArns []string // The components in the path from source to destination. @@ -10325,19 +10431,25 @@ type NetworkInsightsPath struct { // The time stamp when the path was created. CreatedDate *time.Time - // The Amazon Web Services resource that is the destination of the path. + // The ID of the destination. Destination *string // The Amazon Resource Name (ARN) of the destination. DestinationArn *string - // The IP address of the Amazon Web Services resource that is the destination of - // the path. + // The IP address of the destination. DestinationIp *string // The destination port. DestinationPort *int32 + // Scopes the analysis to network paths that match specific filters at the + // destination. + FilterAtDestination *PathFilter + + // Scopes the analysis to network paths that match specific filters at the source. + FilterAtSource *PathFilter + // The Amazon Resource Name (ARN) of the path. NetworkInsightsPathArn *string @@ -10347,14 +10459,13 @@ type NetworkInsightsPath struct { // The protocol. Protocol Protocol - // The Amazon Web Services resource that is the source of the path. + // The ID of the source. Source *string // The Amazon Resource Name (ARN) of the source. SourceArn *string - // The IP address of the Amazon Web Services resource that is the source of the - // path. + // The IP address of the source. SourceIp *string // The tags associated with the path. @@ -10810,6 +10921,12 @@ type PathComponent struct { // The explanation codes. Explanations []Explanation + // The Network Firewall stateful rule. + FirewallStatefulRule *FirewallStatefulRule + + // The Network Firewall stateless rule. + FirewallStatelessRule *FirewallStatelessRule + // The inbound header. InboundHeader *AnalysisPacketHeader @@ -10825,6 +10942,9 @@ type PathComponent struct { // The sequence number. SequenceNumber *int32 + // The name of the VPC endpoint service. + ServiceName *string + // The source VPC. SourceVpc *AnalysisComponent @@ -10843,6 +10963,44 @@ type PathComponent struct { noSmithyDocumentSerde } +// Describes a set of filters for a path analysis. Use path filters to scope the +// analysis when there can be multiple resulting paths. +type PathFilter struct { + + // The destination IPv4 address. + DestinationAddress *string + + // The destination port range. + DestinationPortRange *FilterPortRange + + // The source IPv4 address. + SourceAddress *string + + // The source port range. + SourcePortRange *FilterPortRange + + noSmithyDocumentSerde +} + +// Describes a set of filters for a path analysis. Use path filters to scope the +// analysis when there can be multiple resulting paths. +type PathRequestFilter struct { + + // The destination IPv4 address. + DestinationAddress *string + + // The destination port range. + DestinationPortRange *RequestFilterPortRange + + // The source IPv4 address. + SourceAddress *string + + // The source port range. + SourcePortRange *RequestFilterPortRange + + noSmithyDocumentSerde +} + // Describes a path statement. type PathStatement struct { @@ -11744,6 +11902,18 @@ type ReplaceRootVolumeTask struct { noSmithyDocumentSerde } +// Describes a port range. +type RequestFilterPortRange struct { + + // The first port in the range. + FromPort *int32 + + // The last port in the range. + ToPort *int32 + + noSmithyDocumentSerde +} + // A tag on an IPAM resource. type RequestIpamResourceTag struct { @@ -12685,6 +12855,42 @@ type RouteTableAssociationState struct { noSmithyDocumentSerde } +// Describes the rule options for a stateful rule group. +type RuleGroupRuleOptionsPair struct { + + // The ARN of the rule group. + RuleGroupArn *string + + // The rule options. + RuleOptions []RuleOption + + noSmithyDocumentSerde +} + +// Describes the type of a stateful rule group. +type RuleGroupTypePair struct { + + // The ARN of the rule group. + RuleGroupArn *string + + // The rule group type. The possible values are Domain List and Suricata. + RuleGroupType *string + + noSmithyDocumentSerde +} + +// Describes additional settings for a stateful rule. +type RuleOption struct { + + // The Suricata keyword. + Keyword *string + + // The settings for the keyword. + Settings []string + + noSmithyDocumentSerde +} + // Describes the monitoring of an instance. type RunInstancesMonitoringEnabled struct { diff --git a/service/ec2/validators.go b/service/ec2/validators.go index 045f5510e7b..279b6bc82f2 100644 --- a/service/ec2/validators.go +++ b/service/ec2/validators.go @@ -12210,9 +12210,6 @@ func validateOpCreateNetworkInsightsPathInput(v *CreateNetworkInsightsPathInput) if v.Source == nil { invalidParams.Add(smithy.NewErrParamRequired("Source")) } - if v.Destination == nil { - invalidParams.Add(smithy.NewErrParamRequired("Destination")) - } if len(v.Protocol) == 0 { invalidParams.Add(smithy.NewErrParamRequired("Protocol")) } diff --git a/service/iotsitewise/api_op_BatchGetAssetPropertyValue.go b/service/iotsitewise/api_op_BatchGetAssetPropertyValue.go index a8b9e6ac6cd..8d7f3558564 100644 --- a/service/iotsitewise/api_op_BatchGetAssetPropertyValue.go +++ b/service/iotsitewise/api_op_BatchGetAssetPropertyValue.go @@ -34,7 +34,7 @@ func (c *Client) BatchGetAssetPropertyValue(ctx context.Context, params *BatchGe type BatchGetAssetPropertyValueInput struct { // The list of asset property value entries for the batch get request. You can - // specify up to 16 entries per request. + // specify up to 128 entries per request. // // This member is required. Entries []types.BatchGetAssetPropertyValueEntry diff --git a/service/iotsitewise/api_op_DescribeTimeSeries.go b/service/iotsitewise/api_op_DescribeTimeSeries.go index 31573dde531..408a3ca8cf3 100644 --- a/service/iotsitewise/api_op_DescribeTimeSeries.go +++ b/service/iotsitewise/api_op_DescribeTimeSeries.go @@ -64,6 +64,14 @@ type DescribeTimeSeriesOutput struct { // This member is required. DataType types.PropertyDataType + // The ARN + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the time series, which has the following format. + // arn:${Partition}:iotsitewise:${Region}:${Account}:time-series/${TimeSeriesId} + // + // This member is required. + TimeSeriesArn *string + // The date that the time series was created, in Unix epoch time. // // This member is required. diff --git a/service/iotsitewise/deserializers.go b/service/iotsitewise/deserializers.go index a4924a4b5fc..fb0aeea0f9b 100644 --- a/service/iotsitewise/deserializers.go +++ b/service/iotsitewise/deserializers.go @@ -6631,6 +6631,15 @@ func awsRestjson1_deserializeOpDocumentDescribeTimeSeriesOutput(v **DescribeTime sv.PropertyId = ptr.String(jtv) } + case "timeSeriesArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.TimeSeriesArn = ptr.String(jtv) + } + case "timeSeriesCreationDate": if value != nil { switch jtv := value.(type) { @@ -18728,6 +18737,15 @@ func awsRestjson1_deserializeDocumentTimeSeriesSummary(v **types.TimeSeriesSumma sv.PropertyId = ptr.String(jtv) } + case "timeSeriesArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.TimeSeriesArn = ptr.String(jtv) + } + case "timeSeriesCreationDate": if value != nil { switch jtv := value.(type) { diff --git a/service/iotsitewise/types/types.go b/service/iotsitewise/types/types.go index 836dba7fee3..56c7df4cebe 100644 --- a/service/iotsitewise/types/types.go +++ b/service/iotsitewise/types/types.go @@ -2076,6 +2076,14 @@ type TimeSeriesSummary struct { // This member is required. DataType PropertyDataType + // The ARN + // (https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html) of + // the time series, which has the following format. + // arn:${Partition}:iotsitewise:${Region}:${Account}:time-series/${TimeSeriesId} + // + // This member is required. + TimeSeriesArn *string + // The date that the time series was created, in Unix epoch time. // // This member is required. diff --git a/service/keyspaces/internal/endpoints/endpoints.go b/service/keyspaces/internal/endpoints/endpoints.go index c3641506fe2..fb7481b6f59 100644 --- a/service/keyspaces/internal/endpoints/endpoints.go +++ b/service/keyspaces/internal/endpoints/endpoints.go @@ -349,6 +349,24 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-gov-east-1", }, }, + endpoints.EndpointKey{ + Region: "us-gov-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cassandra.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + }, + endpoints.EndpointKey{ + Region: "us-gov-east-1-fips", + }: endpoints.Endpoint{ + Hostname: "cassandra.us-gov-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-east-1", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "us-gov-west-1", }: endpoints.Endpoint{ @@ -357,6 +375,24 @@ var defaultPartitions = endpoints.Partitions{ Region: "us-gov-west-1", }, }, + endpoints.EndpointKey{ + Region: "us-gov-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "cassandra.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + }, + endpoints.EndpointKey{ + Region: "us-gov-west-1-fips", + }: endpoints.Endpoint{ + Hostname: "cassandra.us-gov-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-gov-west-1", + }, + Deprecated: aws.TrueTernary, + }, }, }, } diff --git a/service/mgn/api_client.go b/service/mgn/api_client.go index ac662418577..25324bbcf34 100644 --- a/service/mgn/api_client.go +++ b/service/mgn/api_client.go @@ -4,6 +4,7 @@ package mgn import ( "context" + cryptorand "crypto/rand" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/aws/defaults" awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" @@ -15,6 +16,7 @@ import ( smithydocument "github.com/aws/smithy-go/document" "github.com/aws/smithy-go/logging" "github.com/aws/smithy-go/middleware" + smithyrand "github.com/aws/smithy-go/rand" smithyhttp "github.com/aws/smithy-go/transport/http" "net" "net/http" @@ -48,6 +50,8 @@ func New(options Options, optFns ...func(*Options)) *Client { resolveDefaultEndpointConfiguration(&options) + resolveIdempotencyTokenProvider(&options) + for _, fn := range optFns { fn(&options) } @@ -84,6 +88,10 @@ type Options struct { // Signature Version 4 (SigV4) Signer HTTPSignerV4 HTTPSignerV4 + // Provides idempotency tokens values that will be automatically populated into + // idempotent API operations. + IdempotencyTokenProvider IdempotencyTokenProvider + // The logger writer interface to write logging messages to. Logger logging.Logger @@ -378,6 +386,13 @@ func newDefaultV4Signer(o Options) *v4.Signer { }) } +func resolveIdempotencyTokenProvider(o *Options) { + if o.IdempotencyTokenProvider != nil { + return + } + o.IdempotencyTokenProvider = smithyrand.NewUUIDIdempotencyToken(cryptorand.Reader) +} + func addRetryMiddlewares(stack *middleware.Stack, o Options) error { mo := retry.AddRetryMiddlewaresOptions{ Retryer: o.Retryer, @@ -416,6 +431,11 @@ func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { return nil } +// IdempotencyTokenProvider interface for providing idempotency token +type IdempotencyTokenProvider interface { + GetIdempotencyToken() (string, error) +} + func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { return awsmiddleware.AddRequestIDRetrieverMiddleware(stack) } diff --git a/service/mgn/api_op_ChangeServerLifeCycleState.go b/service/mgn/api_op_ChangeServerLifeCycleState.go index c728163bca7..c0c429e94e2 100644 --- a/service/mgn/api_op_ChangeServerLifeCycleState.go +++ b/service/mgn/api_op_ChangeServerLifeCycleState.go @@ -57,6 +57,9 @@ type ChangeServerLifeCycleStateOutput struct { // Source server data replication info. DataReplicationInfo *types.DataReplicationInfo + // Source server fqdn for action framework. + FqdnForActionFramework *string + // Source server archived status. IsArchived *bool @@ -78,6 +81,9 @@ type ChangeServerLifeCycleStateOutput struct { // Source server Tags. Tags map[string]string + // Source server user provided ID. + UserProvidedID *string + // Source server vCenter client id. VcenterClientID *string diff --git a/service/mgn/api_op_DisconnectFromService.go b/service/mgn/api_op_DisconnectFromService.go index e8fbdaa5fa5..79a5489157c 100644 --- a/service/mgn/api_op_DisconnectFromService.go +++ b/service/mgn/api_op_DisconnectFromService.go @@ -59,6 +59,9 @@ type DisconnectFromServiceOutput struct { // Source server data replication info. DataReplicationInfo *types.DataReplicationInfo + // Source server fqdn for action framework. + FqdnForActionFramework *string + // Source server archived status. IsArchived *bool @@ -80,6 +83,9 @@ type DisconnectFromServiceOutput struct { // Source server Tags. Tags map[string]string + // Source server user provided ID. + UserProvidedID *string + // Source server vCenter client id. VcenterClientID *string diff --git a/service/mgn/api_op_FinalizeCutover.go b/service/mgn/api_op_FinalizeCutover.go index 402e9f8f08c..efb8096df42 100644 --- a/service/mgn/api_op_FinalizeCutover.go +++ b/service/mgn/api_op_FinalizeCutover.go @@ -58,6 +58,9 @@ type FinalizeCutoverOutput struct { // Source server data replication info. DataReplicationInfo *types.DataReplicationInfo + // Source server fqdn for action framework. + FqdnForActionFramework *string + // Source server archived status. IsArchived *bool @@ -79,6 +82,9 @@ type FinalizeCutoverOutput struct { // Source server Tags. Tags map[string]string + // Source server user provided ID. + UserProvidedID *string + // Source server vCenter client id. VcenterClientID *string diff --git a/service/mgn/api_op_ListExportErrors.go b/service/mgn/api_op_ListExportErrors.go new file mode 100644 index 00000000000..6f490539034 --- /dev/null +++ b/service/mgn/api_op_ListExportErrors.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +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/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List export errors. +func (c *Client) ListExportErrors(ctx context.Context, params *ListExportErrorsInput, optFns ...func(*Options)) (*ListExportErrorsOutput, error) { + if params == nil { + params = &ListExportErrorsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListExportErrors", params, optFns, c.addOperationListExportErrorsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListExportErrorsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// List export errors request. +type ListExportErrorsInput struct { + + // List export errors request export id. + // + // This member is required. + ExportID *string + + // List export errors request max results. + MaxResults int32 + + // List export errors request next token. + NextToken *string + + noSmithyDocumentSerde +} + +// List export errors response. +type ListExportErrorsOutput struct { + + // List export errors response items. + Items []types.ExportTaskError + + // List export errors response next token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListExportErrorsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListExportErrors{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListExportErrors{}, 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 = addOpListExportErrorsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListExportErrors(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 +} + +// ListExportErrorsAPIClient is a client that implements the ListExportErrors +// operation. +type ListExportErrorsAPIClient interface { + ListExportErrors(context.Context, *ListExportErrorsInput, ...func(*Options)) (*ListExportErrorsOutput, error) +} + +var _ ListExportErrorsAPIClient = (*Client)(nil) + +// ListExportErrorsPaginatorOptions is the paginator options for ListExportErrors +type ListExportErrorsPaginatorOptions struct { + // List export errors request max results. + 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 +} + +// ListExportErrorsPaginator is a paginator for ListExportErrors +type ListExportErrorsPaginator struct { + options ListExportErrorsPaginatorOptions + client ListExportErrorsAPIClient + params *ListExportErrorsInput + nextToken *string + firstPage bool +} + +// NewListExportErrorsPaginator returns a new ListExportErrorsPaginator +func NewListExportErrorsPaginator(client ListExportErrorsAPIClient, params *ListExportErrorsInput, optFns ...func(*ListExportErrorsPaginatorOptions)) *ListExportErrorsPaginator { + if params == nil { + params = &ListExportErrorsInput{} + } + + options := ListExportErrorsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListExportErrorsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListExportErrorsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListExportErrors page. +func (p *ListExportErrorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListExportErrorsOutput, 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.ListExportErrors(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_opListExportErrors(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "ListExportErrors", + } +} diff --git a/service/mgn/api_op_ListExports.go b/service/mgn/api_op_ListExports.go new file mode 100644 index 00000000000..317094d2edf --- /dev/null +++ b/service/mgn/api_op_ListExports.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +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/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List exports. +func (c *Client) ListExports(ctx context.Context, params *ListExportsInput, optFns ...func(*Options)) (*ListExportsOutput, error) { + if params == nil { + params = &ListExportsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListExports", params, optFns, c.addOperationListExportsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListExportsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// List export request. +type ListExportsInput struct { + + // List exports request filters. + Filters *types.ListExportsRequestFilters + + // List export request max results. + MaxResults int32 + + // List export request next token. + NextToken *string + + noSmithyDocumentSerde +} + +// List export response. +type ListExportsOutput struct { + + // List export response items. + Items []types.ExportTask + + // List export response next token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListExportsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListExports{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListExports{}, 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_opListExports(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 +} + +// ListExportsAPIClient is a client that implements the ListExports operation. +type ListExportsAPIClient interface { + ListExports(context.Context, *ListExportsInput, ...func(*Options)) (*ListExportsOutput, error) +} + +var _ ListExportsAPIClient = (*Client)(nil) + +// ListExportsPaginatorOptions is the paginator options for ListExports +type ListExportsPaginatorOptions struct { + // List export request max results. + 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 +} + +// ListExportsPaginator is a paginator for ListExports +type ListExportsPaginator struct { + options ListExportsPaginatorOptions + client ListExportsAPIClient + params *ListExportsInput + nextToken *string + firstPage bool +} + +// NewListExportsPaginator returns a new ListExportsPaginator +func NewListExportsPaginator(client ListExportsAPIClient, params *ListExportsInput, optFns ...func(*ListExportsPaginatorOptions)) *ListExportsPaginator { + if params == nil { + params = &ListExportsInput{} + } + + options := ListExportsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListExportsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListExportsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListExports page. +func (p *ListExportsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListExportsOutput, 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.ListExports(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_opListExports(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "ListExports", + } +} diff --git a/service/mgn/api_op_ListImportErrors.go b/service/mgn/api_op_ListImportErrors.go new file mode 100644 index 00000000000..d6073d5f176 --- /dev/null +++ b/service/mgn/api_op_ListImportErrors.go @@ -0,0 +1,219 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +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/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List import errors. +func (c *Client) ListImportErrors(ctx context.Context, params *ListImportErrorsInput, optFns ...func(*Options)) (*ListImportErrorsOutput, error) { + if params == nil { + params = &ListImportErrorsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListImportErrors", params, optFns, c.addOperationListImportErrorsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListImportErrorsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// List import errors request. +type ListImportErrorsInput struct { + + // List import errors request import id. + // + // This member is required. + ImportID *string + + // List import errors request max results. + MaxResults int32 + + // List import errors request next token. + NextToken *string + + noSmithyDocumentSerde +} + +// List imports errors response. +type ListImportErrorsOutput struct { + + // List imports errors response items. + Items []types.ImportTaskError + + // List imports errors response next token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListImportErrorsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListImportErrors{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListImportErrors{}, 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 = addOpListImportErrorsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListImportErrors(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 +} + +// ListImportErrorsAPIClient is a client that implements the ListImportErrors +// operation. +type ListImportErrorsAPIClient interface { + ListImportErrors(context.Context, *ListImportErrorsInput, ...func(*Options)) (*ListImportErrorsOutput, error) +} + +var _ ListImportErrorsAPIClient = (*Client)(nil) + +// ListImportErrorsPaginatorOptions is the paginator options for ListImportErrors +type ListImportErrorsPaginatorOptions struct { + // List import errors request max results. + 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 +} + +// ListImportErrorsPaginator is a paginator for ListImportErrors +type ListImportErrorsPaginator struct { + options ListImportErrorsPaginatorOptions + client ListImportErrorsAPIClient + params *ListImportErrorsInput + nextToken *string + firstPage bool +} + +// NewListImportErrorsPaginator returns a new ListImportErrorsPaginator +func NewListImportErrorsPaginator(client ListImportErrorsAPIClient, params *ListImportErrorsInput, optFns ...func(*ListImportErrorsPaginatorOptions)) *ListImportErrorsPaginator { + if params == nil { + params = &ListImportErrorsInput{} + } + + options := ListImportErrorsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListImportErrorsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListImportErrorsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListImportErrors page. +func (p *ListImportErrorsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListImportErrorsOutput, 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.ListImportErrors(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_opListImportErrors(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "ListImportErrors", + } +} diff --git a/service/mgn/api_op_ListImports.go b/service/mgn/api_op_ListImports.go new file mode 100644 index 00000000000..13317264ed4 --- /dev/null +++ b/service/mgn/api_op_ListImports.go @@ -0,0 +1,213 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +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/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// List imports. +func (c *Client) ListImports(ctx context.Context, params *ListImportsInput, optFns ...func(*Options)) (*ListImportsOutput, error) { + if params == nil { + params = &ListImportsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListImports", params, optFns, c.addOperationListImportsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListImportsOutput) + out.ResultMetadata = metadata + return out, nil +} + +// List imports request. +type ListImportsInput struct { + + // List imports request filters. + Filters *types.ListImportsRequestFilters + + // List imports request max results. + MaxResults int32 + + // List imports request next token. + NextToken *string + + noSmithyDocumentSerde +} + +// List import response. +type ListImportsOutput struct { + + // List import response items. + Items []types.ImportTask + + // List import response next token. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListImportsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListImports{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListImports{}, 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_opListImports(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 +} + +// ListImportsAPIClient is a client that implements the ListImports operation. +type ListImportsAPIClient interface { + ListImports(context.Context, *ListImportsInput, ...func(*Options)) (*ListImportsOutput, error) +} + +var _ ListImportsAPIClient = (*Client)(nil) + +// ListImportsPaginatorOptions is the paginator options for ListImports +type ListImportsPaginatorOptions struct { + // List imports request max results. + 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 +} + +// ListImportsPaginator is a paginator for ListImports +type ListImportsPaginator struct { + options ListImportsPaginatorOptions + client ListImportsAPIClient + params *ListImportsInput + nextToken *string + firstPage bool +} + +// NewListImportsPaginator returns a new ListImportsPaginator +func NewListImportsPaginator(client ListImportsAPIClient, params *ListImportsInput, optFns ...func(*ListImportsPaginatorOptions)) *ListImportsPaginator { + if params == nil { + params = &ListImportsInput{} + } + + options := ListImportsPaginatorOptions{} + if params.MaxResults != 0 { + options.Limit = params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListImportsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListImportsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListImports page. +func (p *ListImportsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListImportsOutput, 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.ListImports(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_opListImports(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "ListImports", + } +} diff --git a/service/mgn/api_op_MarkAsArchived.go b/service/mgn/api_op_MarkAsArchived.go index f15efd3743c..14a5c5303f2 100644 --- a/service/mgn/api_op_MarkAsArchived.go +++ b/service/mgn/api_op_MarkAsArchived.go @@ -50,6 +50,9 @@ type MarkAsArchivedOutput struct { // Source server data replication info. DataReplicationInfo *types.DataReplicationInfo + // Source server fqdn for action framework. + FqdnForActionFramework *string + // Source server archived status. IsArchived *bool @@ -71,6 +74,9 @@ type MarkAsArchivedOutput struct { // Source server Tags. Tags map[string]string + // Source server user provided ID. + UserProvidedID *string + // Source server vCenter client id. VcenterClientID *string diff --git a/service/mgn/api_op_PutSourceServerAction.go b/service/mgn/api_op_PutSourceServerAction.go index f9861f2eb8f..db0ade43b8a 100644 --- a/service/mgn/api_op_PutSourceServerAction.go +++ b/service/mgn/api_op_PutSourceServerAction.go @@ -57,9 +57,18 @@ type PutSourceServerActionInput struct { // Source server post migration custom action active status. Active *bool + // Source server post migration custom action category. + Category types.ActionCategory + + // Source server post migration custom action description. + Description *string + // Source server post migration custom action document version. DocumentVersion *string + // Source server post migration custom action external parameters. + ExternalParameters map[string]types.SsmExternalParameter + // Source server post migration custom action must succeed for cutover. MustSucceedForCutover *bool @@ -83,12 +92,21 @@ type PutSourceServerActionOutput struct { // Source server post migration custom action active status. Active *bool + // Source server post migration custom action category. + Category types.ActionCategory + + // Source server post migration custom action description. + Description *string + // Source server post migration custom action document identifier. DocumentIdentifier *string // Source server post migration custom action document version. DocumentVersion *string + // Source server post migration custom action external parameters. + ExternalParameters map[string]types.SsmExternalParameter + // Source server post migration custom action must succeed for cutover. MustSucceedForCutover *bool diff --git a/service/mgn/api_op_PutTemplateAction.go b/service/mgn/api_op_PutTemplateAction.go index 444726db5d9..c8b923c2c67 100644 --- a/service/mgn/api_op_PutTemplateAction.go +++ b/service/mgn/api_op_PutTemplateAction.go @@ -57,9 +57,18 @@ type PutTemplateActionInput struct { // Template post migration custom action active status. Active *bool + // Template post migration custom action category. + Category types.ActionCategory + + // Template post migration custom action description. + Description *string + // Template post migration custom action document version. DocumentVersion *string + // Template post migration custom action external parameters. + ExternalParameters map[string]types.SsmExternalParameter + // Template post migration custom action must succeed for cutover. MustSucceedForCutover *bool @@ -86,12 +95,21 @@ type PutTemplateActionOutput struct { // Template post migration custom action active status. Active *bool + // Template post migration custom action category. + Category types.ActionCategory + + // Template post migration custom action description. + Description *string + // Template post migration custom action document identifier. DocumentIdentifier *string // Template post migration custom action document version. DocumentVersion *string + // Template post migration custom action external parameters. + ExternalParameters map[string]types.SsmExternalParameter + // Template post migration custom action must succeed for cutover. MustSucceedForCutover *bool diff --git a/service/mgn/api_op_RetryDataReplication.go b/service/mgn/api_op_RetryDataReplication.go index 3d155f2a0d7..11750adf545 100644 --- a/service/mgn/api_op_RetryDataReplication.go +++ b/service/mgn/api_op_RetryDataReplication.go @@ -51,6 +51,9 @@ type RetryDataReplicationOutput struct { // Source server data replication info. DataReplicationInfo *types.DataReplicationInfo + // Source server fqdn for action framework. + FqdnForActionFramework *string + // Source server archived status. IsArchived *bool @@ -72,6 +75,9 @@ type RetryDataReplicationOutput struct { // Source server Tags. Tags map[string]string + // Source server user provided ID. + UserProvidedID *string + // Source server vCenter client id. VcenterClientID *string diff --git a/service/mgn/api_op_StartExport.go b/service/mgn/api_op_StartExport.go new file mode 100644 index 00000000000..62d25ad4897 --- /dev/null +++ b/service/mgn/api_op_StartExport.go @@ -0,0 +1,131 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +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/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Start export. +func (c *Client) StartExport(ctx context.Context, params *StartExportInput, optFns ...func(*Options)) (*StartExportOutput, error) { + if params == nil { + params = &StartExportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartExport", params, optFns, c.addOperationStartExportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartExportOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Start export request. +type StartExportInput struct { + + // Start export request s3 bucket. + // + // This member is required. + S3Bucket *string + + // Start export request s3key. + // + // This member is required. + S3Key *string + + // Start export request s3 bucket owner. + S3BucketOwner *string + + noSmithyDocumentSerde +} + +// Start export response. +type StartExportOutput struct { + + // Start export response export task. + ExportTask *types.ExportTask + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartExportMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartExport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartExport{}, 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 = addOpStartExportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartExport(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_opStartExport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "StartExport", + } +} diff --git a/service/mgn/api_op_StartImport.go b/service/mgn/api_op_StartImport.go new file mode 100644 index 00000000000..64ef8b864a4 --- /dev/null +++ b/service/mgn/api_op_StartImport.go @@ -0,0 +1,163 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package mgn + +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/mgn/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Start import. +func (c *Client) StartImport(ctx context.Context, params *StartImportInput, optFns ...func(*Options)) (*StartImportOutput, error) { + if params == nil { + params = &StartImportInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartImport", params, optFns, c.addOperationStartImportMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartImportOutput) + out.ResultMetadata = metadata + return out, nil +} + +// Start import request. +type StartImportInput struct { + + // Start import request s3 bucket source. + // + // This member is required. + S3BucketSource *types.S3BucketSource + + // Start import request client token. + ClientToken *string + + noSmithyDocumentSerde +} + +// Start import response. +type StartImportOutput struct { + + // Start import response import task. + ImportTask *types.ImportTask + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartImportMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartImport{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartImport{}, 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 = addIdempotencyToken_opStartImportMiddleware(stack, options); err != nil { + return err + } + if err = addOpStartImportValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartImport(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 +} + +type idempotencyToken_initializeOpStartImport struct { + tokenProvider IdempotencyTokenProvider +} + +func (*idempotencyToken_initializeOpStartImport) ID() string { + return "OperationIdempotencyTokenAutoFill" +} + +func (m *idempotencyToken_initializeOpStartImport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + if m.tokenProvider == nil { + return next.HandleInitialize(ctx, in) + } + + input, ok := in.Parameters.(*StartImportInput) + if !ok { + return out, metadata, fmt.Errorf("expected middleware input to be of type *StartImportInput ") + } + + if input.ClientToken == nil { + t, err := m.tokenProvider.GetIdempotencyToken() + if err != nil { + return out, metadata, err + } + input.ClientToken = &t + } + return next.HandleInitialize(ctx, in) +} +func addIdempotencyToken_opStartImportMiddleware(stack *middleware.Stack, cfg Options) error { + return stack.Initialize.Add(&idempotencyToken_initializeOpStartImport{tokenProvider: cfg.IdempotencyTokenProvider}, middleware.Before) +} + +func newServiceMetadataMiddleware_opStartImport(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "mgn", + OperationName: "StartImport", + } +} diff --git a/service/mgn/api_op_StartReplication.go b/service/mgn/api_op_StartReplication.go index 92552c1dc94..e0e2e42513f 100644 --- a/service/mgn/api_op_StartReplication.go +++ b/service/mgn/api_op_StartReplication.go @@ -48,6 +48,9 @@ type StartReplicationOutput struct { // Source server data replication info. DataReplicationInfo *types.DataReplicationInfo + // Source server fqdn for action framework. + FqdnForActionFramework *string + // Source server archived status. IsArchived *bool @@ -69,6 +72,9 @@ type StartReplicationOutput struct { // Source server Tags. Tags map[string]string + // Source server user provided ID. + UserProvidedID *string + // Source server vCenter client id. VcenterClientID *string diff --git a/service/mgn/api_op_UpdateSourceServerReplicationType.go b/service/mgn/api_op_UpdateSourceServerReplicationType.go index 1aeb0a8132b..8c185958e00 100644 --- a/service/mgn/api_op_UpdateSourceServerReplicationType.go +++ b/service/mgn/api_op_UpdateSourceServerReplicationType.go @@ -54,6 +54,9 @@ type UpdateSourceServerReplicationTypeOutput struct { // Source server data replication info. DataReplicationInfo *types.DataReplicationInfo + // Source server fqdn for action framework. + FqdnForActionFramework *string + // Source server archived status. IsArchived *bool @@ -75,6 +78,9 @@ type UpdateSourceServerReplicationTypeOutput struct { // Source server Tags. Tags map[string]string + // Source server user provided ID. + UserProvidedID *string + // Source server vCenter client id. VcenterClientID *string diff --git a/service/mgn/deserializers.go b/service/mgn/deserializers.go index 06ab7fb8373..9aa716bcd8c 100644 --- a/service/mgn/deserializers.go +++ b/service/mgn/deserializers.go @@ -16,6 +16,7 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" "io" "io/ioutil" + "math" "strconv" "strings" ) @@ -826,6 +827,15 @@ func awsRestjson1_deserializeOpDocumentChangeServerLifeCycleStateOutput(v **Chan return err } + case "fqdnForActionFramework": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.FqdnForActionFramework = ptr.String(jtv) + } + case "isArchived": if value != nil { jtv, ok := value.(bool) @@ -873,6 +883,15 @@ func awsRestjson1_deserializeOpDocumentChangeServerLifeCycleStateOutput(v **Chan return err } + case "userProvidedID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.UserProvidedID = ptr.String(jtv) + } + case "vcenterClientID": if value != nil { jtv, ok := value.(string) @@ -3834,6 +3853,15 @@ func awsRestjson1_deserializeOpDocumentDisconnectFromServiceOutput(v **Disconnec return err } + case "fqdnForActionFramework": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.FqdnForActionFramework = ptr.String(jtv) + } + case "isArchived": if value != nil { jtv, ok := value.(bool) @@ -3881,6 +3909,15 @@ func awsRestjson1_deserializeOpDocumentDisconnectFromServiceOutput(v **Disconnec return err } + case "userProvidedID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.UserProvidedID = ptr.String(jtv) + } + case "vcenterClientID": if value != nil { jtv, ok := value.(string) @@ -4064,6 +4101,15 @@ func awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(v **FinalizeCutover return err } + case "fqdnForActionFramework": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.FqdnForActionFramework = ptr.String(jtv) + } + case "isArchived": if value != nil { jtv, ok := value.(bool) @@ -4111,6 +4157,15 @@ func awsRestjson1_deserializeOpDocumentFinalizeCutoverOutput(v **FinalizeCutover return err } + case "userProvidedID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.UserProvidedID = ptr.String(jtv) + } + case "vcenterClientID": if value != nil { jtv, ok := value.(string) @@ -4888,14 +4943,14 @@ func awsRestjson1_deserializeOpDocumentListApplicationsOutput(v **ListApplicatio return nil } -type awsRestjson1_deserializeOpListSourceServerActions struct { +type awsRestjson1_deserializeOpListExportErrors struct { } -func (*awsRestjson1_deserializeOpListSourceServerActions) ID() string { +func (*awsRestjson1_deserializeOpListExportErrors) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSourceServerActions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListExportErrors) 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) @@ -4909,9 +4964,9 @@ func (m *awsRestjson1_deserializeOpListSourceServerActions) HandleDeserialize(ct } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSourceServerActions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListExportErrors(response, &metadata) } - output := &ListSourceServerActionsOutput{} + output := &ListExportErrorsOutput{} out.Result = output var buff [1024]byte @@ -4932,7 +4987,7 @@ func (m *awsRestjson1_deserializeOpListSourceServerActions) HandleDeserialize(ct return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSourceServerActionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListExportErrorsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4945,7 +5000,7 @@ func (m *awsRestjson1_deserializeOpListSourceServerActions) HandleDeserialize(ct return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSourceServerActions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListExportErrors(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)} @@ -4986,12 +5041,12 @@ func awsRestjson1_deserializeOpErrorListSourceServerActions(response *smithyhttp } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5002,7 +5057,7 @@ func awsRestjson1_deserializeOpErrorListSourceServerActions(response *smithyhttp } } -func awsRestjson1_deserializeOpDocumentListSourceServerActionsOutput(v **ListSourceServerActionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListExportErrorsOutput(v **ListExportErrorsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5015,9 +5070,9 @@ func awsRestjson1_deserializeOpDocumentListSourceServerActionsOutput(v **ListSou return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSourceServerActionsOutput + var sv *ListExportErrorsOutput if *v == nil { - sv = &ListSourceServerActionsOutput{} + sv = &ListExportErrorsOutput{} } else { sv = *v } @@ -5025,7 +5080,7 @@ func awsRestjson1_deserializeOpDocumentListSourceServerActionsOutput(v **ListSou for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentSourceServerActionDocuments(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentExportErrors(&sv.Items, value); err != nil { return err } @@ -5047,14 +5102,14 @@ func awsRestjson1_deserializeOpDocumentListSourceServerActionsOutput(v **ListSou return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListExports struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListExports) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListExports) 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) @@ -5068,9 +5123,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_deserializeOpErrorListExports(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListExportsOutput{} out.Result = output var buff [1024]byte @@ -5091,7 +5146,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListExportsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5104,7 +5159,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListExports(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)} @@ -5145,20 +5200,8 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) default: genericError := &smithy.GenericAPIError{ @@ -5170,7 +5213,7 @@ func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListExportsOutput(v **ListExportsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5183,20 +5226,29 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTagsForResourceOutput + var sv *ListExportsOutput if *v == nil { - sv = &ListTagsForResourceOutput{} + sv = &ListExportsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + case "items": + if err := awsRestjson1_deserializeDocumentExportsList(&sv.Items, value); err != nil { return err } + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + default: _, _ = key, value @@ -5206,14 +5258,14 @@ func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsFor return nil } -type awsRestjson1_deserializeOpListTemplateActions struct { +type awsRestjson1_deserializeOpListImportErrors struct { } -func (*awsRestjson1_deserializeOpListTemplateActions) ID() string { +func (*awsRestjson1_deserializeOpListImportErrors) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTemplateActions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListImportErrors) 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) @@ -5227,9 +5279,9 @@ func (m *awsRestjson1_deserializeOpListTemplateActions) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListTemplateActions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListImportErrors(response, &metadata) } - output := &ListTemplateActionsOutput{} + output := &ListImportErrorsOutput{} out.Result = output var buff [1024]byte @@ -5250,7 +5302,7 @@ func (m *awsRestjson1_deserializeOpListTemplateActions) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTemplateActionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListImportErrorsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5263,7 +5315,7 @@ func (m *awsRestjson1_deserializeOpListTemplateActions) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTemplateActions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListImportErrors(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)} @@ -5304,12 +5356,12 @@ func awsRestjson1_deserializeOpErrorListTemplateActions(response *smithyhttp.Res } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5320,7 +5372,7 @@ func awsRestjson1_deserializeOpErrorListTemplateActions(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListTemplateActionsOutput(v **ListTemplateActionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListImportErrorsOutput(v **ListImportErrorsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5333,9 +5385,9 @@ func awsRestjson1_deserializeOpDocumentListTemplateActionsOutput(v **ListTemplat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListTemplateActionsOutput + var sv *ListImportErrorsOutput if *v == nil { - sv = &ListTemplateActionsOutput{} + sv = &ListImportErrorsOutput{} } else { sv = *v } @@ -5343,7 +5395,7 @@ func awsRestjson1_deserializeOpDocumentListTemplateActionsOutput(v **ListTemplat for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentTemplateActionDocuments(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentImportErrors(&sv.Items, value); err != nil { return err } @@ -5365,14 +5417,14 @@ func awsRestjson1_deserializeOpDocumentListTemplateActionsOutput(v **ListTemplat return nil } -type awsRestjson1_deserializeOpListWaves struct { +type awsRestjson1_deserializeOpListImports struct { } -func (*awsRestjson1_deserializeOpListWaves) ID() string { +func (*awsRestjson1_deserializeOpListImports) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListWaves) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListImports) 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) @@ -5386,9 +5438,9 @@ func (m *awsRestjson1_deserializeOpListWaves) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListWaves(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListImports(response, &metadata) } - output := &ListWavesOutput{} + output := &ListImportsOutput{} out.Result = output var buff [1024]byte @@ -5409,7 +5461,7 @@ func (m *awsRestjson1_deserializeOpListWaves) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListWavesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListImportsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5422,7 +5474,7 @@ func (m *awsRestjson1_deserializeOpListWaves) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorListWaves(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListImports(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)} @@ -5466,6 +5518,9 @@ func awsRestjson1_deserializeOpErrorListWaves(response *smithyhttp.Response, met case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -5476,7 +5531,7 @@ func awsRestjson1_deserializeOpErrorListWaves(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentListWavesOutput(v **ListWavesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListImportsOutput(v **ListImportsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5489,9 +5544,9 @@ func awsRestjson1_deserializeOpDocumentListWavesOutput(v **ListWavesOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListWavesOutput + var sv *ListImportsOutput if *v == nil { - sv = &ListWavesOutput{} + sv = &ListImportsOutput{} } else { sv = *v } @@ -5499,7 +5554,7 @@ func awsRestjson1_deserializeOpDocumentListWavesOutput(v **ListWavesOutput, valu for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentWavesList(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentImportList(&sv.Items, value); err != nil { return err } @@ -5521,14 +5576,14 @@ func awsRestjson1_deserializeOpDocumentListWavesOutput(v **ListWavesOutput, valu return nil } -type awsRestjson1_deserializeOpMarkAsArchived struct { +type awsRestjson1_deserializeOpListSourceServerActions struct { } -func (*awsRestjson1_deserializeOpMarkAsArchived) ID() string { +func (*awsRestjson1_deserializeOpListSourceServerActions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpMarkAsArchived) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSourceServerActions) 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) @@ -5542,9 +5597,9 @@ func (m *awsRestjson1_deserializeOpMarkAsArchived) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorMarkAsArchived(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSourceServerActions(response, &metadata) } - output := &MarkAsArchivedOutput{} + output := &ListSourceServerActionsOutput{} out.Result = output var buff [1024]byte @@ -5565,7 +5620,7 @@ func (m *awsRestjson1_deserializeOpMarkAsArchived) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentMarkAsArchivedOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSourceServerActionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5578,7 +5633,7 @@ func (m *awsRestjson1_deserializeOpMarkAsArchived) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorMarkAsArchived(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSourceServerActions(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)} @@ -5619,9 +5674,6 @@ func awsRestjson1_deserializeOpErrorMarkAsArchived(response *smithyhttp.Response } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) @@ -5638,7 +5690,7 @@ func awsRestjson1_deserializeOpErrorMarkAsArchived(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentMarkAsArchivedOutput(v **MarkAsArchivedOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSourceServerActionsOutput(v **ListSourceServerActionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5651,92 +5703,27 @@ func awsRestjson1_deserializeOpDocumentMarkAsArchivedOutput(v **MarkAsArchivedOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *MarkAsArchivedOutput + var sv *ListSourceServerActionsOutput if *v == nil { - sv = &MarkAsArchivedOutput{} + sv = &ListSourceServerActionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "applicationID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) - } - sv.ApplicationID = ptr.String(jtv) - } - - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "dataReplicationInfo": - if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { - return err - } - - case "isArchived": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IsArchived = ptr.Bool(jtv) - } - - case "launchedInstance": - if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { - return err - } - - case "lifeCycle": - if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { - return err - } - - case "replicationType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) - } - sv.ReplicationType = types.ReplicationType(jtv) - } - - case "sourceProperties": - if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { - return err - } - - case "sourceServerID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) - } - sv.SourceServerID = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + case "items": + if err := awsRestjson1_deserializeDocumentSourceServerActionDocuments(&sv.Items, value); err != nil { return err } - case "vcenterClientID": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } - sv.VcenterClientID = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -5748,14 +5735,14 @@ func awsRestjson1_deserializeOpDocumentMarkAsArchivedOutput(v **MarkAsArchivedOu return nil } -type awsRestjson1_deserializeOpPutSourceServerAction struct { +type awsRestjson1_deserializeOpListTagsForResource struct { } -func (*awsRestjson1_deserializeOpPutSourceServerAction) ID() string { +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutSourceServerAction) 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) @@ -5769,9 +5756,9 @@ func (m *awsRestjson1_deserializeOpPutSourceServerAction) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutSourceServerAction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) } - output := &PutSourceServerActionOutput{} + output := &ListTagsForResourceOutput{} out.Result = output var buff [1024]byte @@ -5792,7 +5779,7 @@ func (m *awsRestjson1_deserializeOpPutSourceServerAction) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutSourceServerActionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -5805,7 +5792,7 @@ func (m *awsRestjson1_deserializeOpPutSourceServerAction) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutSourceServerAction(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)} @@ -5846,14 +5833,17 @@ func awsRestjson1_deserializeOpErrorPutSourceServerAction(response *smithyhttp.R } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UninitializedAccountException", errorCode): - return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -5868,7 +5858,7 @@ func awsRestjson1_deserializeOpErrorPutSourceServerAction(response *smithyhttp.R } } -func awsRestjson1_deserializeOpDocumentPutSourceServerActionOutput(v **PutSourceServerActionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -5881,100 +5871,20 @@ func awsRestjson1_deserializeOpDocumentPutSourceServerActionOutput(v **PutSource return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutSourceServerActionOutput + var sv *ListTagsForResourceOutput if *v == nil { - sv = &PutSourceServerActionOutput{} + sv = &ListTagsForResourceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "actionID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ActionID to be of type string, got %T instead", value) - } - sv.ActionID = ptr.String(jtv) - } - - case "actionName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) - } - sv.ActionName = ptr.String(jtv) - } - - case "active": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.Active = ptr.Bool(jtv) - } - - case "documentIdentifier": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) - } - sv.DocumentIdentifier = ptr.String(jtv) - } - - case "documentVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) - } - sv.DocumentVersion = ptr.String(jtv) - } - - case "mustSucceedForCutover": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.MustSucceedForCutover = ptr.Bool(jtv) - } - - case "order": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected OrderType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Order = int32(i64) - } - - case "parameters": - if err := awsRestjson1_deserializeDocumentSsmDocumentParameters(&sv.Parameters, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { return err } - case "timeoutSeconds": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected StrictlyPositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.TimeoutSeconds = int32(i64) - } - default: _, _ = key, value @@ -5984,14 +5894,14 @@ func awsRestjson1_deserializeOpDocumentPutSourceServerActionOutput(v **PutSource return nil } -type awsRestjson1_deserializeOpPutTemplateAction struct { +type awsRestjson1_deserializeOpListTemplateActions struct { } -func (*awsRestjson1_deserializeOpPutTemplateAction) ID() string { +func (*awsRestjson1_deserializeOpListTemplateActions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpPutTemplateAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListTemplateActions) 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) @@ -6005,9 +5915,9 @@ func (m *awsRestjson1_deserializeOpPutTemplateAction) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorPutTemplateAction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListTemplateActions(response, &metadata) } - output := &PutTemplateActionOutput{} + output := &ListTemplateActionsOutput{} out.Result = output var buff [1024]byte @@ -6028,7 +5938,7 @@ func (m *awsRestjson1_deserializeOpPutTemplateAction) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentPutTemplateActionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListTemplateActionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6041,7 +5951,7 @@ func (m *awsRestjson1_deserializeOpPutTemplateAction) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorPutTemplateAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListTemplateActions(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)} @@ -6082,18 +5992,12 @@ func awsRestjson1_deserializeOpErrorPutTemplateAction(response *smithyhttp.Respo } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6104,7 +6008,7 @@ func awsRestjson1_deserializeOpErrorPutTemplateAction(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentPutTemplateActionOutput(v **PutTemplateActionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListTemplateActionsOutput(v **ListTemplateActionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6117,107 +6021,27 @@ func awsRestjson1_deserializeOpDocumentPutTemplateActionOutput(v **PutTemplateAc return fmt.Errorf("unexpected JSON type %v", value) } - var sv *PutTemplateActionOutput + var sv *ListTemplateActionsOutput if *v == nil { - sv = &PutTemplateActionOutput{} + sv = &ListTemplateActionsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "actionID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ActionID to be of type string, got %T instead", value) - } - sv.ActionID = ptr.String(jtv) - } - - case "actionName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) - } - sv.ActionName = ptr.String(jtv) - } - - case "active": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.Active = ptr.Bool(jtv) - } - - case "documentIdentifier": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) - } - sv.DocumentIdentifier = ptr.String(jtv) - } - - case "documentVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) - } - sv.DocumentVersion = ptr.String(jtv) - } - - case "mustSucceedForCutover": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.MustSucceedForCutover = ptr.Bool(jtv) - } - - case "operatingSystem": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected OperatingSystemString to be of type string, got %T instead", value) - } - sv.OperatingSystem = ptr.String(jtv) - } - - case "order": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected OrderType to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Order = int32(i64) - } - - case "parameters": - if err := awsRestjson1_deserializeDocumentSsmDocumentParameters(&sv.Parameters, value); err != nil { + case "items": + if err := awsRestjson1_deserializeDocumentTemplateActionDocuments(&sv.Items, value); err != nil { return err } - case "timeoutSeconds": + case "nextToken": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected StrictlyPositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) } - sv.TimeoutSeconds = int32(i64) + sv.NextToken = ptr.String(jtv) } default: @@ -6229,14 +6053,14 @@ func awsRestjson1_deserializeOpDocumentPutTemplateActionOutput(v **PutTemplateAc return nil } -type awsRestjson1_deserializeOpRemoveSourceServerAction struct { +type awsRestjson1_deserializeOpListWaves struct { } -func (*awsRestjson1_deserializeOpRemoveSourceServerAction) ID() string { +func (*awsRestjson1_deserializeOpListWaves) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRemoveSourceServerAction) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListWaves) 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) @@ -6250,15 +6074,43 @@ func (m *awsRestjson1_deserializeOpRemoveSourceServerAction) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRemoveSourceServerAction(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListWaves(response, &metadata) } - output := &RemoveSourceServerActionOutput{} + output := &ListWavesOutput{} 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_deserializeOpDocumentListWavesOutput(&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_deserializeOpErrorRemoveSourceServerAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListWaves(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)} @@ -6299,15 +6151,9 @@ func awsRestjson1_deserializeOpErrorRemoveSourceServerAction(response *smithyhtt } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6318,103 +6164,59 @@ func awsRestjson1_deserializeOpErrorRemoveSourceServerAction(response *smithyhtt } } -type awsRestjson1_deserializeOpRemoveTemplateAction struct { -} - -func (*awsRestjson1_deserializeOpRemoveTemplateAction) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpRemoveTemplateAction) 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_deserializeOpErrorRemoveTemplateAction(response, &metadata) - } - output := &RemoveTemplateActionOutput{} - out.Result = output - - return out, metadata, err -} - -func awsRestjson1_deserializeOpErrorRemoveTemplateAction(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.Buffer - if _, err := io.Copy(&errorBuffer, response.Body); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} +func awsRestjson1_deserializeOpDocumentListWavesOutput(v **ListWavesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - if len(headerCode) != 0 { - errorCode = restjson.SanitizeErrorCode(headerCode) + if value == nil { + return nil } - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) } - errorBody.Seek(0, io.SeekStart) - if len(headerCode) == 0 && len(jsonCode) != 0 { - errorCode = restjson.SanitizeErrorCode(jsonCode) - } - if len(message) != 0 { - errorMessage = message + var sv *ListWavesOutput + if *v == nil { + sv = &ListWavesOutput{} + } else { + sv = *v } - switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + for key, value := range shape { + switch key { + case "items": + if err := awsRestjson1_deserializeDocumentWavesList(&sv.Items, value); err != nil { + return err + } - case strings.EqualFold("UninitializedAccountException", errorCode): - return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected PaginationToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: + _, _ = key, value - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, } - return genericError - } + *v = sv + return nil } -type awsRestjson1_deserializeOpRetryDataReplication struct { +type awsRestjson1_deserializeOpMarkAsArchived struct { } -func (*awsRestjson1_deserializeOpRetryDataReplication) ID() string { +func (*awsRestjson1_deserializeOpMarkAsArchived) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRetryDataReplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpMarkAsArchived) 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) @@ -6428,9 +6230,9 @@ func (m *awsRestjson1_deserializeOpRetryDataReplication) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRetryDataReplication(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorMarkAsArchived(response, &metadata) } - output := &RetryDataReplicationOutput{} + output := &MarkAsArchivedOutput{} out.Result = output var buff [1024]byte @@ -6451,7 +6253,7 @@ func (m *awsRestjson1_deserializeOpRetryDataReplication) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentMarkAsArchivedOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6464,7 +6266,7 @@ func (m *awsRestjson1_deserializeOpRetryDataReplication) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorRetryDataReplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorMarkAsArchived(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)} @@ -6505,15 +6307,15 @@ func awsRestjson1_deserializeOpErrorRetryDataReplication(response *smithyhttp.Re } switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -6524,7 +6326,7 @@ func awsRestjson1_deserializeOpErrorRetryDataReplication(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(v **RetryDataReplicationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentMarkAsArchivedOutput(v **MarkAsArchivedOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6537,9 +6339,9 @@ func awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(v **RetryDataR return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RetryDataReplicationOutput + var sv *MarkAsArchivedOutput if *v == nil { - sv = &RetryDataReplicationOutput{} + sv = &MarkAsArchivedOutput{} } else { sv = *v } @@ -6569,6 +6371,15 @@ func awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(v **RetryDataR return err } + case "fqdnForActionFramework": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.FqdnForActionFramework = ptr.String(jtv) + } + case "isArchived": if value != nil { jtv, ok := value.(bool) @@ -6616,6 +6427,15 @@ func awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(v **RetryDataR return err } + case "userProvidedID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.UserProvidedID = ptr.String(jtv) + } + case "vcenterClientID": if value != nil { jtv, ok := value.(string) @@ -6634,14 +6454,14 @@ func awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(v **RetryDataR return nil } -type awsRestjson1_deserializeOpStartCutover struct { +type awsRestjson1_deserializeOpPutSourceServerAction struct { } -func (*awsRestjson1_deserializeOpStartCutover) ID() string { +func (*awsRestjson1_deserializeOpPutSourceServerAction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartCutover) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpPutSourceServerAction) 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) @@ -6655,9 +6475,9 @@ func (m *awsRestjson1_deserializeOpStartCutover) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartCutover(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorPutSourceServerAction(response, &metadata) } - output := &StartCutoverOutput{} + output := &PutSourceServerActionOutput{} out.Result = output var buff [1024]byte @@ -6678,7 +6498,7 @@ func (m *awsRestjson1_deserializeOpStartCutover) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartCutoverOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutSourceServerActionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6691,7 +6511,7 @@ func (m *awsRestjson1_deserializeOpStartCutover) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartCutover(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutSourceServerAction(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)} @@ -6735,6 +6555,9 @@ func awsRestjson1_deserializeOpErrorStartCutover(response *smithyhttp.Response, case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) @@ -6751,7 +6574,7 @@ func awsRestjson1_deserializeOpErrorStartCutover(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentStartCutoverOutput(v **StartCutoverOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutSourceServerActionOutput(v **PutSourceServerActionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6764,57 +6587,160 @@ func awsRestjson1_deserializeOpDocumentStartCutoverOutput(v **StartCutoverOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartCutoverOutput + var sv *PutSourceServerActionOutput if *v == nil { - sv = &StartCutoverOutput{} + sv = &PutSourceServerActionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "job": - if err := awsRestjson1_deserializeDocumentJob(&sv.Job, value); err != nil { - return err + case "actionID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionID to be of type string, got %T instead", value) + } + sv.ActionID = ptr.String(jtv) } - default: - _, _ = key, value + case "actionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionName to be of type string, got %T instead", value) + } + sv.ActionName = ptr.String(jtv) + } - } - } - *v = sv - return nil -} + case "active": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.Active = ptr.Bool(jtv) + } -type awsRestjson1_deserializeOpStartReplication struct { -} + case "category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionCategory to be of type string, got %T instead", value) + } + sv.Category = types.ActionCategory(jtv) + } -func (*awsRestjson1_deserializeOpStartReplication) ID() string { - return "OperationDeserializer" -} + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } -func (m *awsRestjson1_deserializeOpStartReplication) 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 - } + case "documentIdentifier": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.DocumentIdentifier = ptr.String(jtv) + } - response, ok := out.RawResponse.(*smithyhttp.Response) - if !ok { - return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} - } + case "documentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } - if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartReplication(response, &metadata) - } - output := &StartReplicationOutput{} - out.Result = output + case "externalParameters": + if err := awsRestjson1_deserializeDocumentSsmDocumentExternalParameters(&sv.ExternalParameters, value); err != nil { + return err + } - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case "mustSucceedForCutover": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.MustSucceedForCutover = ptr.Bool(jtv) + } + + case "order": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected OrderType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Order = int32(i64) + } + + case "parameters": + if err := awsRestjson1_deserializeDocumentSsmDocumentParameters(&sv.Parameters, value); err != nil { + return err + } + + case "timeoutSeconds": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected StrictlyPositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutSeconds = int32(i64) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpPutTemplateAction struct { +} + +func (*awsRestjson1_deserializeOpPutTemplateAction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpPutTemplateAction) 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_deserializeOpErrorPutTemplateAction(response, &metadata) + } + output := &PutTemplateActionOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(response.Body, ringBuffer) @@ -6831,7 +6757,7 @@ func (m *awsRestjson1_deserializeOpStartReplication) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartReplicationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentPutTemplateActionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6844,7 +6770,7 @@ func (m *awsRestjson1_deserializeOpStartReplication) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartReplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorPutTemplateAction(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)} @@ -6891,9 +6817,6 @@ func awsRestjson1_deserializeOpErrorStartReplication(response *smithyhttp.Respon case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) @@ -6910,7 +6833,7 @@ func awsRestjson1_deserializeOpErrorStartReplication(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentStartReplicationOutput(v **StartReplicationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentPutTemplateActionOutput(v **PutTemplateActionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6923,92 +6846,130 @@ func awsRestjson1_deserializeOpDocumentStartReplicationOutput(v **StartReplicati return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartReplicationOutput + var sv *PutTemplateActionOutput if *v == nil { - sv = &StartReplicationOutput{} + sv = &PutTemplateActionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "applicationID": + case "actionID": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) + return fmt.Errorf("expected ActionID to be of type string, got %T instead", value) } - sv.ApplicationID = ptr.String(jtv) + sv.ActionID = ptr.String(jtv) } - case "arn": + case "actionName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) - } - - case "dataReplicationInfo": - if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { - return err + sv.ActionName = ptr.String(jtv) } - case "isArchived": + case "active": if value != nil { jtv, ok := value.(bool) if !ok { return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.IsArchived = ptr.Bool(jtv) + sv.Active = ptr.Bool(jtv) } - case "launchedInstance": - if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { - return err + case "category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionCategory to be of type string, got %T instead", value) + } + sv.Category = types.ActionCategory(jtv) } - case "lifeCycle": - if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { - return err + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) } - case "replicationType": + case "documentIdentifier": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.ReplicationType = types.ReplicationType(jtv) + sv.DocumentIdentifier = ptr.String(jtv) } - case "sourceProperties": - if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { + case "documentVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DocumentVersion to be of type string, got %T instead", value) + } + sv.DocumentVersion = ptr.String(jtv) + } + + case "externalParameters": + if err := awsRestjson1_deserializeDocumentSsmDocumentExternalParameters(&sv.ExternalParameters, value); err != nil { return err } - case "sourceServerID": + case "mustSucceedForCutover": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.MustSucceedForCutover = ptr.Bool(jtv) + } + + case "operatingSystem": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + return fmt.Errorf("expected OperatingSystemString to be of type string, got %T instead", value) } - sv.SourceServerID = ptr.String(jtv) + sv.OperatingSystem = ptr.String(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + case "order": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected OrderType to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Order = int32(i64) + } + + case "parameters": + if err := awsRestjson1_deserializeDocumentSsmDocumentParameters(&sv.Parameters, value); err != nil { return err } - case "vcenterClientID": + case "timeoutSeconds": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + return fmt.Errorf("expected StrictlyPositiveInteger to be json.Number, got %T instead", value) } - sv.VcenterClientID = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TimeoutSeconds = int32(i64) } default: @@ -7020,14 +6981,14 @@ func awsRestjson1_deserializeOpDocumentStartReplicationOutput(v **StartReplicati return nil } -type awsRestjson1_deserializeOpStartTest struct { +type awsRestjson1_deserializeOpRemoveSourceServerAction struct { } -func (*awsRestjson1_deserializeOpStartTest) ID() string { +func (*awsRestjson1_deserializeOpRemoveSourceServerAction) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartTest) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRemoveSourceServerAction) 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) @@ -7041,43 +7002,15 @@ func (m *awsRestjson1_deserializeOpStartTest) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartTest(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRemoveSourceServerAction(response, &metadata) } - output := &StartTestOutput{} + output := &RemoveSourceServerActionOutput{} 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_deserializeOpDocumentStartTestOutput(&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_deserializeOpErrorStartTest(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRemoveSourceServerAction(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)} @@ -7118,8 +7051,8 @@ func awsRestjson1_deserializeOpErrorStartTest(response *smithyhttp.Response, met } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) @@ -7137,78 +7070,36 @@ func awsRestjson1_deserializeOpErrorStartTest(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentStartTestOutput(v **StartTestOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil +type awsRestjson1_deserializeOpRemoveTemplateAction struct { +} + +func (*awsRestjson1_deserializeOpRemoveTemplateAction) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpRemoveTemplateAction) 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 } - shape, ok := value.(map[string]interface{}) + response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - var sv *StartTestOutput - if *v == nil { - sv = &StartTestOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "job": - if err := awsRestjson1_deserializeDocumentJob(&sv.Job, value); err != nil { - return err - } - - 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), - } + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorRemoveTemplateAction(response, &metadata) } + output := &RemoveTemplateActionOutput{} + out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRemoveTemplateAction(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)} @@ -7249,17 +7140,11 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -7274,14 +7159,14 @@ func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, m } } -type awsRestjson1_deserializeOpTerminateTargetInstances struct { +type awsRestjson1_deserializeOpRetryDataReplication struct { } -func (*awsRestjson1_deserializeOpTerminateTargetInstances) ID() string { +func (*awsRestjson1_deserializeOpRetryDataReplication) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTerminateTargetInstances) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRetryDataReplication) 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) @@ -7295,9 +7180,9 @@ func (m *awsRestjson1_deserializeOpTerminateTargetInstances) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTerminateTargetInstances(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRetryDataReplication(response, &metadata) } - output := &TerminateTargetInstancesOutput{} + output := &RetryDataReplicationOutput{} out.Result = output var buff [1024]byte @@ -7318,7 +7203,7 @@ func (m *awsRestjson1_deserializeOpTerminateTargetInstances) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentTerminateTargetInstancesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7331,7 +7216,7 @@ func (m *awsRestjson1_deserializeOpTerminateTargetInstances) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorTerminateTargetInstances(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRetryDataReplication(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)} @@ -7372,8 +7257,8 @@ func awsRestjson1_deserializeOpErrorTerminateTargetInstances(response *smithyhtt } switch { - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) @@ -7391,7 +7276,7 @@ func awsRestjson1_deserializeOpErrorTerminateTargetInstances(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentTerminateTargetInstancesOutput(v **TerminateTargetInstancesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRetryDataReplicationOutput(v **RetryDataReplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7404,20 +7289,112 @@ func awsRestjson1_deserializeOpDocumentTerminateTargetInstancesOutput(v **Termin return fmt.Errorf("unexpected JSON type %v", value) } - var sv *TerminateTargetInstancesOutput + var sv *RetryDataReplicationOutput if *v == nil { - sv = &TerminateTargetInstancesOutput{} + sv = &RetryDataReplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "job": - if err := awsRestjson1_deserializeDocumentJob(&sv.Job, value); err != nil { + case "applicationID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) + } + sv.ApplicationID = ptr.String(jtv) + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "dataReplicationInfo": + if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { + return err + } + + case "fqdnForActionFramework": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.FqdnForActionFramework = ptr.String(jtv) + } + + case "isArchived": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsArchived = ptr.Bool(jtv) + } + + case "launchedInstance": + if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { + return err + } + + case "lifeCycle": + if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } + + case "sourceProperties": + if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { + return err + } + + case "sourceServerID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + } + sv.SourceServerID = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { return err } + case "userProvidedID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.UserProvidedID = ptr.String(jtv) + } + + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + default: _, _ = key, value @@ -7427,14 +7404,14 @@ func awsRestjson1_deserializeOpDocumentTerminateTargetInstancesOutput(v **Termin return nil } -type awsRestjson1_deserializeOpUnarchiveApplication struct { +type awsRestjson1_deserializeOpStartCutover struct { } -func (*awsRestjson1_deserializeOpUnarchiveApplication) ID() string { +func (*awsRestjson1_deserializeOpStartCutover) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUnarchiveApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartCutover) 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) @@ -7448,9 +7425,9 @@ func (m *awsRestjson1_deserializeOpUnarchiveApplication) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUnarchiveApplication(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartCutover(response, &metadata) } - output := &UnarchiveApplicationOutput{} + output := &StartCutoverOutput{} out.Result = output var buff [1024]byte @@ -7471,7 +7448,7 @@ func (m *awsRestjson1_deserializeOpUnarchiveApplication) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUnarchiveApplicationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartCutoverOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7484,7 +7461,7 @@ func (m *awsRestjson1_deserializeOpUnarchiveApplication) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUnarchiveApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartCutover(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)} @@ -7525,15 +7502,15 @@ func awsRestjson1_deserializeOpErrorUnarchiveApplication(response *smithyhttp.Re } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7544,7 +7521,7 @@ func awsRestjson1_deserializeOpErrorUnarchiveApplication(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentUnarchiveApplicationOutput(v **UnarchiveApplicationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartCutoverOutput(v **StartCutoverOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7557,114 +7534,37 @@ func awsRestjson1_deserializeOpDocumentUnarchiveApplicationOutput(v **UnarchiveA return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UnarchiveApplicationOutput + var sv *StartCutoverOutput if *v == nil { - sv = &UnarchiveApplicationOutput{} + sv = &StartCutoverOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "applicationAggregatedStatus": - if err := awsRestjson1_deserializeDocumentApplicationAggregatedStatus(&sv.ApplicationAggregatedStatus, value); err != nil { + case "job": + if err := awsRestjson1_deserializeDocumentJob(&sv.Job, value); err != nil { return err } - case "applicationID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) - } - sv.ApplicationID = ptr.String(jtv) - } + default: + _, _ = key, value - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } + } + } + *v = sv + return nil +} - case "creationDateTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) - } - sv.CreationDateTime = ptr.String(jtv) - } +type awsRestjson1_deserializeOpStartExport struct { +} - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ApplicationDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } +func (*awsRestjson1_deserializeOpStartExport) ID() string { + return "OperationDeserializer" +} - case "isArchived": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IsArchived = ptr.Bool(jtv) - } - - case "lastModifiedDateTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) - } - sv.LastModifiedDateTime = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { - return err - } - - case "waveID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) - } - sv.WaveID = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUnarchiveWave struct { -} - -func (*awsRestjson1_deserializeOpUnarchiveWave) ID() string { - return "OperationDeserializer" -} - -func (m *awsRestjson1_deserializeOpUnarchiveWave) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartExport) 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) @@ -7678,9 +7578,9 @@ func (m *awsRestjson1_deserializeOpUnarchiveWave) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUnarchiveWave(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartExport(response, &metadata) } - output := &UnarchiveWaveOutput{} + output := &StartExportOutput{} out.Result = output var buff [1024]byte @@ -7701,7 +7601,7 @@ func (m *awsRestjson1_deserializeOpUnarchiveWave) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUnarchiveWaveOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartExportOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7714,7 +7614,7 @@ func (m *awsRestjson1_deserializeOpUnarchiveWave) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorUnarchiveWave(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartExport(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)} @@ -7755,15 +7655,15 @@ func awsRestjson1_deserializeOpErrorUnarchiveWave(response *smithyhttp.Response, } switch { - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -7774,7 +7674,7 @@ func awsRestjson1_deserializeOpErrorUnarchiveWave(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentUnarchiveWaveOutput(v **UnarchiveWaveOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartExportOutput(v **StartExportOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7787,88 +7687,20 @@ func awsRestjson1_deserializeOpDocumentUnarchiveWaveOutput(v **UnarchiveWaveOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UnarchiveWaveOutput + var sv *StartExportOutput if *v == nil { - sv = &UnarchiveWaveOutput{} + sv = &StartExportOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "creationDateTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) - } - sv.CreationDateTime = ptr.String(jtv) - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WaveDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "isArchived": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.IsArchived = ptr.Bool(jtv) - } - - case "lastModifiedDateTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) - } - sv.LastModifiedDateTime = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WaveName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { - return err - } - - case "waveAggregatedStatus": - if err := awsRestjson1_deserializeDocumentWaveAggregatedStatus(&sv.WaveAggregatedStatus, value); err != nil { + case "exportTask": + if err := awsRestjson1_deserializeDocumentExportTask(&sv.ExportTask, value); err != nil { return err } - case "waveID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) - } - sv.WaveID = ptr.String(jtv) - } - default: _, _ = key, value @@ -7878,14 +7710,14 @@ func awsRestjson1_deserializeOpDocumentUnarchiveWaveOutput(v **UnarchiveWaveOutp return nil } -type awsRestjson1_deserializeOpUntagResource struct { +type awsRestjson1_deserializeOpStartImport struct { } -func (*awsRestjson1_deserializeOpUntagResource) ID() string { +func (*awsRestjson1_deserializeOpStartImport) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartImport) 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) @@ -7899,21 +7731,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_deserializeOpErrorStartImport(response, &metadata) } - output := &UntagResourceOutput{} + output := &StartImportOutput{} 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_deserializeOpDocumentStartImportOutput(&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_deserializeOpErrorStartImport(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)} @@ -7954,17 +7808,17 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("InternalServerException", errorCode): - return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): - return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -7979,14 +7833,50 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateApplication struct { +func awsRestjson1_deserializeOpDocumentStartImportOutput(v **StartImportOutput, 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 *StartImportOutput + if *v == nil { + sv = &StartImportOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "importTask": + if err := awsRestjson1_deserializeDocumentImportTask(&sv.ImportTask, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdateApplication) ID() string { +type awsRestjson1_deserializeOpStartReplication struct { +} + +func (*awsRestjson1_deserializeOpStartReplication) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateApplication) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartReplication) 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) @@ -8000,9 +7890,9 @@ func (m *awsRestjson1_deserializeOpUpdateApplication) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateApplication(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartReplication(response, &metadata) } - output := &UpdateApplicationOutput{} + output := &StartReplicationOutput{} out.Result = output var buff [1024]byte @@ -8023,7 +7913,7 @@ func (m *awsRestjson1_deserializeOpUpdateApplication) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartReplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8036,7 +7926,7 @@ func (m *awsRestjson1_deserializeOpUpdateApplication) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateApplication(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartReplication(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)} @@ -8083,9 +7973,15 @@ func awsRestjson1_deserializeOpErrorUpdateApplication(response *smithyhttp.Respo case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8096,7 +7992,7 @@ func awsRestjson1_deserializeOpErrorUpdateApplication(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplicationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartReplicationOutput(v **StartReplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8109,20 +8005,15 @@ func awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplica return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateApplicationOutput + var sv *StartReplicationOutput if *v == nil { - sv = &UpdateApplicationOutput{} + sv = &StartReplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "applicationAggregatedStatus": - if err := awsRestjson1_deserializeDocumentApplicationAggregatedStatus(&sv.ApplicationAggregatedStatus, value); err != nil { - return err - } - case "applicationID": if value != nil { jtv, ok := value.(string) @@ -8141,25 +8032,21 @@ func awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplica sv.Arn = ptr.String(jtv) } - case "creationDateTime": + case "dataReplicationInfo": + if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { + return err + } + + case "fqdnForActionFramework": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.CreationDateTime = ptr.String(jtv) + sv.FqdnForActionFramework = ptr.String(jtv) } - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ApplicationDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "isArchived": + case "isArchived": if value != nil { jtv, ok := value.(bool) if !ok { @@ -8168,22 +8055,37 @@ func awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplica sv.IsArchived = ptr.Bool(jtv) } - case "lastModifiedDateTime": + case "launchedInstance": + if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { + return err + } + + case "lifeCycle": + if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "replicationType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) } - sv.LastModifiedDateTime = ptr.String(jtv) + sv.ReplicationType = types.ReplicationType(jtv) } - case "name": + case "sourceProperties": + if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { + return err + } + + case "sourceServerID": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.SourceServerID = ptr.String(jtv) } case "tags": @@ -8191,13 +8093,22 @@ func awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplica return err } - case "waveID": + case "userProvidedID": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.WaveID = ptr.String(jtv) + sv.UserProvidedID = ptr.String(jtv) + } + + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) } default: @@ -8209,14 +8120,14 @@ func awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplica return nil } -type awsRestjson1_deserializeOpUpdateLaunchConfiguration struct { +type awsRestjson1_deserializeOpStartTest struct { } -func (*awsRestjson1_deserializeOpUpdateLaunchConfiguration) ID() string { +func (*awsRestjson1_deserializeOpStartTest) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateLaunchConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartTest) 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) @@ -8230,9 +8141,9 @@ func (m *awsRestjson1_deserializeOpUpdateLaunchConfiguration) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateLaunchConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartTest(response, &metadata) } - output := &UpdateLaunchConfigurationOutput{} + output := &StartTestOutput{} out.Result = output var buff [1024]byte @@ -8253,7 +8164,7 @@ func (m *awsRestjson1_deserializeOpUpdateLaunchConfiguration) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartTestOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8266,7 +8177,7 @@ func (m *awsRestjson1_deserializeOpUpdateLaunchConfiguration) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateLaunchConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartTest(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)} @@ -8310,9 +8221,6 @@ func awsRestjson1_deserializeOpErrorUpdateLaunchConfiguration(response *smithyht case strings.EqualFold("ConflictException", errorCode): return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): - return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) @@ -8329,7 +8237,7 @@ func awsRestjson1_deserializeOpErrorUpdateLaunchConfiguration(response *smithyht } } -func awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationOutput(v **UpdateLaunchConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartTestOutput(v **StartTestOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8342,115 +8250,20 @@ func awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationOutput(v **Updat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateLaunchConfigurationOutput + var sv *StartTestOutput if *v == nil { - sv = &UpdateLaunchConfigurationOutput{} + sv = &StartTestOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "bootMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BootMode to be of type string, got %T instead", value) - } - sv.BootMode = types.BootMode(jtv) - } - - case "copyPrivateIp": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.CopyPrivateIp = ptr.Bool(jtv) - } - - case "copyTags": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.CopyTags = ptr.Bool(jtv) - } - - case "ec2LaunchTemplateID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) - } - sv.Ec2LaunchTemplateID = ptr.String(jtv) - } - - case "enableMapAutoTagging": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.EnableMapAutoTagging = ptr.Bool(jtv) - } - - case "launchDisposition": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchDisposition to be of type string, got %T instead", value) - } - sv.LaunchDisposition = types.LaunchDisposition(jtv) - } - - case "licensing": - if err := awsRestjson1_deserializeDocumentLicensing(&sv.Licensing, value); err != nil { - return err - } - - case "mapAutoTaggingMpeID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) - } - sv.MapAutoTaggingMpeID = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SmallBoundedString to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "postLaunchActions": - if err := awsRestjson1_deserializeDocumentPostLaunchActions(&sv.PostLaunchActions, value); err != nil { + case "job": + if err := awsRestjson1_deserializeDocumentJob(&sv.Job, value); err != nil { return err } - case "sourceServerID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) - } - sv.SourceServerID = ptr.String(jtv) - } - - case "targetInstanceTypeRightSizingMethod": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TargetInstanceTypeRightSizingMethod to be of type string, got %T instead", value) - } - sv.TargetInstanceTypeRightSizingMethod = types.TargetInstanceTypeRightSizingMethod(jtv) - } - default: _, _ = key, value @@ -8460,14 +8273,14 @@ func awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationOutput(v **Updat return nil } -type awsRestjson1_deserializeOpUpdateLaunchConfigurationTemplate struct { +type awsRestjson1_deserializeOpTagResource struct { } -func (*awsRestjson1_deserializeOpUpdateLaunchConfigurationTemplate) ID() string { +func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateLaunchConfigurationTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -8481,43 +8294,21 @@ func (m *awsRestjson1_deserializeOpUpdateLaunchConfigurationTemplate) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateLaunchConfigurationTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateLaunchConfigurationTemplateOutput{} + output := &TagResourceOutput{} 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_deserializeOpDocumentUpdateLaunchConfigurationTemplateOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + if _, err = io.Copy(ioutil.Discard, response.Body); err != nil { return out, metadata, &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), - Snapshot: snapshot.Bytes(), + Err: fmt.Errorf("failed to discard response body, %w", err), } } return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateLaunchConfigurationTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -8561,11 +8352,14 @@ func awsRestjson1_deserializeOpErrorUpdateLaunchConfigurationTemplate(response * case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("UninitializedAccountException", errorCode): - return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) case strings.EqualFold("ValidationException", errorCode): return awsRestjson1_deserializeErrorValidationException(response, errorBody) @@ -8580,163 +8374,148 @@ func awsRestjson1_deserializeOpErrorUpdateLaunchConfigurationTemplate(response * } } -func awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationTemplateOutput(v **UpdateLaunchConfigurationTemplateOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil +type awsRestjson1_deserializeOpTerminateTargetInstances struct { +} + +func (*awsRestjson1_deserializeOpTerminateTargetInstances) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTerminateTargetInstances) 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 } - shape, ok := value.(map[string]interface{}) + response, ok := out.RawResponse.(*smithyhttp.Response) if !ok { - return fmt.Errorf("unexpected JSON type %v", value) + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - var sv *UpdateLaunchConfigurationTemplateOutput - if *v == nil { - sv = &UpdateLaunchConfigurationTemplateOutput{} - } else { - sv = *v + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTerminateTargetInstances(response, &metadata) } + output := &TerminateTargetInstancesOutput{} + out.Result = output - for key, value := range shape { - switch key { - case "arn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - case "associatePublicIpAddress": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.AssociatePublicIpAddress = ptr.Bool(jtv) - } + body := io.TeeReader(response.Body, ringBuffer) - case "bootMode": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BootMode to be of type string, got %T instead", value) - } - sv.BootMode = types.BootMode(jtv) - } + 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 + } - case "copyPrivateIp": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.CopyPrivateIp = ptr.Bool(jtv) - } + err = awsRestjson1_deserializeOpDocumentTerminateTargetInstancesOutput(&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(), + } + } - case "copyTags": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.CopyTags = ptr.Bool(jtv) - } + return out, metadata, err +} - case "ec2LaunchTemplateID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EC2LaunchConfigurationTemplateID to be of type string, got %T instead", value) - } - sv.Ec2LaunchTemplateID = ptr.String(jtv) - } +func awsRestjson1_deserializeOpErrorTerminateTargetInstances(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()) - case "enableMapAutoTagging": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.EnableMapAutoTagging = ptr.Bool(jtv) - } + errorCode := "UnknownError" + errorMessage := errorCode - case "largeVolumeConf": - if err := awsRestjson1_deserializeDocumentLaunchTemplateDiskConf(&sv.LargeVolumeConf, value); err != nil { - return err - } + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } - case "launchConfigurationTemplateID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchConfigurationTemplateID to be of type string, got %T instead", value) - } - sv.LaunchConfigurationTemplateID = ptr.String(jtv) - } + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) - case "launchDisposition": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LaunchDisposition to be of type string, got %T instead", value) - } - sv.LaunchDisposition = types.LaunchDisposition(jtv) - } + 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 + } - case "licensing": - if err := awsRestjson1_deserializeDocumentLicensing(&sv.Licensing, value); err != nil { - return err - } + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - case "mapAutoTaggingMpeID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) - } - sv.MapAutoTaggingMpeID = ptr.String(jtv) - } + switch { + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case "postLaunchActions": - if err := awsRestjson1_deserializeDocumentPostLaunchActions(&sv.PostLaunchActions, value); err != nil { - return err - } + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - case "smallVolumeConf": - if err := awsRestjson1_deserializeDocumentLaunchTemplateDiskConf(&sv.SmallVolumeConf, value); err != nil { - return err - } + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) - case "smallVolumeMaxSize": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.SmallVolumeMaxSize = i64 - } + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { - return err - } + } +} - case "targetInstanceTypeRightSizingMethod": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TargetInstanceTypeRightSizingMethod to be of type string, got %T instead", value) - } - sv.TargetInstanceTypeRightSizingMethod = types.TargetInstanceTypeRightSizingMethod(jtv) +func awsRestjson1_deserializeOpDocumentTerminateTargetInstancesOutput(v **TerminateTargetInstancesOutput, 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 *TerminateTargetInstancesOutput + if *v == nil { + sv = &TerminateTargetInstancesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "job": + if err := awsRestjson1_deserializeDocumentJob(&sv.Job, value); err != nil { + return err } default: @@ -8748,14 +8527,14 @@ func awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationTemplateOutput(v return nil } -type awsRestjson1_deserializeOpUpdateReplicationConfiguration struct { +type awsRestjson1_deserializeOpUnarchiveApplication struct { } -func (*awsRestjson1_deserializeOpUpdateReplicationConfiguration) ID() string { +func (*awsRestjson1_deserializeOpUnarchiveApplication) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateReplicationConfiguration) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUnarchiveApplication) 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) @@ -8769,9 +8548,9 @@ func (m *awsRestjson1_deserializeOpUpdateReplicationConfiguration) HandleDeseria } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateReplicationConfiguration(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUnarchiveApplication(response, &metadata) } - output := &UpdateReplicationConfigurationOutput{} + output := &UnarchiveApplicationOutput{} out.Result = output var buff [1024]byte @@ -8792,7 +8571,7 @@ func (m *awsRestjson1_deserializeOpUpdateReplicationConfiguration) HandleDeseria return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUnarchiveApplicationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8805,7 +8584,7 @@ func (m *awsRestjson1_deserializeOpUpdateReplicationConfiguration) HandleDeseria return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateReplicationConfiguration(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUnarchiveApplication(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)} @@ -8846,21 +8625,15 @@ func awsRestjson1_deserializeOpErrorUpdateReplicationConfiguration(response *smi } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -8871,7 +8644,7 @@ func awsRestjson1_deserializeOpErrorUpdateReplicationConfiguration(response *smi } } -func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationOutput(v **UpdateReplicationConfigurationOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUnarchiveApplicationOutput(v **UnarchiveApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8884,140 +8657,95 @@ func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationOutput(v ** return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateReplicationConfigurationOutput + var sv *UnarchiveApplicationOutput if *v == nil { - sv = &UpdateReplicationConfigurationOutput{} + sv = &UnarchiveApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "associateDefaultSecurityGroup": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.AssociateDefaultSecurityGroup = ptr.Bool(jtv) + case "applicationAggregatedStatus": + if err := awsRestjson1_deserializeDocumentApplicationAggregatedStatus(&sv.ApplicationAggregatedStatus, value); err != nil { + return err } - case "bandwidthThrottling": + case "applicationID": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) } - sv.BandwidthThrottling = i64 + sv.ApplicationID = ptr.String(jtv) } - case "createPublicIP": + case "arn": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) } - sv.CreatePublicIP = ptr.Bool(jtv) + sv.Arn = ptr.String(jtv) } - case "dataPlaneRouting": + case "creationDateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReplicationConfigurationDataPlaneRouting to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.DataPlaneRouting = types.ReplicationConfigurationDataPlaneRouting(jtv) + sv.CreationDateTime = ptr.String(jtv) } - case "defaultLargeStagingDiskType": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReplicationConfigurationDefaultLargeStagingDiskType to be of type string, got %T instead", value) + return fmt.Errorf("expected ApplicationDescription to be of type string, got %T instead", value) } - sv.DefaultLargeStagingDiskType = types.ReplicationConfigurationDefaultLargeStagingDiskType(jtv) + sv.Description = ptr.String(jtv) } - case "ebsEncryption": + case "isArchived": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected ReplicationConfigurationEbsEncryption to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.EbsEncryption = types.ReplicationConfigurationEbsEncryption(jtv) + sv.IsArchived = ptr.Bool(jtv) } - case "ebsEncryptionKeyArn": + case "lastModifiedDateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.EbsEncryptionKeyArn = ptr.String(jtv) + sv.LastModifiedDateTime = ptr.String(jtv) } case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SmallBoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "replicatedDisks": - if err := awsRestjson1_deserializeDocumentReplicationConfigurationReplicatedDisks(&sv.ReplicatedDisks, value); err != nil { - return err - } - - case "replicationServerInstanceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EC2InstanceType to be of type string, got %T instead", value) - } - sv.ReplicationServerInstanceType = ptr.String(jtv) - } - - case "replicationServersSecurityGroupsIDs": - if err := awsRestjson1_deserializeDocumentReplicationServersSecurityGroupsIDs(&sv.ReplicationServersSecurityGroupsIDs, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { return err } - case "sourceServerID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) - } - sv.SourceServerID = ptr.String(jtv) - } - - case "stagingAreaSubnetId": + case "waveID": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubnetID to be of type string, got %T instead", value) - } - sv.StagingAreaSubnetId = ptr.String(jtv) - } - - case "stagingAreaTags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.StagingAreaTags, value); err != nil { - return err - } - - case "useDedicatedReplicationServer": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) } - sv.UseDedicatedReplicationServer = ptr.Bool(jtv) + sv.WaveID = ptr.String(jtv) } default: @@ -9029,14 +8757,14 @@ func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationOutput(v ** return nil } -type awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate struct { +type awsRestjson1_deserializeOpUnarchiveWave struct { } -func (*awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate) ID() string { +func (*awsRestjson1_deserializeOpUnarchiveWave) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUnarchiveWave) 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) @@ -9050,9 +8778,9 @@ func (m *awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate) Handl } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateReplicationConfigurationTemplate(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUnarchiveWave(response, &metadata) } - output := &UpdateReplicationConfigurationTemplateOutput{} + output := &UnarchiveWaveOutput{} out.Result = output var buff [1024]byte @@ -9073,7 +8801,7 @@ func (m *awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate) Handl return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationTemplateOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUnarchiveWaveOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9086,7 +8814,7 @@ func (m *awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate) Handl return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateReplicationConfigurationTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUnarchiveWave(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)} @@ -9127,18 +8855,15 @@ func awsRestjson1_deserializeOpErrorUpdateReplicationConfigurationTemplate(respo } switch { - case strings.EqualFold("AccessDeniedException", errorCode): - return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9149,7 +8874,7 @@ func awsRestjson1_deserializeOpErrorUpdateReplicationConfigurationTemplate(respo } } -func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationTemplateOutput(v **UpdateReplicationConfigurationTemplateOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUnarchiveWaveOutput(v **UnarchiveWaveOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9162,9 +8887,9 @@ func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationTemplateOut return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateReplicationConfigurationTemplateOutput + var sv *UnarchiveWaveOutput if *v == nil { - sv = &UpdateReplicationConfigurationTemplateOutput{} + sv = &UnarchiveWaveOutput{} } else { sv = *v } @@ -9180,122 +8905,68 @@ func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationTemplateOut sv.Arn = ptr.String(jtv) } - case "associateDefaultSecurityGroup": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.AssociateDefaultSecurityGroup = ptr.Bool(jtv) - } - - case "bandwidthThrottling": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.BandwidthThrottling = i64 - } - - case "createPublicIP": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) - } - sv.CreatePublicIP = ptr.Bool(jtv) - } - - case "dataPlaneRouting": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReplicationConfigurationDataPlaneRouting to be of type string, got %T instead", value) - } - sv.DataPlaneRouting = types.ReplicationConfigurationDataPlaneRouting(jtv) - } - - case "defaultLargeStagingDiskType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ReplicationConfigurationDefaultLargeStagingDiskType to be of type string, got %T instead", value) - } - sv.DefaultLargeStagingDiskType = types.ReplicationConfigurationDefaultLargeStagingDiskType(jtv) - } - - case "ebsEncryption": + case "creationDateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReplicationConfigurationEbsEncryption to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.EbsEncryption = types.ReplicationConfigurationEbsEncryption(jtv) + sv.CreationDateTime = ptr.String(jtv) } - case "ebsEncryptionKeyArn": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + return fmt.Errorf("expected WaveDescription to be of type string, got %T instead", value) } - sv.EbsEncryptionKeyArn = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "replicationConfigurationTemplateID": + case "isArchived": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected ReplicationConfigurationTemplateID to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.ReplicationConfigurationTemplateID = ptr.String(jtv) + sv.IsArchived = ptr.Bool(jtv) } - case "replicationServerInstanceType": + case "lastModifiedDateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EC2InstanceType to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.ReplicationServerInstanceType = ptr.String(jtv) - } - - case "replicationServersSecurityGroupsIDs": - if err := awsRestjson1_deserializeDocumentReplicationServersSecurityGroupsIDs(&sv.ReplicationServersSecurityGroupsIDs, value); err != nil { - return err + sv.LastModifiedDateTime = ptr.String(jtv) } - case "stagingAreaSubnetId": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubnetID to be of type string, got %T instead", value) + return fmt.Errorf("expected WaveName to be of type string, got %T instead", value) } - sv.StagingAreaSubnetId = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "stagingAreaTags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.StagingAreaTags, value); err != nil { + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { return err } - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + case "waveAggregatedStatus": + if err := awsRestjson1_deserializeDocumentWaveAggregatedStatus(&sv.WaveAggregatedStatus, value); err != nil { return err } - case "useDedicatedReplicationServer": + case "waveID": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) } - sv.UseDedicatedReplicationServer = ptr.Bool(jtv) + sv.WaveID = ptr.String(jtv) } default: @@ -9307,14 +8978,14 @@ func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationTemplateOut return nil } -type awsRestjson1_deserializeOpUpdateSourceServerReplicationType struct { +type awsRestjson1_deserializeOpUntagResource struct { } -func (*awsRestjson1_deserializeOpUpdateSourceServerReplicationType) ID() string { +func (*awsRestjson1_deserializeOpUntagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateSourceServerReplicationType) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +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) @@ -9328,33 +8999,134 @@ func (m *awsRestjson1_deserializeOpUpdateSourceServerReplicationType) HandleDese } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateSourceServerReplicationType(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) } - output := &UpdateSourceServerReplicationTypeOutput{} + output := &UntagResourceOutput{} 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(), + 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 } - err = awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(&output, shape) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) + 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("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServerException", errorCode): + return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUpdateApplication struct { +} + +func (*awsRestjson1_deserializeOpUpdateApplication) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateApplication) 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_deserializeOpErrorUpdateApplication(response, &metadata) + } + output := &UpdateApplicationOutput{} + 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_deserializeOpDocumentUpdateApplicationOutput(&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(), @@ -9364,7 +9136,7 @@ func (m *awsRestjson1_deserializeOpUpdateSourceServerReplicationType) HandleDese return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateSourceServerReplicationType(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateApplication(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)} @@ -9414,9 +9186,6 @@ func awsRestjson1_deserializeOpErrorUpdateSourceServerReplicationType(response * case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - case strings.EqualFold("ValidationException", errorCode): - return awsRestjson1_deserializeErrorValidationException(response, errorBody) - default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9427,7 +9196,7 @@ func awsRestjson1_deserializeOpErrorUpdateSourceServerReplicationType(response * } } -func awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(v **UpdateSourceServerReplicationTypeOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateApplicationOutput(v **UpdateApplicationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9440,15 +9209,20 @@ func awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateSourceServerReplicationTypeOutput + var sv *UpdateApplicationOutput if *v == nil { - sv = &UpdateSourceServerReplicationTypeOutput{} + sv = &UpdateApplicationOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "applicationAggregatedStatus": + if err := awsRestjson1_deserializeDocumentApplicationAggregatedStatus(&sv.ApplicationAggregatedStatus, value); err != nil { + return err + } + case "applicationID": if value != nil { jtv, ok := value.(string) @@ -9467,9 +9241,22 @@ func awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(v sv.Arn = ptr.String(jtv) } - case "dataReplicationInfo": - if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { - return err + case "creationDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.CreationDateTime = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) } case "isArchived": @@ -9481,37 +9268,22 @@ func awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(v sv.IsArchived = ptr.Bool(jtv) } - case "launchedInstance": - if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { - return err - } - - case "lifeCycle": - if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { - return err - } - - case "replicationType": + case "lastModifiedDateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.ReplicationType = types.ReplicationType(jtv) - } - - case "sourceProperties": - if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { - return err + sv.LastModifiedDateTime = ptr.String(jtv) } - case "sourceServerID": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) } - sv.SourceServerID = ptr.String(jtv) + sv.Name = ptr.String(jtv) } case "tags": @@ -9519,13 +9291,13 @@ func awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(v return err } - case "vcenterClientID": + case "waveID": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) } - sv.VcenterClientID = ptr.String(jtv) + sv.WaveID = ptr.String(jtv) } default: @@ -9537,14 +9309,14 @@ func awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(v return nil } -type awsRestjson1_deserializeOpUpdateWave struct { +type awsRestjson1_deserializeOpUpdateLaunchConfiguration struct { } -func (*awsRestjson1_deserializeOpUpdateWave) ID() string { +func (*awsRestjson1_deserializeOpUpdateLaunchConfiguration) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateWave) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateLaunchConfiguration) 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) @@ -9558,9 +9330,9 @@ func (m *awsRestjson1_deserializeOpUpdateWave) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateWave(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateLaunchConfiguration(response, &metadata) } - output := &UpdateWaveOutput{} + output := &UpdateLaunchConfigurationOutput{} out.Result = output var buff [1024]byte @@ -9581,7 +9353,7 @@ func (m *awsRestjson1_deserializeOpUpdateWave) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateWaveOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9594,7 +9366,7 @@ func (m *awsRestjson1_deserializeOpUpdateWave) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateWave(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateLaunchConfiguration(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)} @@ -9644,6 +9416,9 @@ func awsRestjson1_deserializeOpErrorUpdateWave(response *smithyhttp.Response, me case strings.EqualFold("UninitializedAccountException", errorCode): return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -9654,7 +9429,7 @@ func awsRestjson1_deserializeOpErrorUpdateWave(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentUpdateWaveOutput(v **UpdateWaveOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationOutput(v **UpdateLaunchConfigurationOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9667,86 +9442,113 @@ func awsRestjson1_deserializeOpDocumentUpdateWaveOutput(v **UpdateWaveOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateWaveOutput + var sv *UpdateLaunchConfigurationOutput if *v == nil { - sv = &UpdateWaveOutput{} + sv = &UpdateLaunchConfigurationOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "arn": + case "bootMode": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + return fmt.Errorf("expected BootMode to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.BootMode = types.BootMode(jtv) } - case "creationDateTime": + case "copyPrivateIp": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.CreationDateTime = ptr.String(jtv) + sv.CopyPrivateIp = ptr.Bool(jtv) } - case "description": + case "copyTags": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected WaveDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.CopyTags = ptr.Bool(jtv) } - case "isArchived": + case "ec2LaunchTemplateID": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.IsArchived = ptr.Bool(jtv) + sv.Ec2LaunchTemplateID = ptr.String(jtv) } - case "lastModifiedDateTime": + case "enableMapAutoTagging": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) } - sv.LastModifiedDateTime = ptr.String(jtv) + sv.EnableMapAutoTagging = ptr.Bool(jtv) } - case "name": + case "launchDisposition": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WaveName to be of type string, got %T instead", value) + return fmt.Errorf("expected LaunchDisposition to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.LaunchDisposition = types.LaunchDisposition(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + case "licensing": + if err := awsRestjson1_deserializeDocumentLicensing(&sv.Licensing, value); err != nil { return err } - case "waveAggregatedStatus": - if err := awsRestjson1_deserializeDocumentWaveAggregatedStatus(&sv.WaveAggregatedStatus, value); err != nil { + case "mapAutoTaggingMpeID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.MapAutoTaggingMpeID = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SmallBoundedString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "postLaunchActions": + if err := awsRestjson1_deserializeDocumentPostLaunchActions(&sv.PostLaunchActions, value); err != nil { return err } - case "waveID": + case "sourceServerID": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) } - sv.WaveID = ptr.String(jtv) + sv.SourceServerID = ptr.String(jtv) + } + + case "targetInstanceTypeRightSizingMethod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetInstanceTypeRightSizingMethod to be of type string, got %T instead", value) + } + sv.TargetInstanceTypeRightSizingMethod = types.TargetInstanceTypeRightSizingMethod(jtv) } default: @@ -9758,40 +9560,37 @@ func awsRestjson1_deserializeOpDocumentUpdateWaveOutput(v **UpdateWaveOutput, va return nil } -func awsRestjson1_deserializeOpHttpBindingsInternalServerException(v *types.InternalServerException, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) - } +type awsRestjson1_deserializeOpUpdateLaunchConfigurationTemplate struct { +} - if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - vv, err := strconv.ParseInt(headerValues[0], 0, 64) - if err != nil { - return err - } - v.RetryAfterSeconds = vv +func (*awsRestjson1_deserializeOpUpdateLaunchConfigurationTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateLaunchConfigurationTemplate) 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 } - return nil -} -func awsRestjson1_deserializeOpHttpBindingsThrottlingException(v *types.ThrottlingException, response *smithyhttp.Response) error { - if v == nil { - return fmt.Errorf("unsupported deserialization for nil %T", v) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} } - if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { - headerValues[0] = strings.TrimSpace(headerValues[0]) - v.RetryAfterSeconds = ptr.String(headerValues[0]) + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateLaunchConfigurationTemplate(response, &metadata) } + output := &UpdateLaunchConfigurationTemplateOutput{} + out.Result = output - return nil -} -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -9802,83 +9601,44 @@ func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Res Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationTemplateOutput(&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_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 +func awsRestjson1_deserializeOpErrorUpdateLaunchConfigurationTemplate(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()) - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) + errorCode := "UnknownError" + errorMessage := errorCode - 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 + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) } - errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} 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_deserializeDocumentInternalServerException(&output, shape) - + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9890,132 +9650,235 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R } errorBody.Seek(0, io.SeekStart) - - if err := awsRestjson1_deserializeOpHttpBindingsInternalServerException(output, response); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message } - return output -} + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, } - return err - } - - errorBody.Seek(0, io.SeekStart) + return genericError - return output + } } -func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceQuotaExceededException{} - 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 +func awsRestjson1_deserializeOpDocumentUpdateLaunchConfigurationTemplateOutput(v **UpdateLaunchConfigurationTemplateOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) } - - err := awsRestjson1_deserializeDocumentServiceQuotaExceededException(&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 + if value == nil { + return nil } - errorBody.Seek(0, io.SeekStart) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - return output -} + var sv *UpdateLaunchConfigurationTemplateOutput + if *v == nil { + sv = &UpdateLaunchConfigurationTemplateOutput{} + } else { + sv = *v + } -func awsRestjson1_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ThrottlingException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "associatePublicIpAddress": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AssociatePublicIpAddress = ptr.Bool(jtv) + } + + case "bootMode": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BootMode to be of type string, got %T instead", value) + } + sv.BootMode = types.BootMode(jtv) + } + + case "copyPrivateIp": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CopyPrivateIp = ptr.Bool(jtv) + } + + case "copyTags": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CopyTags = ptr.Bool(jtv) + } + + case "ec2LaunchTemplateID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EC2LaunchConfigurationTemplateID to be of type string, got %T instead", value) + } + sv.Ec2LaunchTemplateID = ptr.String(jtv) + } + + case "enableMapAutoTagging": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.EnableMapAutoTagging = ptr.Bool(jtv) + } + + case "largeVolumeConf": + if err := awsRestjson1_deserializeDocumentLaunchTemplateDiskConf(&sv.LargeVolumeConf, value); err != nil { + return err + } + + case "launchConfigurationTemplateID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LaunchConfigurationTemplateID to be of type string, got %T instead", value) + } + sv.LaunchConfigurationTemplateID = ptr.String(jtv) + } + + case "launchDisposition": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LaunchDisposition to be of type string, got %T instead", value) + } + sv.LaunchDisposition = types.LaunchDisposition(jtv) + } + + case "licensing": + if err := awsRestjson1_deserializeDocumentLicensing(&sv.Licensing, value); err != nil { + return err + } + + case "mapAutoTaggingMpeID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.MapAutoTaggingMpeID = ptr.String(jtv) + } + + case "postLaunchActions": + if err := awsRestjson1_deserializeDocumentPostLaunchActions(&sv.PostLaunchActions, value); err != nil { + return err + } + + case "smallVolumeConf": + if err := awsRestjson1_deserializeDocumentLaunchTemplateDiskConf(&sv.SmallVolumeConf, value); err != nil { + return err + } + + case "smallVolumeMaxSize": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.SmallVolumeMaxSize = i64 + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "targetInstanceTypeRightSizingMethod": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TargetInstanceTypeRightSizingMethod to be of type string, got %T instead", value) + } + sv.TargetInstanceTypeRightSizingMethod = types.TargetInstanceTypeRightSizingMethod(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_deserializeDocumentThrottlingException(&output, shape) +type awsRestjson1_deserializeOpUpdateReplicationConfiguration struct { +} + +func (*awsRestjson1_deserializeOpUpdateReplicationConfiguration) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpUpdateReplicationConfiguration) 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) - - if err := awsRestjson1_deserializeOpHttpBindingsThrottlingException(output, response); err != nil { - return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + 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_deserializeOpErrorUpdateReplicationConfiguration(response, &metadata) + } + output := &UpdateReplicationConfigurationOutput{} + out.Result = output -func awsRestjson1_deserializeErrorUninitializedAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.UninitializedAccountException{} 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{} @@ -10026,47 +9889,44 @@ func awsRestjson1_deserializeErrorUninitializedAccountException(response *smithy Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentUninitializedAccountException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationOutput(&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_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ValidationException{} +func awsRestjson1_deserializeOpErrorUpdateReplicationConfiguration(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_deserializeDocumentValidationException(&output, shape) - + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -10078,48 +9938,1848 @@ func awsRestjson1_deserializeErrorValidationException(response *smithyhttp.Respo } errorBody.Seek(0, io.SeekStart) - - return output -} - -func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) } - if value == nil { - return nil + if len(message) != 0 { + errorMessage = message } - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationOutput(v **UpdateReplicationConfigurationOutput, 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 *UpdateReplicationConfigurationOutput + if *v == nil { + sv = &UpdateReplicationConfigurationOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "associateDefaultSecurityGroup": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AssociateDefaultSecurityGroup = ptr.Bool(jtv) + } + + case "bandwidthThrottling": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BandwidthThrottling = i64 + } + + case "createPublicIP": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CreatePublicIP = ptr.Bool(jtv) + } + + case "dataPlaneRouting": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationConfigurationDataPlaneRouting to be of type string, got %T instead", value) + } + sv.DataPlaneRouting = types.ReplicationConfigurationDataPlaneRouting(jtv) + } + + case "defaultLargeStagingDiskType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationConfigurationDefaultLargeStagingDiskType to be of type string, got %T instead", value) + } + sv.DefaultLargeStagingDiskType = types.ReplicationConfigurationDefaultLargeStagingDiskType(jtv) + } + + case "ebsEncryption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationConfigurationEbsEncryption to be of type string, got %T instead", value) + } + sv.EbsEncryption = types.ReplicationConfigurationEbsEncryption(jtv) + } + + case "ebsEncryptionKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.EbsEncryptionKeyArn = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SmallBoundedString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "replicatedDisks": + if err := awsRestjson1_deserializeDocumentReplicationConfigurationReplicatedDisks(&sv.ReplicatedDisks, value); err != nil { + return err + } + + case "replicationServerInstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EC2InstanceType to be of type string, got %T instead", value) + } + sv.ReplicationServerInstanceType = ptr.String(jtv) + } + + case "replicationServersSecurityGroupsIDs": + if err := awsRestjson1_deserializeDocumentReplicationServersSecurityGroupsIDs(&sv.ReplicationServersSecurityGroupsIDs, value); err != nil { + return err + } + + case "sourceServerID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + } + sv.SourceServerID = ptr.String(jtv) + } + + case "stagingAreaSubnetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubnetID to be of type string, got %T instead", value) + } + sv.StagingAreaSubnetId = ptr.String(jtv) + } + + case "stagingAreaTags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.StagingAreaTags, value); err != nil { + return err + } + + case "useDedicatedReplicationServer": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.UseDedicatedReplicationServer = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate struct { +} + +func (*awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateReplicationConfigurationTemplate) 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_deserializeOpErrorUpdateReplicationConfigurationTemplate(response, &metadata) + } + output := &UpdateReplicationConfigurationTemplateOutput{} + 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_deserializeOpDocumentUpdateReplicationConfigurationTemplateOutput(&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_deserializeOpErrorUpdateReplicationConfigurationTemplate(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateReplicationConfigurationTemplateOutput(v **UpdateReplicationConfigurationTemplateOutput, 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 *UpdateReplicationConfigurationTemplateOutput + if *v == nil { + sv = &UpdateReplicationConfigurationTemplateOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "associateDefaultSecurityGroup": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.AssociateDefaultSecurityGroup = ptr.Bool(jtv) + } + + case "bandwidthThrottling": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BandwidthThrottling = i64 + } + + case "createPublicIP": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.CreatePublicIP = ptr.Bool(jtv) + } + + case "dataPlaneRouting": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationConfigurationDataPlaneRouting to be of type string, got %T instead", value) + } + sv.DataPlaneRouting = types.ReplicationConfigurationDataPlaneRouting(jtv) + } + + case "defaultLargeStagingDiskType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationConfigurationDefaultLargeStagingDiskType to be of type string, got %T instead", value) + } + sv.DefaultLargeStagingDiskType = types.ReplicationConfigurationDefaultLargeStagingDiskType(jtv) + } + + case "ebsEncryption": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationConfigurationEbsEncryption to be of type string, got %T instead", value) + } + sv.EbsEncryption = types.ReplicationConfigurationEbsEncryption(jtv) + } + + case "ebsEncryptionKeyArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.EbsEncryptionKeyArn = ptr.String(jtv) + } + + case "replicationConfigurationTemplateID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationConfigurationTemplateID to be of type string, got %T instead", value) + } + sv.ReplicationConfigurationTemplateID = ptr.String(jtv) + } + + case "replicationServerInstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EC2InstanceType to be of type string, got %T instead", value) + } + sv.ReplicationServerInstanceType = ptr.String(jtv) + } + + case "replicationServersSecurityGroupsIDs": + if err := awsRestjson1_deserializeDocumentReplicationServersSecurityGroupsIDs(&sv.ReplicationServersSecurityGroupsIDs, value); err != nil { + return err + } + + case "stagingAreaSubnetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubnetID to be of type string, got %T instead", value) + } + sv.StagingAreaSubnetId = ptr.String(jtv) + } + + case "stagingAreaTags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.StagingAreaTags, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "useDedicatedReplicationServer": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.UseDedicatedReplicationServer = ptr.Bool(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateSourceServerReplicationType struct { +} + +func (*awsRestjson1_deserializeOpUpdateSourceServerReplicationType) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateSourceServerReplicationType) 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_deserializeOpErrorUpdateSourceServerReplicationType(response, &metadata) + } + output := &UpdateSourceServerReplicationTypeOutput{} + 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_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(&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_deserializeOpErrorUpdateSourceServerReplicationType(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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsRestjson1_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateSourceServerReplicationTypeOutput(v **UpdateSourceServerReplicationTypeOutput, 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 *UpdateSourceServerReplicationTypeOutput + if *v == nil { + sv = &UpdateSourceServerReplicationTypeOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "applicationID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) + } + sv.ApplicationID = ptr.String(jtv) + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "dataReplicationInfo": + if err := awsRestjson1_deserializeDocumentDataReplicationInfo(&sv.DataReplicationInfo, value); err != nil { + return err + } + + case "fqdnForActionFramework": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.FqdnForActionFramework = ptr.String(jtv) + } + + case "isArchived": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsArchived = ptr.Bool(jtv) + } + + case "launchedInstance": + if err := awsRestjson1_deserializeDocumentLaunchedInstance(&sv.LaunchedInstance, value); err != nil { + return err + } + + case "lifeCycle": + if err := awsRestjson1_deserializeDocumentLifeCycle(&sv.LifeCycle, value); err != nil { + return err + } + + case "replicationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ReplicationType to be of type string, got %T instead", value) + } + sv.ReplicationType = types.ReplicationType(jtv) + } + + case "sourceProperties": + if err := awsRestjson1_deserializeDocumentSourceProperties(&sv.SourceProperties, value); err != nil { + return err + } + + case "sourceServerID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) + } + sv.SourceServerID = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "userProvidedID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.UserProvidedID = ptr.String(jtv) + } + + case "vcenterClientID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected VcenterClientID to be of type string, got %T instead", value) + } + sv.VcenterClientID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpUpdateWave struct { +} + +func (*awsRestjson1_deserializeOpUpdateWave) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateWave) 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_deserializeOpErrorUpdateWave(response, &metadata) + } + output := &UpdateWaveOutput{} + 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_deserializeOpDocumentUpdateWaveOutput(&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_deserializeOpErrorUpdateWave(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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("UninitializedAccountException", errorCode): + return awsRestjson1_deserializeErrorUninitializedAccountException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateWaveOutput(v **UpdateWaveOutput, 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 *UpdateWaveOutput + if *v == nil { + sv = &UpdateWaveOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "creationDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.CreationDateTime = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaveDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "isArchived": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsArchived = ptr.Bool(jtv) + } + + case "lastModifiedDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.LastModifiedDateTime = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaveName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "waveAggregatedStatus": + if err := awsRestjson1_deserializeDocumentWaveAggregatedStatus(&sv.WaveAggregatedStatus, value); err != nil { + return err + } + + case "waveID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) + } + sv.WaveID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeOpHttpBindingsInternalServerException(v *types.InternalServerException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + vv, err := strconv.ParseInt(headerValues[0], 0, 64) + if err != nil { + return err + } + v.RetryAfterSeconds = vv + } + + return nil +} +func awsRestjson1_deserializeOpHttpBindingsThrottlingException(v *types.ThrottlingException, response *smithyhttp.Response) error { + if v == nil { + return fmt.Errorf("unsupported deserialization for nil %T", v) + } + + if headerValues := response.Header.Values("Retry-After"); len(headerValues) != 0 { + headerValues[0] = strings.TrimSpace(headerValues[0]) + v.RetryAfterSeconds = ptr.String(headerValues[0]) + } + + return nil +} +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_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_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.InternalServerException{} + 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_deserializeDocumentInternalServerException(&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) + + if err := awsRestjson1_deserializeOpHttpBindingsInternalServerException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + return output +} + +func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ResourceNotFoundException{} + 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_deserializeDocumentResourceNotFoundException(&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_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ServiceQuotaExceededException{} + 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_deserializeDocumentServiceQuotaExceededException(&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_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ThrottlingException{} + 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_deserializeDocumentThrottlingException(&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) + + if err := awsRestjson1_deserializeOpHttpBindingsThrottlingException(output, response); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to decode response error with invalid HTTP bindings, %w", err)} + } + + return output +} + +func awsRestjson1_deserializeErrorUninitializedAccountException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.UninitializedAccountException{} + 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_deserializeDocumentUninitializedAccountException(&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_deserializeErrorValidationException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.ValidationException{} + 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_deserializeDocumentValidationException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDeniedException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.AccessDeniedException + if *v == nil { + sv = &types.AccessDeniedException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString 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 LargeBoundedString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentApplication(v **types.Application, 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.Application + if *v == nil { + sv = &types.Application{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "applicationAggregatedStatus": + if err := awsRestjson1_deserializeDocumentApplicationAggregatedStatus(&sv.ApplicationAggregatedStatus, value); err != nil { + return err + } + + case "applicationID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) + } + sv.ApplicationID = ptr.String(jtv) + } + + case "arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "creationDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.CreationDateTime = ptr.String(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "isArchived": + if value != nil { + jtv, ok := value.(bool) + if !ok { + return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + } + sv.IsArchived = ptr.Bool(jtv) + } + + case "lastModifiedDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.LastModifiedDateTime = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + return err + } + + case "waveID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) + } + sv.WaveID = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentApplicationAggregatedStatus(v **types.ApplicationAggregatedStatus, 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.ApplicationAggregatedStatus + if *v == nil { + sv = &types.ApplicationAggregatedStatus{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "healthStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationHealthStatus to be of type string, got %T instead", value) + } + sv.HealthStatus = types.ApplicationHealthStatus(jtv) + } + + case "lastUpdateDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.LastUpdateDateTime = ptr.String(jtv) + } + + case "progressStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ApplicationProgressStatus to be of type string, got %T instead", value) + } + sv.ProgressStatus = types.ApplicationProgressStatus(jtv) + } + + case "totalSourceServers": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalSourceServers = i64 + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentApplicationsList(v *[]types.Application, 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.Application + if *v == nil { + cv = []types.Application{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Application + destAddr := &col + if err := awsRestjson1_deserializeDocumentApplication(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *types.ConflictException + if *v == nil { + sv = &types.ConflictException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "code": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.Code = ptr.String(jtv) + } - var sv *types.AccessDeniedException + case "errors": + if err := awsRestjson1_deserializeDocumentConflictExceptionErrors(&sv.Errors, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resourceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentConflictExceptionErrors(v *[]types.ErrorDetails, 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.ErrorDetails if *v == nil { - sv = &types.AccessDeniedException{} + cv = []types.ErrorDetails{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ErrorDetails + destAddr := &col + if err := awsRestjson1_deserializeDocumentErrorDetails(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentCPU(v **types.CPU, 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.CPU + if *v == nil { + sv = &types.CPU{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "cores": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.Cores = i64 + } + + case "modelName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.ModelName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentCpus(v *[]types.CPU, 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.CPU + if *v == nil { + cv = []types.CPU{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.CPU + destAddr := &col + if err := awsRestjson1_deserializeDocumentCPU(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDataReplicationError(v **types.DataReplicationError, 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.DataReplicationError + if *v == nil { + sv = &types.DataReplicationError{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "error": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataReplicationErrorString to be of type string, got %T instead", value) + } + sv.Error = types.DataReplicationErrorString(jtv) + } + + case "rawError": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.RawError = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataReplicationInfo(v **types.DataReplicationInfo, 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.DataReplicationInfo + if *v == nil { + sv = &types.DataReplicationInfo{} } else { sv = *v } - for key, value := range shape { - switch key { - case "code": + for key, value := range shape { + switch key { + case "dataReplicationError": + if err := awsRestjson1_deserializeDocumentDataReplicationError(&sv.DataReplicationError, value); err != nil { + return err + } + + case "dataReplicationInitiation": + if err := awsRestjson1_deserializeDocumentDataReplicationInitiation(&sv.DataReplicationInitiation, value); err != nil { + return err + } + + case "dataReplicationState": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DataReplicationState to be of type string, got %T instead", value) + } + sv.DataReplicationState = types.DataReplicationState(jtv) + } + + case "etaDateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.Code = ptr.String(jtv) + sv.EtaDateTime = ptr.String(jtv) } - case "message": + case "lagDuration": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DurationString to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) + sv.LagDuration = ptr.String(jtv) + } + + case "lastSnapshotDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.LastSnapshotDateTime = ptr.String(jtv) + } + + case "replicatedDisks": + if err := awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisks(&sv.ReplicatedDisks, value); err != nil { + return err } default: @@ -10131,7 +11791,7 @@ func awsRestjson1_deserializeDocumentAccessDeniedException(v **types.AccessDenie return nil } -func awsRestjson1_deserializeDocumentApplication(v **types.Application, value interface{}) error { +func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisk(v **types.DataReplicationInfoReplicatedDisk, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10144,97 +11804,164 @@ func awsRestjson1_deserializeDocumentApplication(v **types.Application, value in return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Application + var sv *types.DataReplicationInfoReplicatedDisk if *v == nil { - sv = &types.Application{} + sv = &types.DataReplicationInfoReplicatedDisk{} } else { sv = *v } for key, value := range shape { switch key { - case "applicationAggregatedStatus": - if err := awsRestjson1_deserializeDocumentApplicationAggregatedStatus(&sv.ApplicationAggregatedStatus, value); err != nil { - return err - } - - case "applicationID": + case "backloggedStorageBytes": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.ApplicationID = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.BackloggedStorageBytes = i64 } - case "arn": + case "deviceName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ARN to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.Arn = ptr.String(jtv) + sv.DeviceName = ptr.String(jtv) } - case "creationDateTime": + case "replicatedStorageBytes": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.CreationDateTime = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ReplicatedStorageBytes = i64 } - case "description": + case "rescannedStorageBytes": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected ApplicationDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.Description = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RescannedStorageBytes = i64 } - case "isArchived": + case "totalStorageBytes": if value != nil { - jtv, ok := value.(bool) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected Boolean to be of type *bool, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.IsArchived = ptr.Bool(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.TotalStorageBytes = i64 } - case "lastModifiedDateTime": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisks(v *[]types.DataReplicationInfoReplicatedDisk, 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.DataReplicationInfoReplicatedDisk + if *v == nil { + cv = []types.DataReplicationInfoReplicatedDisk{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DataReplicationInfoReplicatedDisk + destAddr := &col + if err := awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisk(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDataReplicationInitiation(v **types.DataReplicationInitiation, 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.DataReplicationInitiation + if *v == nil { + sv = &types.DataReplicationInitiation{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextAttemptDateTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.LastModifiedDateTime = ptr.String(jtv) + sv.NextAttemptDateTime = ptr.String(jtv) } - case "name": + case "startDateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ApplicationName to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.StartDateTime = ptr.String(jtv) } - case "tags": - if err := awsRestjson1_deserializeDocumentTagsMap(&sv.Tags, value); err != nil { + case "steps": + if err := awsRestjson1_deserializeDocumentDataReplicationInitiationSteps(&sv.Steps, value); err != nil { return err } - case "waveID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) - } - sv.WaveID = ptr.String(jtv) - } - default: _, _ = key, value @@ -10244,7 +11971,7 @@ func awsRestjson1_deserializeDocumentApplication(v **types.Application, value in return nil } -func awsRestjson1_deserializeDocumentApplicationAggregatedStatus(v **types.ApplicationAggregatedStatus, value interface{}) error { +func awsRestjson1_deserializeDocumentDataReplicationInitiationStep(v **types.DataReplicationInitiationStep, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10257,43 +11984,99 @@ func awsRestjson1_deserializeDocumentApplicationAggregatedStatus(v **types.Appli return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ApplicationAggregatedStatus + var sv *types.DataReplicationInitiationStep if *v == nil { - sv = &types.ApplicationAggregatedStatus{} + sv = &types.DataReplicationInitiationStep{} } else { sv = *v } for key, value := range shape { switch key { - case "healthStatus": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ApplicationHealthStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected DataReplicationInitiationStepName to be of type string, got %T instead", value) } - sv.HealthStatus = types.ApplicationHealthStatus(jtv) + sv.Name = types.DataReplicationInitiationStepName(jtv) } - case "lastUpdateDateTime": + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + return fmt.Errorf("expected DataReplicationInitiationStepStatus to be of type string, got %T instead", value) } - sv.LastUpdateDateTime = ptr.String(jtv) + sv.Status = types.DataReplicationInitiationStepStatus(jtv) } - case "progressStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ApplicationProgressStatus to be of type string, got %T instead", value) - } - sv.ProgressStatus = types.ApplicationProgressStatus(jtv) - } + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentDataReplicationInitiationSteps(v *[]types.DataReplicationInitiationStep, 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.DataReplicationInitiationStep + if *v == nil { + cv = []types.DataReplicationInitiationStep{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.DataReplicationInitiationStep + destAddr := &col + if err := awsRestjson1_deserializeDocumentDataReplicationInitiationStep(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentDisk(v **types.Disk, 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.Disk + if *v == nil { + sv = &types.Disk{} + } else { + sv = *v + } - case "totalSourceServers": + for key, value := range shape { + switch key { + case "bytes": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -10303,7 +12086,16 @@ func awsRestjson1_deserializeDocumentApplicationAggregatedStatus(v **types.Appli if err != nil { return err } - sv.TotalSourceServers = i64 + sv.Bytes = i64 + } + + case "deviceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.DeviceName = ptr.String(jtv) } default: @@ -10315,7 +12107,7 @@ func awsRestjson1_deserializeDocumentApplicationAggregatedStatus(v **types.Appli return nil } -func awsRestjson1_deserializeDocumentApplicationsList(v *[]types.Application, value interface{}) error { +func awsRestjson1_deserializeDocumentDisks(v *[]types.Disk, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10328,17 +12120,17 @@ func awsRestjson1_deserializeDocumentApplicationsList(v *[]types.Application, va return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.Application + var cv []types.Disk if *v == nil { - cv = []types.Application{} + cv = []types.Disk{} } else { cv = *v } for _, value := range shape { - var col types.Application + var col types.Disk destAddr := &col - if err := awsRestjson1_deserializeDocumentApplication(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentDisk(&destAddr, value); err != nil { return err } col = *destAddr @@ -10349,7 +12141,7 @@ func awsRestjson1_deserializeDocumentApplicationsList(v *[]types.Application, va return nil } -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10362,9 +12154,9 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.ErrorDetails if *v == nil { - sv = &types.ConflictException{} + sv = &types.ErrorDetails{} } else { sv = *v } @@ -10375,16 +12167,11 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } sv.Code = ptr.String(jtv) } - case "errors": - if err := awsRestjson1_deserializeDocumentConflictExceptionErrors(&sv.Errors, value); err != nil { - return err - } - case "message": if value != nil { jtv, ok := value.(string) @@ -10421,7 +12208,47 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsRestjson1_deserializeDocumentConflictExceptionErrors(v *[]types.ErrorDetails, value interface{}) error { +func awsRestjson1_deserializeDocumentExportErrorData(v **types.ExportErrorData, 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.ExportErrorData + if *v == nil { + sv = &types.ExportErrorData{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "rawError": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + } + sv.RawError = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentExportErrors(v *[]types.ExportTaskError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10434,17 +12261,17 @@ func awsRestjson1_deserializeDocumentConflictExceptionErrors(v *[]types.ErrorDet return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ErrorDetails + var cv []types.ExportTaskError if *v == nil { - cv = []types.ErrorDetails{} + cv = []types.ExportTaskError{} } else { cv = *v } for _, value := range shape { - var col types.ErrorDetails + var col types.ExportTaskError destAddr := &col - if err := awsRestjson1_deserializeDocumentErrorDetails(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentExportTaskError(&destAddr, value); err != nil { return err } col = *destAddr @@ -10455,7 +12282,41 @@ func awsRestjson1_deserializeDocumentConflictExceptionErrors(v *[]types.ErrorDet return nil } -func awsRestjson1_deserializeDocumentCPU(v **types.CPU, value interface{}) error { +func awsRestjson1_deserializeDocumentExportsList(v *[]types.ExportTask, 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.ExportTask + if *v == nil { + cv = []types.ExportTask{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ExportTask + destAddr := &col + if err := awsRestjson1_deserializeDocumentExportTask(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentExportTask(v **types.ExportTask, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10468,35 +12329,115 @@ func awsRestjson1_deserializeDocumentCPU(v **types.CPU, value interface{}) error return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.CPU + var sv *types.ExportTask if *v == nil { - sv = &types.CPU{} + sv = &types.ExportTask{} } else { sv = *v } for key, value := range shape { switch key { - case "cores": + case "creationDateTime": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.CreationDateTime = ptr.String(jtv) + } + + case "endDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.Cores = i64 + sv.EndDateTime = ptr.String(jtv) } - case "modelName": + case "exportID": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected ExportID to be of type string, got %T instead", value) + } + sv.ExportID = ptr.String(jtv) + } + + case "progressPercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ProgressPercentage = ptr.Float32(float32(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.ProgressPercentage = ptr.Float32(float32(f64)) + + default: + return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value) + } - sv.ModelName = ptr.String(jtv) + } + + case "s3Bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.S3Bucket = ptr.String(jtv) + } + + case "s3BucketOwner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountID to be of type string, got %T instead", value) + } + sv.S3BucketOwner = ptr.String(jtv) + } + + case "s3Key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Key to be of type string, got %T instead", value) + } + sv.S3Key = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ExportStatus to be of type string, got %T instead", value) + } + sv.Status = types.ExportStatus(jtv) + } + + case "summary": + if err := awsRestjson1_deserializeDocumentExportTaskSummary(&sv.Summary, value); err != nil { + return err } default: @@ -10508,7 +12449,7 @@ func awsRestjson1_deserializeDocumentCPU(v **types.CPU, value interface{}) error return nil } -func awsRestjson1_deserializeDocumentCpus(v *[]types.CPU, value interface{}) error { +func awsRestjson1_deserializeDocumentExportTaskError(v **types.ExportTaskError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10516,33 +12457,44 @@ func awsRestjson1_deserializeDocumentCpus(v *[]types.CPU, value interface{}) err 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.CPU + var sv *types.ExportTaskError if *v == nil { - cv = []types.CPU{} + sv = &types.ExportTaskError{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.CPU - destAddr := &col - if err := awsRestjson1_deserializeDocumentCPU(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "errorData": + if err := awsRestjson1_deserializeDocumentExportErrorData(&sv.ErrorData, value); err != nil { + return err + } + + case "errorDateTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + } + sv.ErrorDateTime = ptr.String(jtv) + } + + default: + _, _ = key, value + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentDataReplicationError(v **types.DataReplicationError, value interface{}) error { +func awsRestjson1_deserializeDocumentExportTaskSummary(v **types.ExportTaskSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10555,31 +12507,52 @@ func awsRestjson1_deserializeDocumentDataReplicationError(v **types.DataReplicat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DataReplicationError + var sv *types.ExportTaskSummary if *v == nil { - sv = &types.DataReplicationError{} + sv = &types.ExportTaskSummary{} } else { sv = *v } for key, value := range shape { switch key { - case "error": + case "applicationsCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected DataReplicationErrorString to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.Error = types.DataReplicationErrorString(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ApplicationsCount = i64 } - case "rawError": + case "serversCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.RawError = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ServersCount = i64 + } + + case "wavesCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.WavesCount = i64 } default: @@ -10591,7 +12564,7 @@ func awsRestjson1_deserializeDocumentDataReplicationError(v **types.DataReplicat return nil } -func awsRestjson1_deserializeDocumentDataReplicationInfo(v **types.DataReplicationInfo, value interface{}) error { +func awsRestjson1_deserializeDocumentIdentificationHints(v **types.IdentificationHints, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10604,64 +12577,58 @@ func awsRestjson1_deserializeDocumentDataReplicationInfo(v **types.DataReplicati return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DataReplicationInfo + var sv *types.IdentificationHints if *v == nil { - sv = &types.DataReplicationInfo{} + sv = &types.IdentificationHints{} } else { sv = *v } for key, value := range shape { switch key { - case "dataReplicationError": - if err := awsRestjson1_deserializeDocumentDataReplicationError(&sv.DataReplicationError, value); err != nil { - return err - } - - case "dataReplicationInitiation": - if err := awsRestjson1_deserializeDocumentDataReplicationInitiation(&sv.DataReplicationInitiation, value); err != nil { - return err - } - - case "dataReplicationState": + case "awsInstanceID": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DataReplicationState to be of type string, got %T instead", value) + return fmt.Errorf("expected EC2InstanceID to be of type string, got %T instead", value) } - sv.DataReplicationState = types.DataReplicationState(jtv) + sv.AwsInstanceID = ptr.String(jtv) } - case "etaDateTime": + case "fqdn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.EtaDateTime = ptr.String(jtv) + sv.Fqdn = ptr.String(jtv) } - case "lagDuration": + case "hostname": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ISO8601DurationString to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.LagDuration = ptr.String(jtv) + sv.Hostname = ptr.String(jtv) } - case "lastSnapshotDateTime": + case "vmPath": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.LastSnapshotDateTime = ptr.String(jtv) + sv.VmPath = ptr.String(jtv) } - case "replicatedDisks": - if err := awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisks(&sv.ReplicatedDisks, value); err != nil { - return err + case "vmWareUuid": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.VmWareUuid = ptr.String(jtv) } default: @@ -10673,7 +12640,7 @@ func awsRestjson1_deserializeDocumentDataReplicationInfo(v **types.DataReplicati return nil } -func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisk(v **types.DataReplicationInfoReplicatedDisk, value interface{}) error { +func awsRestjson1_deserializeDocumentImportErrorData(v **types.ImportErrorData, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10686,51 +12653,43 @@ func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisk(v **types return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DataReplicationInfoReplicatedDisk + var sv *types.ImportErrorData if *v == nil { - sv = &types.DataReplicationInfoReplicatedDisk{} + sv = &types.ImportErrorData{} } else { sv = *v } for key, value := range shape { switch key { - case "backloggedStorageBytes": + case "applicationID": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected ApplicationID to be of type string, got %T instead", value) } - sv.BackloggedStorageBytes = i64 + sv.ApplicationID = ptr.String(jtv) } - case "deviceName": + case "ec2LaunchTemplateID": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) } - sv.DeviceName = ptr.String(jtv) + sv.Ec2LaunchTemplateID = ptr.String(jtv) } - case "replicatedStorageBytes": + case "rawError": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) } - sv.ReplicatedStorageBytes = i64 + sv.RawError = ptr.String(jtv) } - case "rescannedStorageBytes": + case "rowNumber": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -10740,20 +12699,25 @@ func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisk(v **types if err != nil { return err } - sv.RescannedStorageBytes = i64 + sv.RowNumber = i64 } - case "totalStorageBytes": + case "sourceServerID": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) + return fmt.Errorf("expected SourceServerID to be of type string, got %T instead", value) } - i64, err := jtv.Int64() - if err != nil { - return err + sv.SourceServerID = ptr.String(jtv) + } + + case "waveID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected WaveID to be of type string, got %T instead", value) } - sv.TotalStorageBytes = i64 + sv.WaveID = ptr.String(jtv) } default: @@ -10765,7 +12729,7 @@ func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisk(v **types return nil } -func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisks(v *[]types.DataReplicationInfoReplicatedDisk, value interface{}) error { +func awsRestjson1_deserializeDocumentImportErrors(v *[]types.ImportTaskError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10778,17 +12742,17 @@ func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisks(v *[]typ return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.DataReplicationInfoReplicatedDisk + var cv []types.ImportTaskError if *v == nil { - cv = []types.DataReplicationInfoReplicatedDisk{} + cv = []types.ImportTaskError{} } else { cv = *v } for _, value := range shape { - var col types.DataReplicationInfoReplicatedDisk + var col types.ImportTaskError destAddr := &col - if err := awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisk(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentImportTaskError(&destAddr, value); err != nil { return err } col = *destAddr @@ -10799,7 +12763,41 @@ func awsRestjson1_deserializeDocumentDataReplicationInfoReplicatedDisks(v *[]typ return nil } -func awsRestjson1_deserializeDocumentDataReplicationInitiation(v **types.DataReplicationInitiation, value interface{}) error { +func awsRestjson1_deserializeDocumentImportList(v *[]types.ImportTask, 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.ImportTask + if *v == nil { + cv = []types.ImportTask{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ImportTask + destAddr := &col + if err := awsRestjson1_deserializeDocumentImportTask(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentImportTask(v **types.ImportTask, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10812,35 +12810,92 @@ func awsRestjson1_deserializeDocumentDataReplicationInitiation(v **types.DataRep return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DataReplicationInitiation + var sv *types.ImportTask if *v == nil { - sv = &types.DataReplicationInitiation{} + sv = &types.ImportTask{} } else { sv = *v } for key, value := range shape { switch key { - case "nextAttemptDateTime": + case "creationDateTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.NextAttemptDateTime = ptr.String(jtv) + sv.CreationDateTime = ptr.String(jtv) } - case "startDateTime": + case "endDateTime": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.StartDateTime = ptr.String(jtv) + sv.EndDateTime = ptr.String(jtv) } - case "steps": - if err := awsRestjson1_deserializeDocumentDataReplicationInitiationSteps(&sv.Steps, value); err != nil { + case "importID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportID to be of type string, got %T instead", value) + } + sv.ImportID = ptr.String(jtv) + } + + case "progressPercentage": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ProgressPercentage = ptr.Float32(float32(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.ProgressPercentage = ptr.Float32(float32(f64)) + + default: + return fmt.Errorf("expected Float to be a JSON Number, got %T instead", value) + + } + } + + case "s3BucketSource": + if err := awsRestjson1_deserializeDocumentS3BucketSource(&sv.S3BucketSource, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ImportStatus to be of type string, got %T instead", value) + } + sv.Status = types.ImportStatus(jtv) + } + + case "summary": + if err := awsRestjson1_deserializeDocumentImportTaskSummary(&sv.Summary, value); err != nil { return err } @@ -10853,7 +12908,7 @@ func awsRestjson1_deserializeDocumentDataReplicationInitiation(v **types.DataRep return nil } -func awsRestjson1_deserializeDocumentDataReplicationInitiationStep(v **types.DataReplicationInitiationStep, value interface{}) error { +func awsRestjson1_deserializeDocumentImportTaskError(v **types.ImportTaskError, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10866,31 +12921,36 @@ func awsRestjson1_deserializeDocumentDataReplicationInitiationStep(v **types.Dat return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DataReplicationInitiationStep + var sv *types.ImportTaskError if *v == nil { - sv = &types.DataReplicationInitiationStep{} + sv = &types.ImportTaskError{} } else { sv = *v } for key, value := range shape { switch key { - case "name": + case "errorData": + if err := awsRestjson1_deserializeDocumentImportErrorData(&sv.ErrorData, value); err != nil { + return err + } + + case "errorDateTime": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DataReplicationInitiationStepName to be of type string, got %T instead", value) + return fmt.Errorf("expected ISO8601DatetimeString to be of type string, got %T instead", value) } - sv.Name = types.DataReplicationInitiationStepName(jtv) + sv.ErrorDateTime = ptr.String(jtv) } - case "status": + case "errorType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DataReplicationInitiationStepStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected ImportErrorType to be of type string, got %T instead", value) } - sv.Status = types.DataReplicationInitiationStepStatus(jtv) + sv.ErrorType = types.ImportErrorType(jtv) } default: @@ -10902,7 +12962,7 @@ func awsRestjson1_deserializeDocumentDataReplicationInitiationStep(v **types.Dat return nil } -func awsRestjson1_deserializeDocumentDataReplicationInitiationSteps(v *[]types.DataReplicationInitiationStep, value interface{}) error { +func awsRestjson1_deserializeDocumentImportTaskSummary(v **types.ImportTaskSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10910,33 +12970,45 @@ func awsRestjson1_deserializeDocumentDataReplicationInitiationSteps(v *[]types.D 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.DataReplicationInitiationStep + var sv *types.ImportTaskSummary if *v == nil { - cv = []types.DataReplicationInitiationStep{} + sv = &types.ImportTaskSummary{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.DataReplicationInitiationStep - destAddr := &col - if err := awsRestjson1_deserializeDocumentDataReplicationInitiationStep(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "applications": + if err := awsRestjson1_deserializeDocumentImportTaskSummaryApplications(&sv.Applications, value); err != nil { + return err + } + + case "servers": + if err := awsRestjson1_deserializeDocumentImportTaskSummaryServers(&sv.Servers, value); err != nil { + return err + } + + case "waves": + if err := awsRestjson1_deserializeDocumentImportTaskSummaryWaves(&sv.Waves, value); err != nil { + return err + } + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentDisk(v **types.Disk, value interface{}) error { +func awsRestjson1_deserializeDocumentImportTaskSummaryApplications(v **types.ImportTaskSummaryApplications, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10949,16 +13021,16 @@ func awsRestjson1_deserializeDocumentDisk(v **types.Disk, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Disk + var sv *types.ImportTaskSummaryApplications if *v == nil { - sv = &types.Disk{} + sv = &types.ImportTaskSummaryApplications{} } else { sv = *v } for key, value := range shape { switch key { - case "bytes": + case "createdCount": if value != nil { jtv, ok := value.(json.Number) if !ok { @@ -10968,62 +13040,32 @@ func awsRestjson1_deserializeDocumentDisk(v **types.Disk, value interface{}) err if err != nil { return err } - sv.Bytes = i64 + sv.CreatedCount = i64 } - case "deviceName": + case "modifiedCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.DeviceName = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentDisks(v *[]types.Disk, 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) - } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ModifiedCount = i64 + } - var cv []types.Disk - if *v == nil { - cv = []types.Disk{} - } else { - cv = *v - } + default: + _, _ = key, value - for _, value := range shape { - var col types.Disk - destAddr := &col - if err := awsRestjson1_deserializeDocumentDisk(&destAddr, value); err != nil { - return err } - col = *destAddr - cv = append(cv, col) - } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value interface{}) error { +func awsRestjson1_deserializeDocumentImportTaskSummaryServers(v **types.ImportTaskSummaryServers, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11036,49 +13078,39 @@ func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ErrorDetails + var sv *types.ImportTaskSummaryServers if *v == nil { - sv = &types.ErrorDetails{} + sv = &types.ImportTaskSummaryServers{} } else { sv = *v } for key, value := range shape { switch key { - case "code": + case "createdCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.Code = ptr.String(jtv) - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.Message = ptr.String(jtv) + sv.CreatedCount = i64 } - case "resourceId": + case "modifiedCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.ResourceId = ptr.String(jtv) - } - - case "resourceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected LargeBoundedString to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.ResourceType = ptr.String(jtv) + sv.ModifiedCount = i64 } default: @@ -11090,7 +13122,7 @@ func awsRestjson1_deserializeDocumentErrorDetails(v **types.ErrorDetails, value return nil } -func awsRestjson1_deserializeDocumentIdentificationHints(v **types.IdentificationHints, value interface{}) error { +func awsRestjson1_deserializeDocumentImportTaskSummaryWaves(v **types.ImportTaskSummaryWaves, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11103,58 +13135,39 @@ func awsRestjson1_deserializeDocumentIdentificationHints(v **types.Identificatio return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.IdentificationHints + var sv *types.ImportTaskSummaryWaves if *v == nil { - sv = &types.IdentificationHints{} + sv = &types.ImportTaskSummaryWaves{} } else { sv = *v } for key, value := range shape { switch key { - case "awsInstanceID": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EC2InstanceID to be of type string, got %T instead", value) - } - sv.AwsInstanceID = ptr.String(jtv) - } - - case "fqdn": + case "createdCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.Fqdn = ptr.String(jtv) - } - - case "hostname": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.Hostname = ptr.String(jtv) + sv.CreatedCount = i64 } - case "vmPath": + case "modifiedCount": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + return fmt.Errorf("expected PositiveInteger to be json.Number, got %T instead", value) } - sv.VmPath = ptr.String(jtv) - } - - case "vmWareUuid": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + i64, err := jtv.Int64() + if err != nil { + return err } - sv.VmWareUuid = ptr.String(jtv) + sv.ModifiedCount = i64 } default: @@ -13211,6 +15224,64 @@ func awsRestjson1_deserializeDocumentResourceNotFoundException(v **types.Resourc return nil } +func awsRestjson1_deserializeDocumentS3BucketSource(v **types.S3BucketSource, 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.S3BucketSource + if *v == nil { + sv = &types.S3BucketSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "s3Bucket": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3BucketName to be of type string, got %T instead", value) + } + sv.S3Bucket = ptr.String(jtv) + } + + case "s3BucketOwner": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AccountID to be of type string, got %T instead", value) + } + sv.S3BucketOwner = ptr.String(jtv) + } + + case "s3Key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected S3Key to be of type string, got %T instead", value) + } + sv.S3Key = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13441,6 +15512,15 @@ func awsRestjson1_deserializeDocumentSourceServer(v **types.SourceServer, value return err } + case "fqdnForActionFramework": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.FqdnForActionFramework = ptr.String(jtv) + } + case "isArchived": if value != nil { jtv, ok := value.(bool) @@ -13488,6 +15568,15 @@ func awsRestjson1_deserializeDocumentSourceServer(v **types.SourceServer, value return err } + case "userProvidedID": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected BoundedString to be of type string, got %T instead", value) + } + sv.UserProvidedID = ptr.String(jtv) + } + case "vcenterClientID": if value != nil { jtv, ok := value.(string) @@ -13555,6 +15644,24 @@ func awsRestjson1_deserializeDocumentSourceServerActionDocument(v **types.Source sv.Active = ptr.Bool(jtv) } + case "category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionCategory to be of type string, got %T instead", value) + } + sv.Category = types.ActionCategory(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + case "documentIdentifier": if value != nil { jtv, ok := value.(string) @@ -13573,6 +15680,11 @@ func awsRestjson1_deserializeDocumentSourceServerActionDocument(v **types.Source sv.DocumentVersion = ptr.String(jtv) } + case "externalParameters": + if err := awsRestjson1_deserializeDocumentSsmDocumentExternalParameters(&sv.ExternalParameters, value); err != nil { + return err + } + case "mustSucceedForCutover": if value != nil { jtv, ok := value.(bool) @@ -13721,6 +15833,11 @@ func awsRestjson1_deserializeDocumentSsmDocument(v **types.SsmDocument, value in sv.ActionName = ptr.String(jtv) } + case "externalParameters": + if err := awsRestjson1_deserializeDocumentSsmDocumentExternalParameters(&sv.ExternalParameters, value); err != nil { + return err + } + case "mustSucceedForCutover": if value != nil { jtv, ok := value.(bool) @@ -13766,6 +15883,40 @@ func awsRestjson1_deserializeDocumentSsmDocument(v **types.SsmDocument, value in return nil } +func awsRestjson1_deserializeDocumentSsmDocumentExternalParameters(v *map[string]types.SsmExternalParameter, 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]types.SsmExternalParameter + if *v == nil { + mv = map[string]types.SsmExternalParameter{} + } else { + mv = *v + } + + for key, value := range shape { + var parsedVal types.SsmExternalParameter + mapVar := parsedVal + if err := awsRestjson1_deserializeDocumentSsmExternalParameter(&mapVar, value); err != nil { + return err + } + parsedVal = mapVar + mv[key] = parsedVal + + } + *v = mv + return nil +} + func awsRestjson1_deserializeDocumentSsmDocumentParameters(v *map[string][]types.SsmParameterStoreParameter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13834,6 +15985,48 @@ func awsRestjson1_deserializeDocumentSsmDocuments(v *[]types.SsmDocument, value return nil } +func awsRestjson1_deserializeDocumentSsmExternalParameter(v *types.SsmExternalParameter, 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 uv types.SsmExternalParameter +loop: + for key, value := range shape { + if value == nil { + continue + } + switch key { + case "dynamicPath": + var mv string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected JmesPathString to be of type string, got %T instead", value) + } + mv = jtv + } + uv = &types.SsmExternalParameterMemberDynamicPath{Value: mv} + break loop + + default: + uv = &types.UnknownUnionMember{Tag: key} + break loop + + } + } + *v = uv + return nil +} + func awsRestjson1_deserializeDocumentSsmParameterStoreParameter(v **types.SsmParameterStoreParameter, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14002,6 +16195,24 @@ func awsRestjson1_deserializeDocumentTemplateActionDocument(v **types.TemplateAc sv.Active = ptr.Bool(jtv) } + case "category": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionCategory to be of type string, got %T instead", value) + } + sv.Category = types.ActionCategory(jtv) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ActionDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + case "documentIdentifier": if value != nil { jtv, ok := value.(string) @@ -14020,6 +16231,11 @@ func awsRestjson1_deserializeDocumentTemplateActionDocument(v **types.TemplateAc sv.DocumentVersion = ptr.String(jtv) } + case "externalParameters": + if err := awsRestjson1_deserializeDocumentSsmDocumentExternalParameters(&sv.ExternalParameters, value); err != nil { + return err + } + case "mustSucceedForCutover": if value != nil { jtv, ok := value.(bool) diff --git a/service/mgn/generated.json b/service/mgn/generated.json index 05271408756..2ce05ab58e1 100644 --- a/service/mgn/generated.json +++ b/service/mgn/generated.json @@ -38,6 +38,10 @@ "api_op_GetReplicationConfiguration.go", "api_op_InitializeService.go", "api_op_ListApplications.go", + "api_op_ListExportErrors.go", + "api_op_ListExports.go", + "api_op_ListImportErrors.go", + "api_op_ListImports.go", "api_op_ListSourceServerActions.go", "api_op_ListTagsForResource.go", "api_op_ListTemplateActions.go", @@ -49,6 +53,8 @@ "api_op_RemoveTemplateAction.go", "api_op_RetryDataReplication.go", "api_op_StartCutover.go", + "api_op_StartExport.go", + "api_op_StartImport.go", "api_op_StartReplication.go", "api_op_StartTest.go", "api_op_TagResource.go", @@ -74,6 +80,7 @@ "types/enums.go", "types/errors.go", "types/types.go", + "types/types_exported_test.go", "validators.go" ], "go": "1.15", diff --git a/service/mgn/serializers.go b/service/mgn/serializers.go index 0ba958f69a6..c5e16d3eff4 100644 --- a/service/mgn/serializers.go +++ b/service/mgn/serializers.go @@ -2290,6 +2290,322 @@ func awsRestjson1_serializeOpDocumentListApplicationsInput(v *ListApplicationsIn return nil } +type awsRestjson1_serializeOpListExportErrors struct { +} + +func (*awsRestjson1_serializeOpListExportErrors) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListExportErrors) 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.(*ListExportErrorsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListExportErrors") + 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_serializeOpDocumentListExportErrorsInput(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_serializeOpHttpBindingsListExportErrorsInput(v *ListExportErrorsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListExportErrorsInput(v *ListExportErrorsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExportID != nil { + ok := object.Key("exportID") + ok.String(*v.ExportID) + } + + if v.MaxResults != 0 { + ok := object.Key("maxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListExports struct { +} + +func (*awsRestjson1_serializeOpListExports) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListExports) 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.(*ListExportsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListExports") + 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_serializeOpDocumentListExportsInput(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_serializeOpHttpBindingsListExportsInput(v *ListExportsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListExportsInput(v *ListExportsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentListExportsRequestFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != 0 { + ok := object.Key("maxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListImportErrors struct { +} + +func (*awsRestjson1_serializeOpListImportErrors) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListImportErrors) 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.(*ListImportErrorsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListImportErrors") + 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_serializeOpDocumentListImportErrorsInput(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_serializeOpHttpBindingsListImportErrorsInput(v *ListImportErrorsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListImportErrorsInput(v *ListImportErrorsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImportID != nil { + ok := object.Key("importID") + ok.String(*v.ImportID) + } + + if v.MaxResults != 0 { + ok := object.Key("maxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + +type awsRestjson1_serializeOpListImports struct { +} + +func (*awsRestjson1_serializeOpListImports) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListImports) 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.(*ListImportsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/ListImports") + 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_serializeOpDocumentListImportsInput(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_serializeOpHttpBindingsListImportsInput(v *ListImportsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentListImportsInput(v *ListImportsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Filters != nil { + ok := object.Key("filters") + if err := awsRestjson1_serializeDocumentListImportsRequestFilters(v.Filters, ok); err != nil { + return err + } + } + + if v.MaxResults != 0 { + ok := object.Key("maxResults") + ok.Integer(v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("nextToken") + ok.String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListSourceServerActions struct { } @@ -2741,6 +3057,16 @@ func awsRestjson1_serializeOpDocumentPutSourceServerActionInput(v *PutSourceServ ok.Boolean(*v.Active) } + if len(v.Category) > 0 { + ok := object.Key("category") + ok.String(string(v.Category)) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + if v.DocumentIdentifier != nil { ok := object.Key("documentIdentifier") ok.String(*v.DocumentIdentifier) @@ -2751,6 +3077,13 @@ func awsRestjson1_serializeOpDocumentPutSourceServerActionInput(v *PutSourceServ ok.String(*v.DocumentVersion) } + if v.ExternalParameters != nil { + ok := object.Key("externalParameters") + if err := awsRestjson1_serializeDocumentSsmDocumentExternalParameters(v.ExternalParameters, ok); err != nil { + return err + } + } + if v.MustSucceedForCutover != nil { ok := object.Key("mustSucceedForCutover") ok.Boolean(*v.MustSucceedForCutover) @@ -2856,6 +3189,16 @@ func awsRestjson1_serializeOpDocumentPutTemplateActionInput(v *PutTemplateAction ok.Boolean(*v.Active) } + if len(v.Category) > 0 { + ok := object.Key("category") + ok.String(string(v.Category)) + } + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + if v.DocumentIdentifier != nil { ok := object.Key("documentIdentifier") ok.String(*v.DocumentIdentifier) @@ -2866,6 +3209,13 @@ func awsRestjson1_serializeOpDocumentPutTemplateActionInput(v *PutTemplateAction ok.String(*v.DocumentVersion) } + if v.ExternalParameters != nil { + ok := object.Key("externalParameters") + if err := awsRestjson1_serializeDocumentSsmDocumentExternalParameters(v.ExternalParameters, ok); err != nil { + return err + } + } + if v.LaunchConfigurationTemplateID != nil { ok := object.Key("launchConfigurationTemplateID") ok.String(*v.LaunchConfigurationTemplateID) @@ -3192,6 +3542,159 @@ func awsRestjson1_serializeOpDocumentStartCutoverInput(v *StartCutoverInput, val return nil } +type awsRestjson1_serializeOpStartExport struct { +} + +func (*awsRestjson1_serializeOpStartExport) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartExport) 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.(*StartExportInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/StartExport") + 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_serializeOpDocumentStartExportInput(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_serializeOpHttpBindingsStartExportInput(v *StartExportInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartExportInput(v *StartExportInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Bucket != nil { + ok := object.Key("s3Bucket") + ok.String(*v.S3Bucket) + } + + if v.S3BucketOwner != nil { + ok := object.Key("s3BucketOwner") + ok.String(*v.S3BucketOwner) + } + + if v.S3Key != nil { + ok := object.Key("s3Key") + ok.String(*v.S3Key) + } + + return nil +} + +type awsRestjson1_serializeOpStartImport struct { +} + +func (*awsRestjson1_serializeOpStartImport) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartImport) 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.(*StartImportInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/StartImport") + 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_serializeOpDocumentStartImportInput(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_serializeOpHttpBindingsStartImportInput(v *StartImportInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartImportInput(v *StartImportInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ClientToken != nil { + ok := object.Key("clientToken") + ok.String(*v.ClientToken) + } + + if v.S3BucketSource != nil { + ok := object.Key("s3BucketSource") + if err := awsRestjson1_serializeDocumentS3BucketSource(v.S3BucketSource, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpStartReplication struct { } @@ -4634,6 +5137,17 @@ func awsRestjson1_serializeDocumentDisassociateSourceServersRequestSourceServerI return nil } +func awsRestjson1_serializeDocumentImportIDsFilter(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + func awsRestjson1_serializeDocumentLaunchConfigurationTemplateIDs(v []string, value smithyjson.Value) error { array := value.Array() defer array.Close() @@ -4716,6 +5230,45 @@ func awsRestjson1_serializeDocumentListApplicationsRequestFilters(v *types.ListA return nil } +func awsRestjson1_serializeDocumentListExportsRequestFilters(v *types.ListExportsRequestFilters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ExportIDs != nil { + ok := object.Key("exportIDs") + if err := awsRestjson1_serializeDocumentListExportsRequestFiltersExportIDs(v.ExportIDs, ok); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeDocumentListExportsRequestFiltersExportIDs(v []string, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(v[i]) + } + return nil +} + +func awsRestjson1_serializeDocumentListImportsRequestFilters(v *types.ListImportsRequestFilters, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ImportIDs != nil { + ok := object.Key("importIDs") + if err := awsRestjson1_serializeDocumentImportIDsFilter(v.ImportIDs, ok); err != nil { + return err + } + } + + return nil +} + func awsRestjson1_serializeDocumentListWavesRequestFilters(v *types.ListWavesRequestFilters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4847,6 +5400,28 @@ func awsRestjson1_serializeDocumentReplicationTypes(v []types.ReplicationType, v return nil } +func awsRestjson1_serializeDocumentS3BucketSource(v *types.S3BucketSource, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.S3Bucket != nil { + ok := object.Key("s3Bucket") + ok.String(*v.S3Bucket) + } + + if v.S3BucketOwner != nil { + ok := object.Key("s3BucketOwner") + ok.String(*v.S3BucketOwner) + } + + if v.S3Key != nil { + ok := object.Key("s3Key") + ok.String(*v.S3Key) + } + + return nil +} + func awsRestjson1_serializeDocumentSourceServerActionsRequestFilters(v *types.SourceServerActionsRequestFilters, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4870,6 +5445,13 @@ func awsRestjson1_serializeDocumentSsmDocument(v *types.SsmDocument, value smith ok.String(*v.ActionName) } + if v.ExternalParameters != nil { + ok := object.Key("externalParameters") + if err := awsRestjson1_serializeDocumentSsmDocumentExternalParameters(v.ExternalParameters, ok); err != nil { + return err + } + } + if v.MustSucceedForCutover != nil { ok := object.Key("mustSucceedForCutover") ok.Boolean(*v.MustSucceedForCutover) @@ -4895,6 +5477,22 @@ func awsRestjson1_serializeDocumentSsmDocument(v *types.SsmDocument, value smith return nil } +func awsRestjson1_serializeDocumentSsmDocumentExternalParameters(v map[string]types.SsmExternalParameter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + for key := range v { + om := object.Key(key) + if vv := v[key]; vv == nil { + continue + } + if err := awsRestjson1_serializeDocumentSsmExternalParameter(v[key], om); err != nil { + return err + } + } + return nil +} + func awsRestjson1_serializeDocumentSsmDocumentParameters(v map[string][]types.SsmParameterStoreParameter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4924,6 +5522,22 @@ func awsRestjson1_serializeDocumentSsmDocuments(v []types.SsmDocument, value smi return nil } +func awsRestjson1_serializeDocumentSsmExternalParameter(v types.SsmExternalParameter, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + switch uv := v.(type) { + case *types.SsmExternalParameterMemberDynamicPath: + av := object.Key("dynamicPath") + av.String(uv.Value) + + default: + return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) + + } + return nil +} + func awsRestjson1_serializeDocumentSsmParameterStoreParameter(v *types.SsmParameterStoreParameter, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/mgn/types/enums.go b/service/mgn/types/enums.go index 286fb0e8e83..371b18a5eb0 100644 --- a/service/mgn/types/enums.go +++ b/service/mgn/types/enums.go @@ -2,6 +2,40 @@ package types +type ActionCategory string + +// Enum values for ActionCategory +const ( + ActionCategoryDisasterRecovery ActionCategory = "DISASTER_RECOVERY" + ActionCategoryOperatingSystem ActionCategory = "OPERATING_SYSTEM" + ActionCategoryLicenseAndSubscription ActionCategory = "LICENSE_AND_SUBSCRIPTION" + ActionCategoryValidation ActionCategory = "VALIDATION" + ActionCategoryObservability ActionCategory = "OBSERVABILITY" + ActionCategorySecurity ActionCategory = "SECURITY" + ActionCategoryNetworking ActionCategory = "NETWORKING" + ActionCategoryConfiguration ActionCategory = "CONFIGURATION" + ActionCategoryBackup ActionCategory = "BACKUP" + ActionCategoryOther ActionCategory = "OTHER" +) + +// Values returns all known values for ActionCategory. 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 (ActionCategory) Values() []ActionCategory { + return []ActionCategory{ + "DISASTER_RECOVERY", + "OPERATING_SYSTEM", + "LICENSE_AND_SUBSCRIPTION", + "VALIDATION", + "OBSERVABILITY", + "SECURITY", + "NETWORKING", + "CONFIGURATION", + "BACKUP", + "OTHER", + } +} + type ApplicationHealthStatus string // Enum values for ApplicationHealthStatus @@ -227,6 +261,28 @@ func (DataReplicationState) Values() []DataReplicationState { } } +type ExportStatus string + +// Enum values for ExportStatus +const ( + ExportStatusPending ExportStatus = "PENDING" + ExportStatusStarted ExportStatus = "STARTED" + ExportStatusFailed ExportStatus = "FAILED" + ExportStatusSucceeded ExportStatus = "SUCCEEDED" +) + +// Values returns all known values for ExportStatus. 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 (ExportStatus) Values() []ExportStatus { + return []ExportStatus{ + "PENDING", + "STARTED", + "FAILED", + "SUCCEEDED", + } +} + type FirstBoot string // Enum values for FirstBoot @@ -249,6 +305,46 @@ func (FirstBoot) Values() []FirstBoot { } } +type ImportErrorType string + +// Enum values for ImportErrorType +const ( + ImportErrorTypeValidationError ImportErrorType = "VALIDATION_ERROR" + ImportErrorTypeProcessingError ImportErrorType = "PROCESSING_ERROR" +) + +// Values returns all known values for ImportErrorType. 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 (ImportErrorType) Values() []ImportErrorType { + return []ImportErrorType{ + "VALIDATION_ERROR", + "PROCESSING_ERROR", + } +} + +type ImportStatus string + +// Enum values for ImportStatus +const ( + ImportStatusPending ImportStatus = "PENDING" + ImportStatusStarted ImportStatus = "STARTED" + ImportStatusFailed ImportStatus = "FAILED" + ImportStatusSucceeded ImportStatus = "SUCCEEDED" +) + +// Values returns all known values for ImportStatus. 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 (ImportStatus) Values() []ImportStatus { + return []ImportStatus{ + "PENDING", + "STARTED", + "FAILED", + "SUCCEEDED", + } +} + type InitiatedBy string // Enum values for InitiatedBy @@ -401,15 +497,16 @@ type LifeCycleState string // Enum values for LifeCycleState const ( - LifeCycleStateStopped LifeCycleState = "STOPPED" - LifeCycleStateNotReady LifeCycleState = "NOT_READY" - LifeCycleStateReadyForTest LifeCycleState = "READY_FOR_TEST" - LifeCycleStateTesting LifeCycleState = "TESTING" - LifeCycleStateReadyForCutover LifeCycleState = "READY_FOR_CUTOVER" - LifeCycleStateCuttingOver LifeCycleState = "CUTTING_OVER" - LifeCycleStateCutover LifeCycleState = "CUTOVER" - LifeCycleStateDisconnected LifeCycleState = "DISCONNECTED" - LifeCycleStateDiscovered LifeCycleState = "DISCOVERED" + LifeCycleStateStopped LifeCycleState = "STOPPED" + LifeCycleStateNotReady LifeCycleState = "NOT_READY" + LifeCycleStateReadyForTest LifeCycleState = "READY_FOR_TEST" + LifeCycleStateTesting LifeCycleState = "TESTING" + LifeCycleStateReadyForCutover LifeCycleState = "READY_FOR_CUTOVER" + LifeCycleStateCuttingOver LifeCycleState = "CUTTING_OVER" + LifeCycleStateCutover LifeCycleState = "CUTOVER" + LifeCycleStateDisconnected LifeCycleState = "DISCONNECTED" + LifeCycleStateDiscovered LifeCycleState = "DISCOVERED" + LifeCycleStatePendingInstallation LifeCycleState = "PENDING_INSTALLATION" ) // Values returns all known values for LifeCycleState. Note that this can be @@ -426,6 +523,7 @@ func (LifeCycleState) Values() []LifeCycleState { "CUTOVER", "DISCONNECTED", "DISCOVERED", + "PENDING_INSTALLATION", } } diff --git a/service/mgn/types/types.go b/service/mgn/types/types.go index dc8031f0b54..754e932681e 100644 --- a/service/mgn/types/types.go +++ b/service/mgn/types/types.go @@ -235,6 +235,75 @@ type ErrorDetails struct { noSmithyDocumentSerde } +// Export errors data. +type ExportErrorData struct { + + // Export errors data raw error. + RawError *string + + noSmithyDocumentSerde +} + +// Export task. +type ExportTask struct { + + // Export task creation datetime. + CreationDateTime *string + + // Export task end datetime. + EndDateTime *string + + // Export task id. + ExportID *string + + // Export task progress percentage. + ProgressPercentage *float32 + + // Export task s3 bucket. + S3Bucket *string + + // Export task s3 bucket owner. + S3BucketOwner *string + + // Export task s3 key. + S3Key *string + + // Export task status. + Status ExportStatus + + // Export task summary. + Summary *ExportTaskSummary + + noSmithyDocumentSerde +} + +// Export task error. +type ExportTaskError struct { + + // Export task error data. + ErrorData *ExportErrorData + + // Export task error datetime. + ErrorDateTime *string + + noSmithyDocumentSerde +} + +// Export task summary. +type ExportTaskSummary struct { + + // Export task summary applications count. + ApplicationsCount int64 + + // Export task summary servers count. + ServersCount int64 + + // Export task summary waves count. + WavesCount int64 + + noSmithyDocumentSerde +} + // Identification hints. type IdentificationHints struct { @@ -256,6 +325,123 @@ type IdentificationHints struct { noSmithyDocumentSerde } +// Import error data. +type ImportErrorData struct { + + // Import error data application ID. + ApplicationID *string + + // Import error data ec2 LaunchTemplate ID. + Ec2LaunchTemplateID *string + + // Import error data raw error. + RawError *string + + // Import error data row number. + RowNumber int64 + + // Import error data source server ID. + SourceServerID *string + + // Import error data wave id. + WaveID *string + + noSmithyDocumentSerde +} + +// Import task. +type ImportTask struct { + + // Import task creation datetime. + CreationDateTime *string + + // Import task end datetime. + EndDateTime *string + + // Import task id. + ImportID *string + + // Import task progress percentage. + ProgressPercentage *float32 + + // Import task s3 bucket source. + S3BucketSource *S3BucketSource + + // Import task status. + Status ImportStatus + + // Import task summary. + Summary *ImportTaskSummary + + noSmithyDocumentSerde +} + +// Import task error. +type ImportTaskError struct { + + // Import task error data. + ErrorData *ImportErrorData + + // Import task error datetime. + ErrorDateTime *string + + // Import task error type. + ErrorType ImportErrorType + + noSmithyDocumentSerde +} + +// Import task summary. +type ImportTaskSummary struct { + + // Import task summary applications. + Applications *ImportTaskSummaryApplications + + // Import task summary servers. + Servers *ImportTaskSummaryServers + + // Import task summary waves. + Waves *ImportTaskSummaryWaves + + noSmithyDocumentSerde +} + +// Import task summary applications. +type ImportTaskSummaryApplications struct { + + // Import task summary applications created count. + CreatedCount int64 + + // Import task summary applications modified count. + ModifiedCount int64 + + noSmithyDocumentSerde +} + +// Import task summary servers. +type ImportTaskSummaryServers struct { + + // Import task summary servers created count. + CreatedCount int64 + + // Import task summary servers modified count. + ModifiedCount int64 + + noSmithyDocumentSerde +} + +// Import task summery waves. +type ImportTaskSummaryWaves struct { + + // Import task summery waves created count. + CreatedCount int64 + + // Import task summery waves modified count. + ModifiedCount int64 + + noSmithyDocumentSerde +} + // Job. type Job struct { @@ -575,6 +761,24 @@ type ListApplicationsRequestFilters struct { noSmithyDocumentSerde } +// List exports request filters. +type ListExportsRequestFilters struct { + + // List exports request filters export ids. + ExportIDs []string + + noSmithyDocumentSerde +} + +// List imports request filters. +type ListImportsRequestFilters struct { + + // List imports request filters import IDs. + ImportIDs []string + + noSmithyDocumentSerde +} + // Waves list filters. type ListWavesRequestFilters struct { @@ -739,6 +943,25 @@ type ReplicationConfigurationTemplate struct { noSmithyDocumentSerde } +// S3 bucket source. +type S3BucketSource struct { + + // S3 bucket source s3 bucket. + // + // This member is required. + S3Bucket *string + + // S3 bucket source s3 key. + // + // This member is required. + S3Key *string + + // S3 bucket source s3 bucket owner. + S3BucketOwner *string + + noSmithyDocumentSerde +} + // Source server properties. type SourceProperties struct { @@ -780,6 +1003,9 @@ type SourceServer struct { // Source server data replication info. DataReplicationInfo *DataReplicationInfo + // Source server fqdn for action framework. + FqdnForActionFramework *string + // Source server archived status. IsArchived *bool @@ -801,6 +1027,9 @@ type SourceServer struct { // Source server Tags. Tags map[string]string + // Source server user provided ID. + UserProvidedID *string + // Source server vCenter client id. VcenterClientID *string @@ -818,12 +1047,21 @@ type SourceServerActionDocument struct { // Source server post migration custom action active status. Active *bool + // Source server post migration custom action category. + Category ActionCategory + + // Source server post migration custom action description. + Description *string + // Source server post migration custom action document identifier. DocumentIdentifier *string // Source server post migration custom action document version. DocumentVersion *string + // Source server post migration custom action external parameters. + ExternalParameters map[string]SsmExternalParameter + // Source server post migration custom action must succeed for cutover. MustSucceedForCutover *bool @@ -861,6 +1099,9 @@ type SsmDocument struct { // This member is required. SsmDocumentName *string + // AWS Systems Manager Document external parameters. + ExternalParameters map[string]SsmExternalParameter + // If true, Cutover will not be enabled if the document has failed. MustSucceedForCutover *bool @@ -873,6 +1114,24 @@ type SsmDocument struct { noSmithyDocumentSerde } +// AWS Systems Manager Document external parameter. +// +// The following types satisfy this interface: +// +// SsmExternalParameterMemberDynamicPath +type SsmExternalParameter interface { + isSsmExternalParameter() +} + +// AWS Systems Manager Document external parameters dynamic path. +type SsmExternalParameterMemberDynamicPath struct { + Value string + + noSmithyDocumentSerde +} + +func (*SsmExternalParameterMemberDynamicPath) isSsmExternalParameter() {} + // AWS Systems Manager Parameter Store parameter. type SsmParameterStoreParameter struct { @@ -900,12 +1159,21 @@ type TemplateActionDocument struct { // Template post migration custom action active status. Active *bool + // Template post migration custom action category. + Category ActionCategory + + // Template post migration custom action description. + Description *string + // Template post migration custom action document identifier. DocumentIdentifier *string // Template post migration custom action document version. DocumentVersion *string + // Template post migration custom action external parameters. + ExternalParameters map[string]SsmExternalParameter + // Template post migration custom action must succeed for cutover. MustSucceedForCutover *bool @@ -1029,3 +1297,14 @@ type WaveAggregatedStatus struct { } type noSmithyDocumentSerde = smithydocument.NoSerde + +// UnknownUnionMember is returned when a union member is returned over the wire, +// but has an unknown tag. +type UnknownUnionMember struct { + Tag string + Value []byte + + noSmithyDocumentSerde +} + +func (*UnknownUnionMember) isSsmExternalParameter() {} diff --git a/service/mgn/types/types_exported_test.go b/service/mgn/types/types_exported_test.go new file mode 100644 index 00000000000..8d9a2decb8c --- /dev/null +++ b/service/mgn/types/types_exported_test.go @@ -0,0 +1,26 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package types_test + +import ( + "fmt" + "github.com/aws/aws-sdk-go-v2/service/mgn/types" +) + +func ExampleSsmExternalParameter_outputUsage() { + var union types.SsmExternalParameter + // type switches can be used to check the union value + switch v := union.(type) { + case *types.SsmExternalParameterMemberDynamicPath: + _ = v.Value // Value is string + + case *types.UnknownUnionMember: + fmt.Println("unknown tag:", v.Tag) + + default: + fmt.Println("union is nil or unknown type") + + } +} + +var _ *string diff --git a/service/mgn/validators.go b/service/mgn/validators.go index dcd49b344da..38226c87eb2 100644 --- a/service/mgn/validators.go +++ b/service/mgn/validators.go @@ -470,6 +470,46 @@ func (m *validateOpGetReplicationConfiguration) HandleInitialize(ctx context.Con return next.HandleInitialize(ctx, in) } +type validateOpListExportErrors struct { +} + +func (*validateOpListExportErrors) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListExportErrors) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListExportErrorsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListExportErrorsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpListImportErrors struct { +} + +func (*validateOpListImportErrors) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListImportErrors) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListImportErrorsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListImportErrorsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpListSourceServerActions struct { } @@ -670,6 +710,46 @@ func (m *validateOpStartCutover) HandleInitialize(ctx context.Context, in middle return next.HandleInitialize(ctx, in) } +type validateOpStartExport struct { +} + +func (*validateOpStartExport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartExport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartExportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartExportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpStartImport struct { +} + +func (*validateOpStartImport) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartImport) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartImportInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartImportInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpStartReplication struct { } @@ -1042,6 +1122,14 @@ func addOpGetReplicationConfigurationValidationMiddleware(stack *middleware.Stac return stack.Initialize.Add(&validateOpGetReplicationConfiguration{}, middleware.After) } +func addOpListExportErrorsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListExportErrors{}, middleware.After) +} + +func addOpListImportErrorsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListImportErrors{}, middleware.After) +} + func addOpListSourceServerActionsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpListSourceServerActions{}, middleware.After) } @@ -1082,6 +1170,14 @@ func addOpStartCutoverValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartCutover{}, middleware.After) } +func addOpStartExportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartExport{}, middleware.After) +} + +func addOpStartImportValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartImport{}, middleware.After) +} + func addOpStartReplicationValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpStartReplication{}, middleware.After) } @@ -1170,6 +1266,24 @@ func validatePostLaunchActions(v *types.PostLaunchActions) error { } } +func validateS3BucketSource(v *types.S3BucketSource) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "S3BucketSource"} + if v.S3Bucket == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Bucket")) + } + if v.S3Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Key")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateSsmDocument(v *types.SsmDocument) error { if v == nil { return nil @@ -1655,6 +1769,36 @@ func validateOpGetReplicationConfigurationInput(v *GetReplicationConfigurationIn } } +func validateOpListExportErrorsInput(v *ListExportErrorsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListExportErrorsInput"} + if v.ExportID == nil { + invalidParams.Add(smithy.NewErrParamRequired("ExportID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpListImportErrorsInput(v *ListImportErrorsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListImportErrorsInput"} + if v.ImportID == nil { + invalidParams.Add(smithy.NewErrParamRequired("ImportID")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpListSourceServerActionsInput(v *ListSourceServerActionsInput) error { if v == nil { return nil @@ -1839,6 +1983,43 @@ func validateOpStartCutoverInput(v *StartCutoverInput) error { } } +func validateOpStartExportInput(v *StartExportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartExportInput"} + if v.S3Bucket == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Bucket")) + } + if v.S3Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3Key")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpStartImportInput(v *StartImportInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartImportInput"} + if v.S3BucketSource == nil { + invalidParams.Add(smithy.NewErrParamRequired("S3BucketSource")) + } else if v.S3BucketSource != nil { + if err := validateS3BucketSource(v.S3BucketSource); err != nil { + invalidParams.AddNested("S3BucketSource", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpStartReplicationInput(v *StartReplicationInput) error { if v == nil { return nil diff --git a/service/oam/internal/endpoints/endpoints.go b/service/oam/internal/endpoints/endpoints.go index e61580c4f9c..af62a4b5d3b 100644 --- a/service/oam/internal/endpoints/endpoints.go +++ b/service/oam/internal/endpoints/endpoints.go @@ -252,6 +252,14 @@ var defaultPartitions = endpoints.Partitions{ }, RegionRegex: partitionRegexp.AwsCn, IsRegionalized: true, + Endpoints: endpoints.Endpoints{ + endpoints.EndpointKey{ + Region: "cn-north-1", + }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "cn-northwest-1", + }: endpoints.Endpoint{}, + }, }, { ID: "aws-iso", diff --git a/service/ssmsap/internal/endpoints/endpoints.go b/service/ssmsap/internal/endpoints/endpoints.go index 7740c942daa..f55baf0798b 100644 --- a/service/ssmsap/internal/endpoints/endpoints.go +++ b/service/ssmsap/internal/endpoints/endpoints.go @@ -165,6 +165,12 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "ca-central-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "ca-central-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-sap-fips.ca-central-1.amazonaws.com", + }, endpoints.EndpointKey{ Region: "eu-central-1", }: endpoints.Endpoint{}, @@ -183,6 +189,51 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "eu-west-3", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "fips-ca-central-1", + }: endpoints.Endpoint{ + Hostname: "ssm-sap-fips.ca-central-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "ca-central-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-1", + }: endpoints.Endpoint{ + Hostname: "ssm-sap-fips.us-east-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-east-2", + }: endpoints.Endpoint{ + Hostname: "ssm-sap-fips.us-east-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-east-2", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-1", + }: endpoints.Endpoint{ + Hostname: "ssm-sap-fips.us-west-1.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-1", + }, + Deprecated: aws.TrueTernary, + }, + endpoints.EndpointKey{ + Region: "fips-us-west-2", + }: endpoints.Endpoint{ + Hostname: "ssm-sap-fips.us-west-2.amazonaws.com", + CredentialScope: endpoints.CredentialScope{ + Region: "us-west-2", + }, + Deprecated: aws.TrueTernary, + }, endpoints.EndpointKey{ Region: "me-south-1", }: endpoints.Endpoint{}, @@ -192,15 +243,39 @@ var defaultPartitions = endpoints.Partitions{ endpoints.EndpointKey{ Region: "us-east-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-sap-fips.us-east-1.amazonaws.com", + }, endpoints.EndpointKey{ Region: "us-east-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-east-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-sap-fips.us-east-2.amazonaws.com", + }, endpoints.EndpointKey{ Region: "us-west-1", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-1", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-sap-fips.us-west-1.amazonaws.com", + }, endpoints.EndpointKey{ Region: "us-west-2", }: endpoints.Endpoint{}, + endpoints.EndpointKey{ + Region: "us-west-2", + Variant: endpoints.FIPSVariant, + }: { + Hostname: "ssm-sap-fips.us-west-2.amazonaws.com", + }, }, }, {