From 001b1fdb33bd5c41ac2e0c3108107096f46f58a5 Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Fri, 2 Aug 2024 18:27:46 +0000 Subject: [PATCH] Regenerated Clients --- .../132f3b7333f44eb78e5eedb1eb669a3b.json | 8 + .../14003caac55343aa97e44e6faa89d5e7.json | 8 + .../14cc841131774592a0cf4e48af1a3aff.json | 8 + .../3da5ecf2ccd744f58a6f2b8ad00dee8f.json | 8 + .../5ab39ebc935947fb967f08be332124cd.json | 8 + .../6fb182ce4c4c40588f159ee36d9ffb17.json | 8 + .../bb968be1c1a34761837458a7abcda01a.json | 8 + .../c4603721e21c4c6693d623708b430543.json | 8 + .../c77a9a6d439c4c1aba07af3be7ce5ad0.json | 8 + .../e8e4262041e54e0b971d8c0334707264.json | 8 + .../f82d55927de14d11a90ec46a1fe3ca41.json | 8 + .../attributevalue/go_module_metadata.go | 2 +- ...p_AcceptResourceGroupingRecommendations.go | 167 + ...i_op_AddDraftAppVersionResourceMappings.go | 2 +- .../api_op_DescribeAppVersionResource.go | 2 +- ...cribeResourceGroupingRecommendationTask.go | 161 + ...pi_op_ListAppAssessmentComplianceDrifts.go | 10 +- service/resiliencehub/api_op_ListApps.go | 4 +- ..._op_ListResourceGroupingRecommendations.go | 252 + ...p_RejectResourceGroupingRecommendations.go | 166 + ...StartResourceGroupingRecommendationTask.go | 168 + service/resiliencehub/deserializers.go | 4674 +++++++++++------ service/resiliencehub/generated.json | 5 + service/resiliencehub/serializers.go | 442 ++ ...eptResourceGroupingRecommendations.go.snap | 36 + ...ResourceGroupingRecommendationTask.go.snap | 36 + ...istResourceGroupingRecommendations.go.snap | 35 + ...ectResourceGroupingRecommendations.go.snap | 36 + ...ResourceGroupingRecommendationTask.go.snap | 36 + service/resiliencehub/snapshot_test.go | 120 + service/resiliencehub/types/enums.go | 100 + service/resiliencehub/types/types.go | 207 +- service/resiliencehub/validators.go | 234 + 33 files changed, 5364 insertions(+), 1619 deletions(-) create mode 100644 .changelog/132f3b7333f44eb78e5eedb1eb669a3b.json create mode 100644 .changelog/14003caac55343aa97e44e6faa89d5e7.json create mode 100644 .changelog/14cc841131774592a0cf4e48af1a3aff.json create mode 100644 .changelog/3da5ecf2ccd744f58a6f2b8ad00dee8f.json create mode 100644 .changelog/5ab39ebc935947fb967f08be332124cd.json create mode 100644 .changelog/6fb182ce4c4c40588f159ee36d9ffb17.json create mode 100644 .changelog/bb968be1c1a34761837458a7abcda01a.json create mode 100644 .changelog/c4603721e21c4c6693d623708b430543.json create mode 100644 .changelog/c77a9a6d439c4c1aba07af3be7ce5ad0.json create mode 100644 .changelog/e8e4262041e54e0b971d8c0334707264.json create mode 100644 .changelog/f82d55927de14d11a90ec46a1fe3ca41.json create mode 100644 service/resiliencehub/api_op_AcceptResourceGroupingRecommendations.go create mode 100644 service/resiliencehub/api_op_DescribeResourceGroupingRecommendationTask.go create mode 100644 service/resiliencehub/api_op_ListResourceGroupingRecommendations.go create mode 100644 service/resiliencehub/api_op_RejectResourceGroupingRecommendations.go create mode 100644 service/resiliencehub/api_op_StartResourceGroupingRecommendationTask.go create mode 100644 service/resiliencehub/snapshot/api_op_AcceptResourceGroupingRecommendations.go.snap create mode 100644 service/resiliencehub/snapshot/api_op_DescribeResourceGroupingRecommendationTask.go.snap create mode 100644 service/resiliencehub/snapshot/api_op_ListResourceGroupingRecommendations.go.snap create mode 100644 service/resiliencehub/snapshot/api_op_RejectResourceGroupingRecommendations.go.snap create mode 100644 service/resiliencehub/snapshot/api_op_StartResourceGroupingRecommendationTask.go.snap diff --git a/.changelog/132f3b7333f44eb78e5eedb1eb669a3b.json b/.changelog/132f3b7333f44eb78e5eedb1eb669a3b.json new file mode 100644 index 00000000000..531e3e146fa --- /dev/null +++ b/.changelog/132f3b7333f44eb78e5eedb1eb669a3b.json @@ -0,0 +1,8 @@ +{ + "id": "132f3b73-33f4-4eb7-8e5e-edb1eb669a3b", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/kinesis" + ] +} \ No newline at end of file diff --git a/.changelog/14003caac55343aa97e44e6faa89d5e7.json b/.changelog/14003caac55343aa97e44e6faa89d5e7.json new file mode 100644 index 00000000000..44f83fcd6d2 --- /dev/null +++ b/.changelog/14003caac55343aa97e44e6faa89d5e7.json @@ -0,0 +1,8 @@ +{ + "id": "14003caa-c553-43aa-97e4-4e6faa89d5e7", + "type": "feature", + "description": "updates cloudtrail event source for SDKs", + "modules": [ + "service/ivsrealtime" + ] +} \ No newline at end of file diff --git a/.changelog/14cc841131774592a0cf4e48af1a3aff.json b/.changelog/14cc841131774592a0cf4e48af1a3aff.json new file mode 100644 index 00000000000..e257955e963 --- /dev/null +++ b/.changelog/14cc841131774592a0cf4e48af1a3aff.json @@ -0,0 +1,8 @@ +{ + "id": "14cc8411-3177-4592-a0cf-4e48af1a3aff", + "type": "feature", + "description": "updates cloudtrail event source for SDKs", + "modules": [ + "service/ivs" + ] +} \ No newline at end of file diff --git a/.changelog/3da5ecf2ccd744f58a6f2b8ad00dee8f.json b/.changelog/3da5ecf2ccd744f58a6f2b8ad00dee8f.json new file mode 100644 index 00000000000..c80b0d452f3 --- /dev/null +++ b/.changelog/3da5ecf2ccd744f58a6f2b8ad00dee8f.json @@ -0,0 +1,8 @@ +{ + "id": "3da5ecf2-ccd7-44f5-8a6f-2b8ad00dee8f", + "type": "feature", + "description": "Customers are presented with the grouping recommendations and can determine if the recommendations are accurate and apply to their case. This feature simplifies onboarding by organizing resources into appropriate AppComponents.", + "modules": [ + "service/resiliencehub" + ] +} \ No newline at end of file diff --git a/.changelog/5ab39ebc935947fb967f08be332124cd.json b/.changelog/5ab39ebc935947fb967f08be332124cd.json new file mode 100644 index 00000000000..bd1c666075c --- /dev/null +++ b/.changelog/5ab39ebc935947fb967f08be332124cd.json @@ -0,0 +1,8 @@ +{ + "id": "5ab39ebc-9359-47fb-967f-08be332124cd", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/cloudwatch" + ] +} \ No newline at end of file diff --git a/.changelog/6fb182ce4c4c40588f159ee36d9ffb17.json b/.changelog/6fb182ce4c4c40588f159ee36d9ffb17.json new file mode 100644 index 00000000000..1326fbebf9a --- /dev/null +++ b/.changelog/6fb182ce4c4c40588f159ee36d9ffb17.json @@ -0,0 +1,8 @@ +{ + "id": "6fb182ce-4c4c-4058-8f15-9ee36d9ffb17", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/glue" + ] +} \ No newline at end of file diff --git a/.changelog/bb968be1c1a34761837458a7abcda01a.json b/.changelog/bb968be1c1a34761837458a7abcda01a.json new file mode 100644 index 00000000000..8e02cc6bd37 --- /dev/null +++ b/.changelog/bb968be1c1a34761837458a7abcda01a.json @@ -0,0 +1,8 @@ +{ + "id": "bb968be1-c1a3-4761-8374-58a7abcda01a", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/ecs" + ] +} \ No newline at end of file diff --git a/.changelog/c4603721e21c4c6693d623708b430543.json b/.changelog/c4603721e21c4c6693d623708b430543.json new file mode 100644 index 00000000000..30346e1bce5 --- /dev/null +++ b/.changelog/c4603721e21c4c6693d623708b430543.json @@ -0,0 +1,8 @@ +{ + "id": "c4603721-e21c-4c66-93d6-23708b430543", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/ssm" + ] +} \ No newline at end of file diff --git a/.changelog/c77a9a6d439c4c1aba07af3be7ce5ad0.json b/.changelog/c77a9a6d439c4c1aba07af3be7ce5ad0.json new file mode 100644 index 00000000000..a5ba7e056be --- /dev/null +++ b/.changelog/c77a9a6d439c4c1aba07af3be7ce5ad0.json @@ -0,0 +1,8 @@ +{ + "id": "c77a9a6d-439c-4c1a-ba07-af3be7ce5ad0", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/wafregional" + ] +} \ No newline at end of file diff --git a/.changelog/e8e4262041e54e0b971d8c0334707264.json b/.changelog/e8e4262041e54e0b971d8c0334707264.json new file mode 100644 index 00000000000..a7f161957a9 --- /dev/null +++ b/.changelog/e8e4262041e54e0b971d8c0334707264.json @@ -0,0 +1,8 @@ +{ + "id": "e8e42620-41e5-4e0b-971d-8c0334707264", + "type": "feature", + "description": "updates cloudtrail event source for SDKs", + "modules": [ + "service/ivschat" + ] +} \ No newline at end of file diff --git a/.changelog/f82d55927de14d11a90ec46a1fe3ca41.json b/.changelog/f82d55927de14d11a90ec46a1fe3ca41.json new file mode 100644 index 00000000000..0637d1f1fd5 --- /dev/null +++ b/.changelog/f82d55927de14d11a90ec46a1fe3ca41.json @@ -0,0 +1,8 @@ +{ + "id": "f82d5592-7de1-4d11-a90e-c46a1fe3ca41", + "type": "feature", + "description": "Add v2 smoke tests and smithy smokeTests trait for SDK testing.", + "modules": [ + "service/route53" + ] +} \ No newline at end of file diff --git a/feature/dynamodbstreams/attributevalue/go_module_metadata.go b/feature/dynamodbstreams/attributevalue/go_module_metadata.go index 1ef2868d018..505e79ec5c4 100644 --- a/feature/dynamodbstreams/attributevalue/go_module_metadata.go +++ b/feature/dynamodbstreams/attributevalue/go_module_metadata.go @@ -3,4 +3,4 @@ package attributevalue // goModuleVersion is the tagged release for this module -const goModuleVersion = "1.13.55" +const goModuleVersion = "1.14.10" diff --git a/service/resiliencehub/api_op_AcceptResourceGroupingRecommendations.go b/service/resiliencehub/api_op_AcceptResourceGroupingRecommendations.go new file mode 100644 index 00000000000..5ec4aa54407 --- /dev/null +++ b/service/resiliencehub/api_op_AcceptResourceGroupingRecommendations.go @@ -0,0 +1,167 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package resiliencehub + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/resiliencehub/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Accepts the resource grouping recommendations suggested by Resilience Hub for +// your application. +func (c *Client) AcceptResourceGroupingRecommendations(ctx context.Context, params *AcceptResourceGroupingRecommendationsInput, optFns ...func(*Options)) (*AcceptResourceGroupingRecommendationsOutput, error) { + if params == nil { + params = &AcceptResourceGroupingRecommendationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "AcceptResourceGroupingRecommendations", params, optFns, c.addOperationAcceptResourceGroupingRecommendationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*AcceptResourceGroupingRecommendationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type AcceptResourceGroupingRecommendationsInput struct { + + // Amazon Resource Name (ARN) of the Resilience Hub application. The format for + // this ARN is: arn: partition :resiliencehub: region : account :app/ app-id . For + // more information about ARNs, see [Amazon Resource Names (ARNs)]in the Amazon Web Services General Reference + // guide. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // + // This member is required. + AppArn *string + + // Indicates the list of resource grouping recommendations you want to include in + // your application. + // + // This member is required. + Entries []types.AcceptGroupingRecommendationEntry + + noSmithyDocumentSerde +} + +type AcceptResourceGroupingRecommendationsOutput struct { + + // Amazon Resource Name (ARN) of the Resilience Hub application. The format for + // this ARN is: arn: partition :resiliencehub: region : account :app/ app-id . For + // more information about ARNs, see [Amazon Resource Names (ARNs)]in the Amazon Web Services General Reference + // guide. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // + // This member is required. + AppArn *string + + // Indicates the list of resource grouping recommendations that could not be + // included in your application. + // + // This member is required. + FailedEntries []types.FailedGroupingRecommendationEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationAcceptResourceGroupingRecommendationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpAcceptResourceGroupingRecommendations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpAcceptResourceGroupingRecommendations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "AcceptResourceGroupingRecommendations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpAcceptResourceGroupingRecommendationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAcceptResourceGroupingRecommendations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opAcceptResourceGroupingRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "AcceptResourceGroupingRecommendations", + } +} diff --git a/service/resiliencehub/api_op_AddDraftAppVersionResourceMappings.go b/service/resiliencehub/api_op_AddDraftAppVersionResourceMappings.go index fd37a2bd662..181cfdd6d50 100644 --- a/service/resiliencehub/api_op_AddDraftAppVersionResourceMappings.go +++ b/service/resiliencehub/api_op_AddDraftAppVersionResourceMappings.go @@ -14,7 +14,7 @@ import ( // Adds the source of resource-maps to the draft version of an application. During // assessment, Resilience Hub will use these resource-maps to resolve the latest // physical ID for each resource in the application template. For more information -// about different types of resources suported by Resilience Hub and how to add +// about different types of resources supported by Resilience Hub and how to add // them in your application, see [Step 2: How is your application managed?]in the Resilience Hub User Guide. // // [Step 2: How is your application managed?]: https://docs.aws.amazon.com/resilience-hub/latest/userguide/how-app-manage.html diff --git a/service/resiliencehub/api_op_DescribeAppVersionResource.go b/service/resiliencehub/api_op_DescribeAppVersionResource.go index e8d0d4c8d0d..1aea4503c32 100644 --- a/service/resiliencehub/api_op_DescribeAppVersionResource.go +++ b/service/resiliencehub/api_op_DescribeAppVersionResource.go @@ -13,7 +13,7 @@ import ( // Describes a resource of the Resilience Hub application. // -// This API accepts only one of the following parameters to descibe the resource: +// This API accepts only one of the following parameters to describe the resource: // // - resourceName // diff --git a/service/resiliencehub/api_op_DescribeResourceGroupingRecommendationTask.go b/service/resiliencehub/api_op_DescribeResourceGroupingRecommendationTask.go new file mode 100644 index 00000000000..e6735669b66 --- /dev/null +++ b/service/resiliencehub/api_op_DescribeResourceGroupingRecommendationTask.go @@ -0,0 +1,161 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package resiliencehub + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/resiliencehub/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Describes the resource grouping recommendation tasks run by Resilience Hub for +// your application. +func (c *Client) DescribeResourceGroupingRecommendationTask(ctx context.Context, params *DescribeResourceGroupingRecommendationTaskInput, optFns ...func(*Options)) (*DescribeResourceGroupingRecommendationTaskOutput, error) { + if params == nil { + params = &DescribeResourceGroupingRecommendationTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DescribeResourceGroupingRecommendationTask", params, optFns, c.addOperationDescribeResourceGroupingRecommendationTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DescribeResourceGroupingRecommendationTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DescribeResourceGroupingRecommendationTaskInput struct { + + // Amazon Resource Name (ARN) of the Resilience Hub application. The format for + // this ARN is: arn: partition :resiliencehub: region : account :app/ app-id . For + // more information about ARNs, see [Amazon Resource Names (ARNs)]in the Amazon Web Services General Reference + // guide. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // + // This member is required. + AppArn *string + + // Indicates the identifier of the grouping recommendation task. + GroupingId *string + + noSmithyDocumentSerde +} + +type DescribeResourceGroupingRecommendationTaskOutput struct { + + // Indicates the identifier of the grouping recommendation task. + // + // This member is required. + GroupingId *string + + // Status of the action. + // + // This member is required. + Status types.ResourcesGroupingRecGenStatusType + + // Indicates the error that occurred while generating a grouping recommendation. + ErrorMessage *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDescribeResourceGroupingRecommendationTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpDescribeResourceGroupingRecommendationTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDescribeResourceGroupingRecommendationTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeResourceGroupingRecommendationTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpDescribeResourceGroupingRecommendationTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeResourceGroupingRecommendationTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opDescribeResourceGroupingRecommendationTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DescribeResourceGroupingRecommendationTask", + } +} diff --git a/service/resiliencehub/api_op_ListAppAssessmentComplianceDrifts.go b/service/resiliencehub/api_op_ListAppAssessmentComplianceDrifts.go index 1136c19d6ce..198adcc1046 100644 --- a/service/resiliencehub/api_op_ListAppAssessmentComplianceDrifts.go +++ b/service/resiliencehub/api_op_ListAppAssessmentComplianceDrifts.go @@ -38,11 +38,10 @@ type ListAppAssessmentComplianceDriftsInput struct { // This member is required. AssessmentArn *string - // Indicates the maximum number of applications requested. + // Indicates the maximum number of compliance drifts requested. MaxResults *int32 - // Indicates the unique token number of the next application to be checked for - // compliance and regulatory requirements from the list of applications. + // Null, or the token from a previous call to get the next set of results. NextToken *string noSmithyDocumentSerde @@ -56,8 +55,7 @@ type ListAppAssessmentComplianceDriftsOutput struct { // This member is required. ComplianceDrifts []types.ComplianceDrift - // Token number of the next application to be checked for compliance and - // regulatory requirements from the list of applications. + // Null, or the token from a previous call to get the next set of results. NextToken *string // Metadata pertaining to the operation's result. @@ -154,7 +152,7 @@ func (c *Client) addOperationListAppAssessmentComplianceDriftsMiddlewares(stack // ListAppAssessmentComplianceDriftsPaginatorOptions is the paginator options for // ListAppAssessmentComplianceDrifts type ListAppAssessmentComplianceDriftsPaginatorOptions struct { - // Indicates the maximum number of applications requested. + // Indicates the maximum number of compliance drifts requested. Limit int32 // Set to true if pagination should stop if the service returns a pagination token diff --git a/service/resiliencehub/api_op_ListApps.go b/service/resiliencehub/api_op_ListApps.go index e0e2076c2fb..2940aec58dc 100644 --- a/service/resiliencehub/api_op_ListApps.go +++ b/service/resiliencehub/api_op_ListApps.go @@ -62,8 +62,8 @@ type ListAppsInput struct { // The application list is sorted based on the values of // lastAppComplianceEvaluationTime field. By default, application list is sorted in - // ascending order. To sort the appliation list in descending order, set this field - // to True . + // ascending order. To sort the application list in descending order, set this + // field to True . ReverseOrder *bool // Indicates the upper limit of the range that is used to filter the applications diff --git a/service/resiliencehub/api_op_ListResourceGroupingRecommendations.go b/service/resiliencehub/api_op_ListResourceGroupingRecommendations.go new file mode 100644 index 00000000000..c30130c35cb --- /dev/null +++ b/service/resiliencehub/api_op_ListResourceGroupingRecommendations.go @@ -0,0 +1,252 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package resiliencehub + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/resiliencehub/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists the resource grouping recommendations suggested by Resilience Hub for +// your application. +func (c *Client) ListResourceGroupingRecommendations(ctx context.Context, params *ListResourceGroupingRecommendationsInput, optFns ...func(*Options)) (*ListResourceGroupingRecommendationsOutput, error) { + if params == nil { + params = &ListResourceGroupingRecommendationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourceGroupingRecommendations", params, optFns, c.addOperationListResourceGroupingRecommendationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourceGroupingRecommendationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResourceGroupingRecommendationsInput struct { + + // Amazon Resource Name (ARN) of the Resilience Hub application. The format for + // this ARN is: arn: partition :resiliencehub: region : account :app/ app-id . For + // more information about ARNs, see [Amazon Resource Names (ARNs)]in the Amazon Web Services General Reference + // guide. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + AppArn *string + + // Maximum number of grouping recommendations to be displayed per Resilience Hub + // application. + MaxResults *int32 + + // Null, or the token from a previous call to get the next set of results. + NextToken *string + + noSmithyDocumentSerde +} + +type ListResourceGroupingRecommendationsOutput struct { + + // List of resource grouping recommendations generated by Resilience Hub. + // + // This member is required. + GroupingRecommendations []types.GroupingRecommendation + + // Null, or the token from a previous call to get the next set of results. + NextToken *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourceGroupingRecommendationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpListResourceGroupingRecommendations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListResourceGroupingRecommendations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "ListResourceGroupingRecommendations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceGroupingRecommendations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +// ListResourceGroupingRecommendationsPaginatorOptions is the paginator options +// for ListResourceGroupingRecommendations +type ListResourceGroupingRecommendationsPaginatorOptions struct { + // Maximum number of grouping recommendations to be displayed per Resilience Hub + // application. + 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 +} + +// ListResourceGroupingRecommendationsPaginator is a paginator for +// ListResourceGroupingRecommendations +type ListResourceGroupingRecommendationsPaginator struct { + options ListResourceGroupingRecommendationsPaginatorOptions + client ListResourceGroupingRecommendationsAPIClient + params *ListResourceGroupingRecommendationsInput + nextToken *string + firstPage bool +} + +// NewListResourceGroupingRecommendationsPaginator returns a new +// ListResourceGroupingRecommendationsPaginator +func NewListResourceGroupingRecommendationsPaginator(client ListResourceGroupingRecommendationsAPIClient, params *ListResourceGroupingRecommendationsInput, optFns ...func(*ListResourceGroupingRecommendationsPaginatorOptions)) *ListResourceGroupingRecommendationsPaginator { + if params == nil { + params = &ListResourceGroupingRecommendationsInput{} + } + + options := ListResourceGroupingRecommendationsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourceGroupingRecommendationsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourceGroupingRecommendationsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourceGroupingRecommendations page. +func (p *ListResourceGroupingRecommendationsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceGroupingRecommendationsOutput, error) { + if !p.HasMorePages() { + return nil, fmt.Errorf("no more pages available") + } + + params := *p.params + params.NextToken = p.nextToken + + var limit *int32 + if p.options.Limit > 0 { + limit = &p.options.Limit + } + params.MaxResults = limit + + optFns = append([]func(*Options){ + addIsPaginatorUserAgent, + }, optFns...) + result, err := p.client.ListResourceGroupingRecommendations(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 +} + +// ListResourceGroupingRecommendationsAPIClient is a client that implements the +// ListResourceGroupingRecommendations operation. +type ListResourceGroupingRecommendationsAPIClient interface { + ListResourceGroupingRecommendations(context.Context, *ListResourceGroupingRecommendationsInput, ...func(*Options)) (*ListResourceGroupingRecommendationsOutput, error) +} + +var _ ListResourceGroupingRecommendationsAPIClient = (*Client)(nil) + +func newServiceMetadataMiddleware_opListResourceGroupingRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "ListResourceGroupingRecommendations", + } +} diff --git a/service/resiliencehub/api_op_RejectResourceGroupingRecommendations.go b/service/resiliencehub/api_op_RejectResourceGroupingRecommendations.go new file mode 100644 index 00000000000..bbee9e29d8e --- /dev/null +++ b/service/resiliencehub/api_op_RejectResourceGroupingRecommendations.go @@ -0,0 +1,166 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package resiliencehub + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/resiliencehub/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Rejects resource grouping recommendations. +func (c *Client) RejectResourceGroupingRecommendations(ctx context.Context, params *RejectResourceGroupingRecommendationsInput, optFns ...func(*Options)) (*RejectResourceGroupingRecommendationsOutput, error) { + if params == nil { + params = &RejectResourceGroupingRecommendationsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "RejectResourceGroupingRecommendations", params, optFns, c.addOperationRejectResourceGroupingRecommendationsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*RejectResourceGroupingRecommendationsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type RejectResourceGroupingRecommendationsInput struct { + + // Amazon Resource Name (ARN) of the Resilience Hub application. The format for + // this ARN is: arn: partition :resiliencehub: region : account :app/ app-id . For + // more information about ARNs, see [Amazon Resource Names (ARNs)]in the Amazon Web Services General Reference + // guide. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // + // This member is required. + AppArn *string + + // Indicates the list of resource grouping recommendations you have selected to + // exclude from your application. + // + // This member is required. + Entries []types.RejectGroupingRecommendationEntry + + noSmithyDocumentSerde +} + +type RejectResourceGroupingRecommendationsOutput struct { + + // Amazon Resource Name (ARN) of the Resilience Hub application. The format for + // this ARN is: arn: partition :resiliencehub: region : account :app/ app-id . For + // more information about ARNs, see [Amazon Resource Names (ARNs)]in the Amazon Web Services General Reference + // guide. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // + // This member is required. + AppArn *string + + // Indicates the list of resource grouping recommendations that failed to get + // excluded in your application. + // + // This member is required. + FailedEntries []types.FailedGroupingRecommendationEntry + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationRejectResourceGroupingRecommendationsMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpRejectResourceGroupingRecommendations{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpRejectResourceGroupingRecommendations{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "RejectResourceGroupingRecommendations"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpRejectResourceGroupingRecommendationsValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opRejectResourceGroupingRecommendations(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opRejectResourceGroupingRecommendations(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "RejectResourceGroupingRecommendations", + } +} diff --git a/service/resiliencehub/api_op_StartResourceGroupingRecommendationTask.go b/service/resiliencehub/api_op_StartResourceGroupingRecommendationTask.go new file mode 100644 index 00000000000..522ad81127e --- /dev/null +++ b/service/resiliencehub/api_op_StartResourceGroupingRecommendationTask.go @@ -0,0 +1,168 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package resiliencehub + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/service/resiliencehub/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Starts grouping recommendation task. +func (c *Client) StartResourceGroupingRecommendationTask(ctx context.Context, params *StartResourceGroupingRecommendationTaskInput, optFns ...func(*Options)) (*StartResourceGroupingRecommendationTaskOutput, error) { + if params == nil { + params = &StartResourceGroupingRecommendationTaskInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "StartResourceGroupingRecommendationTask", params, optFns, c.addOperationStartResourceGroupingRecommendationTaskMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*StartResourceGroupingRecommendationTaskOutput) + out.ResultMetadata = metadata + return out, nil +} + +type StartResourceGroupingRecommendationTaskInput struct { + + // Amazon Resource Name (ARN) of the Resilience Hub application. The format for + // this ARN is: arn: partition :resiliencehub: region : account :app/ app-id . For + // more information about ARNs, see [Amazon Resource Names (ARNs)]in the Amazon Web Services General Reference + // guide. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // + // This member is required. + AppArn *string + + noSmithyDocumentSerde +} + +type StartResourceGroupingRecommendationTaskOutput struct { + + // Amazon Resource Name (ARN) of the Resilience Hub application. The format for + // this ARN is: arn: partition :resiliencehub: region : account :app/ app-id . For + // more information about ARNs, see [Amazon Resource Names (ARNs)]in the Amazon Web Services General Reference + // guide. + // + // [Amazon Resource Names (ARNs)]: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html + // + // This member is required. + AppArn *string + + // Indicates the identifier of the grouping recommendation task. + // + // This member is required. + GroupingId *string + + // Status of the action. + // + // This member is required. + Status types.ResourcesGroupingRecGenStatusType + + // Indicates the error that occurred while executing a grouping recommendation + // task. + ErrorMessage *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationStartResourceGroupingRecommendationTaskMiddlewares(stack *middleware.Stack, options Options) (err error) { + if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { + return err + } + err = stack.Serialize.Add(&awsRestjson1_serializeOpStartResourceGroupingRecommendationTask{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpStartResourceGroupingRecommendationTask{}, middleware.After) + if err != nil { + return err + } + if err := addProtocolFinalizerMiddlewares(stack, options, "StartResourceGroupingRecommendationTask"); err != nil { + return fmt.Errorf("add protocol finalizers: %v", err) + } + + if err = addlegacyEndpointContextSetter(stack, options); err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = addClientRequestID(stack); err != nil { + return err + } + if err = addComputeContentLength(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addComputePayloadSHA256(stack); err != nil { + return err + } + if err = addRetry(stack, options); err != nil { + return err + } + if err = addRawResponseToMetadata(stack); err != nil { + return err + } + if err = addRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, options); err != nil { + return err + } + if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { + return err + } + if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { + return err + } + if err = addTimeOffsetBuild(stack, c); err != nil { + return err + } + if err = addUserAgentRetryMode(stack, options); err != nil { + return err + } + if err = addOpStartResourceGroupingRecommendationTaskValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opStartResourceGroupingRecommendationTask(options.Region), middleware.Before); err != nil { + return err + } + if err = addRecursionDetection(stack); err != nil { + return err + } + if err = addRequestIDRetrieverMiddleware(stack); err != nil { + return err + } + if err = addResponseErrorMiddleware(stack); err != nil { + return err + } + if err = addRequestResponseLogging(stack, options); err != nil { + return err + } + if err = addDisableHTTPSMiddleware(stack, options); err != nil { + return err + } + return nil +} + +func newServiceMetadataMiddleware_opStartResourceGroupingRecommendationTask(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "StartResourceGroupingRecommendationTask", + } +} diff --git a/service/resiliencehub/deserializers.go b/service/resiliencehub/deserializers.go index 46f5e082e22..013f46aca6a 100644 --- a/service/resiliencehub/deserializers.go +++ b/service/resiliencehub/deserializers.go @@ -29,6 +29,174 @@ func deserializeS3Expires(v string) (*time.Time, error) { return &t, nil } +type awsRestjson1_deserializeOpAcceptResourceGroupingRecommendations struct { +} + +func (*awsRestjson1_deserializeOpAcceptResourceGroupingRecommendations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpAcceptResourceGroupingRecommendations) HandleDeserialize(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_deserializeOpErrorAcceptResourceGroupingRecommendations(response, &metadata) + } + output := &AcceptResourceGroupingRecommendationsOutput{} + 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_deserializeOpDocumentAcceptResourceGroupingRecommendationsOutput(&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_deserializeOpErrorAcceptResourceGroupingRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 + + } +} + +func awsRestjson1_deserializeOpDocumentAcceptResourceGroupingRecommendationsOutput(v **AcceptResourceGroupingRecommendationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *AcceptResourceGroupingRecommendationsOutput + if *v == nil { + sv = &AcceptResourceGroupingRecommendationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AppArn = ptr.String(jtv) + } + + case "failedEntries": + if err := awsRestjson1_deserializeDocumentFailedGroupingRecommendationEntries(&sv.FailedEntries, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpAddDraftAppVersionResourceMappings struct { } @@ -139,6 +307,9 @@ func awsRestjson1_deserializeOpErrorAddDraftAppVersionResourceMappings(response case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4047,14 +4218,14 @@ func awsRestjson1_deserializeOpDocumentDescribeResiliencyPolicyOutput(v **Descri return nil } -type awsRestjson1_deserializeOpImportResourcesToDraftAppVersion struct { +type awsRestjson1_deserializeOpDescribeResourceGroupingRecommendationTask struct { } -func (*awsRestjson1_deserializeOpImportResourcesToDraftAppVersion) ID() string { +func (*awsRestjson1_deserializeOpDescribeResourceGroupingRecommendationTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpImportResourcesToDraftAppVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDescribeResourceGroupingRecommendationTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4068,9 +4239,9 @@ func (m *awsRestjson1_deserializeOpImportResourcesToDraftAppVersion) HandleDeser } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorImportResourcesToDraftAppVersion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDescribeResourceGroupingRecommendationTask(response, &metadata) } - output := &ImportResourcesToDraftAppVersionOutput{} + output := &DescribeResourceGroupingRecommendationTaskOutput{} out.Result = output var buff [1024]byte @@ -4091,7 +4262,7 @@ func (m *awsRestjson1_deserializeOpImportResourcesToDraftAppVersion) HandleDeser return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentImportResourcesToDraftAppVersionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentDescribeResourceGroupingRecommendationTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4104,7 +4275,7 @@ func (m *awsRestjson1_deserializeOpImportResourcesToDraftAppVersion) HandleDeser return out, metadata, err } -func awsRestjson1_deserializeOpErrorImportResourcesToDraftAppVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorDescribeResourceGroupingRecommendationTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4148,18 +4319,12 @@ func awsRestjson1_deserializeOpErrorImportResourcesToDraftAppVersion(response *s case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(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("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4176,7 +4341,7 @@ func awsRestjson1_deserializeOpErrorImportResourcesToDraftAppVersion(response *s } } -func awsRestjson1_deserializeOpDocumentImportResourcesToDraftAppVersionOutput(v **ImportResourcesToDraftAppVersionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentDescribeResourceGroupingRecommendationTaskOutput(v **DescribeResourceGroupingRecommendationTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4189,55 +4354,40 @@ func awsRestjson1_deserializeOpDocumentImportResourcesToDraftAppVersionOutput(v return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ImportResourcesToDraftAppVersionOutput + var sv *DescribeResourceGroupingRecommendationTaskOutput if *v == nil { - sv = &ImportResourcesToDraftAppVersionOutput{} + sv = &DescribeResourceGroupingRecommendationTaskOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "appArn": + case "errorMessage": 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 String500 to be of type string, got %T instead", value) } - sv.AppArn = ptr.String(jtv) + sv.ErrorMessage = ptr.String(jtv) } - case "appVersion": + case "groupingId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.AppVersion = ptr.String(jtv) - } - - case "eksSources": - if err := awsRestjson1_deserializeDocumentEksSourceList(&sv.EksSources, value); err != nil { - return err - } - - case "sourceArns": - if err := awsRestjson1_deserializeDocumentArnList(&sv.SourceArns, value); err != nil { - return err + sv.GroupingId = ptr.String(jtv) } case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceImportStatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourcesGroupingRecGenStatusType to be of type string, got %T instead", value) } - sv.Status = types.ResourceImportStatusType(jtv) - } - - case "terraformSources": - if err := awsRestjson1_deserializeDocumentTerraformSourceList(&sv.TerraformSources, value); err != nil { - return err + sv.Status = types.ResourcesGroupingRecGenStatusType(jtv) } default: @@ -4249,14 +4399,14 @@ func awsRestjson1_deserializeOpDocumentImportResourcesToDraftAppVersionOutput(v return nil } -type awsRestjson1_deserializeOpListAlarmRecommendations struct { +type awsRestjson1_deserializeOpImportResourcesToDraftAppVersion struct { } -func (*awsRestjson1_deserializeOpListAlarmRecommendations) ID() string { +func (*awsRestjson1_deserializeOpImportResourcesToDraftAppVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAlarmRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpImportResourcesToDraftAppVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4270,9 +4420,9 @@ func (m *awsRestjson1_deserializeOpListAlarmRecommendations) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAlarmRecommendations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorImportResourcesToDraftAppVersion(response, &metadata) } - output := &ListAlarmRecommendationsOutput{} + output := &ImportResourcesToDraftAppVersionOutput{} out.Result = output var buff [1024]byte @@ -4293,7 +4443,7 @@ func (m *awsRestjson1_deserializeOpListAlarmRecommendations) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAlarmRecommendationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentImportResourcesToDraftAppVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4306,7 +4456,7 @@ func (m *awsRestjson1_deserializeOpListAlarmRecommendations) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAlarmRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorImportResourcesToDraftAppVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4350,12 +4500,18 @@ func awsRestjson1_deserializeOpErrorListAlarmRecommendations(response *smithyhtt case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(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("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -4372,7 +4528,7 @@ func awsRestjson1_deserializeOpErrorListAlarmRecommendations(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentListAlarmRecommendationsOutput(v **ListAlarmRecommendationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentImportResourcesToDraftAppVersionOutput(v **ImportResourcesToDraftAppVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4385,37 +4541,233 @@ func awsRestjson1_deserializeOpDocumentListAlarmRecommendationsOutput(v **ListAl return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAlarmRecommendationsOutput + var sv *ImportResourcesToDraftAppVersionOutput if *v == nil { - sv = &ListAlarmRecommendationsOutput{} + sv = &ImportResourcesToDraftAppVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "alarmRecommendations": - if err := awsRestjson1_deserializeDocumentAlarmRecommendationList(&sv.AlarmRecommendations, value); err != nil { - return err + case "appArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AppArn = ptr.String(jtv) } - case "nextToken": + case "appVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.AppVersion = ptr.String(jtv) } - default: - _, _ = key, value + case "eksSources": + if err := awsRestjson1_deserializeDocumentEksSourceList(&sv.EksSources, value); err != nil { + return err + } - } - } - *v = sv - return nil -} + case "sourceArns": + if err := awsRestjson1_deserializeDocumentArnList(&sv.SourceArns, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceImportStatusType to be of type string, got %T instead", value) + } + sv.Status = types.ResourceImportStatusType(jtv) + } + + case "terraformSources": + if err := awsRestjson1_deserializeDocumentTerraformSourceList(&sv.TerraformSources, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListAlarmRecommendations struct { +} + +func (*awsRestjson1_deserializeOpListAlarmRecommendations) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListAlarmRecommendations) HandleDeserialize(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_deserializeOpErrorListAlarmRecommendations(response, &metadata) + } + output := &ListAlarmRecommendationsOutput{} + 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_deserializeOpDocumentListAlarmRecommendationsOutput(&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_deserializeOpErrorListAlarmRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 + + } +} + +func awsRestjson1_deserializeOpDocumentListAlarmRecommendationsOutput(v **ListAlarmRecommendationsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListAlarmRecommendationsOutput + if *v == nil { + sv = &ListAlarmRecommendationsOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "alarmRecommendations": + if err := awsRestjson1_deserializeDocumentAlarmRecommendationList(&sv.AlarmRecommendations, value); err != nil { + return err + } + + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} type awsRestjson1_deserializeOpListAppAssessmentComplianceDrifts struct { } @@ -6619,14 +6971,14 @@ func awsRestjson1_deserializeOpDocumentListResiliencyPoliciesOutput(v **ListResi return nil } -type awsRestjson1_deserializeOpListSopRecommendations struct { +type awsRestjson1_deserializeOpListResourceGroupingRecommendations struct { } -func (*awsRestjson1_deserializeOpListSopRecommendations) ID() string { +func (*awsRestjson1_deserializeOpListResourceGroupingRecommendations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSopRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListResourceGroupingRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6640,9 +6992,9 @@ func (m *awsRestjson1_deserializeOpListSopRecommendations) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSopRecommendations(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListResourceGroupingRecommendations(response, &metadata) } - output := &ListSopRecommendationsOutput{} + output := &ListResourceGroupingRecommendationsOutput{} out.Result = output var buff [1024]byte @@ -6663,7 +7015,7 @@ func (m *awsRestjson1_deserializeOpListSopRecommendations) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSopRecommendationsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListResourceGroupingRecommendationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6676,7 +7028,7 @@ func (m *awsRestjson1_deserializeOpListSopRecommendations) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSopRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListResourceGroupingRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6720,9 +7072,6 @@ func awsRestjson1_deserializeOpErrorListSopRecommendations(response *smithyhttp. case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -6745,7 +7094,7 @@ func awsRestjson1_deserializeOpErrorListSopRecommendations(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListSopRecommendationsOutput(v **ListSopRecommendationsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListResourceGroupingRecommendationsOutput(v **ListResourceGroupingRecommendationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6758,15 +7107,20 @@ func awsRestjson1_deserializeOpDocumentListSopRecommendationsOutput(v **ListSopR return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSopRecommendationsOutput + var sv *ListResourceGroupingRecommendationsOutput if *v == nil { - sv = &ListSopRecommendationsOutput{} + sv = &ListResourceGroupingRecommendationsOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "groupingRecommendations": + if err := awsRestjson1_deserializeDocumentGroupingRecommendationList(&sv.GroupingRecommendations, value); err != nil { + return err + } + case "nextToken": if value != nil { jtv, ok := value.(string) @@ -6776,11 +7130,6 @@ func awsRestjson1_deserializeOpDocumentListSopRecommendationsOutput(v **ListSopR sv.NextToken = ptr.String(jtv) } - case "sopRecommendations": - if err := awsRestjson1_deserializeDocumentSopRecommendationList(&sv.SopRecommendations, value); err != nil { - return err - } - default: _, _ = key, value @@ -6790,14 +7139,14 @@ func awsRestjson1_deserializeOpDocumentListSopRecommendationsOutput(v **ListSopR return nil } -type awsRestjson1_deserializeOpListSuggestedResiliencyPolicies struct { +type awsRestjson1_deserializeOpListSopRecommendations struct { } -func (*awsRestjson1_deserializeOpListSuggestedResiliencyPolicies) ID() string { +func (*awsRestjson1_deserializeOpListSopRecommendations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSuggestedResiliencyPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSopRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6811,9 +7160,9 @@ func (m *awsRestjson1_deserializeOpListSuggestedResiliencyPolicies) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSuggestedResiliencyPolicies(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSopRecommendations(response, &metadata) } - output := &ListSuggestedResiliencyPoliciesOutput{} + output := &ListSopRecommendationsOutput{} out.Result = output var buff [1024]byte @@ -6834,7 +7183,7 @@ func (m *awsRestjson1_deserializeOpListSuggestedResiliencyPolicies) HandleDeseri return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSuggestedResiliencyPoliciesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSopRecommendationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6847,7 +7196,7 @@ func (m *awsRestjson1_deserializeOpListSuggestedResiliencyPolicies) HandleDeseri return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSuggestedResiliencyPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSopRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.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,6 +7240,9 @@ func awsRestjson1_deserializeOpErrorListSuggestedResiliencyPolicies(response *sm case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -6913,7 +7265,7 @@ func awsRestjson1_deserializeOpErrorListSuggestedResiliencyPolicies(response *sm } } -func awsRestjson1_deserializeOpDocumentListSuggestedResiliencyPoliciesOutput(v **ListSuggestedResiliencyPoliciesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSopRecommendationsOutput(v **ListSopRecommendationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -6926,9 +7278,9 @@ func awsRestjson1_deserializeOpDocumentListSuggestedResiliencyPoliciesOutput(v * return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSuggestedResiliencyPoliciesOutput + var sv *ListSopRecommendationsOutput if *v == nil { - sv = &ListSuggestedResiliencyPoliciesOutput{} + sv = &ListSopRecommendationsOutput{} } else { sv = *v } @@ -6944,8 +7296,8 @@ func awsRestjson1_deserializeOpDocumentListSuggestedResiliencyPoliciesOutput(v * sv.NextToken = ptr.String(jtv) } - case "resiliencyPolicies": - if err := awsRestjson1_deserializeDocumentResiliencyPolicies(&sv.ResiliencyPolicies, value); err != nil { + case "sopRecommendations": + if err := awsRestjson1_deserializeDocumentSopRecommendationList(&sv.SopRecommendations, value); err != nil { return err } @@ -6958,14 +7310,14 @@ func awsRestjson1_deserializeOpDocumentListSuggestedResiliencyPoliciesOutput(v * return nil } -type awsRestjson1_deserializeOpListTagsForResource struct { +type awsRestjson1_deserializeOpListSuggestedResiliencyPolicies struct { } -func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { +func (*awsRestjson1_deserializeOpListSuggestedResiliencyPolicies) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSuggestedResiliencyPolicies) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6979,9 +7331,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_deserializeOpErrorListSuggestedResiliencyPolicies(response, &metadata) } - output := &ListTagsForResourceOutput{} + output := &ListSuggestedResiliencyPoliciesOutput{} out.Result = output var buff [1024]byte @@ -7002,7 +7354,7 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSuggestedResiliencyPoliciesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7015,7 +7367,175 @@ func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSuggestedResiliencyPolicies(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 + + } +} + +func awsRestjson1_deserializeOpDocumentListSuggestedResiliencyPoliciesOutput(v **ListSuggestedResiliencyPoliciesOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListSuggestedResiliencyPoliciesOutput + if *v == nil { + sv = &ListSuggestedResiliencyPoliciesOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "nextToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NextToken to be of type string, got %T instead", value) + } + sv.NextToken = ptr.String(jtv) + } + + case "resiliencyPolicies": + if err := awsRestjson1_deserializeDocumentResiliencyPolicies(&sv.ResiliencyPolicies, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + 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)} @@ -7840,14 +8360,14 @@ func awsRestjson1_deserializeOpDocumentPutDraftAppVersionTemplateOutput(v **PutD return nil } -type awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings struct { +type awsRestjson1_deserializeOpRejectResourceGroupingRecommendations struct { } -func (*awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings) ID() string { +func (*awsRestjson1_deserializeOpRejectResourceGroupingRecommendations) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRejectResourceGroupingRecommendations) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7861,9 +8381,9 @@ func (m *awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings) Handle } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorRemoveDraftAppVersionResourceMappings(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRejectResourceGroupingRecommendations(response, &metadata) } - output := &RemoveDraftAppVersionResourceMappingsOutput{} + output := &RejectResourceGroupingRecommendationsOutput{} out.Result = output var buff [1024]byte @@ -7884,7 +8404,7 @@ func (m *awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings) Handle return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentRemoveDraftAppVersionResourceMappingsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRejectResourceGroupingRecommendationsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7897,7 +8417,7 @@ func (m *awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings) Handle return out, metadata, err } -func awsRestjson1_deserializeOpErrorRemoveDraftAppVersionResourceMappings(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRejectResourceGroupingRecommendations(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7941,9 +8461,6 @@ func awsRestjson1_deserializeOpErrorRemoveDraftAppVersionResourceMappings(respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -7966,7 +8483,7 @@ func awsRestjson1_deserializeOpErrorRemoveDraftAppVersionResourceMappings(respon } } -func awsRestjson1_deserializeOpDocumentRemoveDraftAppVersionResourceMappingsOutput(v **RemoveDraftAppVersionResourceMappingsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRejectResourceGroupingRecommendationsOutput(v **RejectResourceGroupingRecommendationsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -7979,9 +8496,9 @@ func awsRestjson1_deserializeOpDocumentRemoveDraftAppVersionResourceMappingsOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *RemoveDraftAppVersionResourceMappingsOutput + var sv *RejectResourceGroupingRecommendationsOutput if *v == nil { - sv = &RemoveDraftAppVersionResourceMappingsOutput{} + sv = &RejectResourceGroupingRecommendationsOutput{} } else { sv = *v } @@ -7997,13 +8514,9 @@ func awsRestjson1_deserializeOpDocumentRemoveDraftAppVersionResourceMappingsOutp sv.AppArn = ptr.String(jtv) } - case "appVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) - } - sv.AppVersion = ptr.String(jtv) + case "failedEntries": + if err := awsRestjson1_deserializeDocumentFailedGroupingRecommendationEntries(&sv.FailedEntries, value); err != nil { + return err } default: @@ -8015,14 +8528,14 @@ func awsRestjson1_deserializeOpDocumentRemoveDraftAppVersionResourceMappingsOutp return nil } -type awsRestjson1_deserializeOpResolveAppVersionResources struct { +type awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings struct { } -func (*awsRestjson1_deserializeOpResolveAppVersionResources) ID() string { +func (*awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpResolveAppVersionResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpRemoveDraftAppVersionResourceMappings) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8036,9 +8549,9 @@ func (m *awsRestjson1_deserializeOpResolveAppVersionResources) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorResolveAppVersionResources(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorRemoveDraftAppVersionResourceMappings(response, &metadata) } - output := &ResolveAppVersionResourcesOutput{} + output := &RemoveDraftAppVersionResourceMappingsOutput{} out.Result = output var buff [1024]byte @@ -8059,7 +8572,7 @@ func (m *awsRestjson1_deserializeOpResolveAppVersionResources) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentResolveAppVersionResourcesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentRemoveDraftAppVersionResourceMappingsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8072,7 +8585,7 @@ func (m *awsRestjson1_deserializeOpResolveAppVersionResources) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorResolveAppVersionResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorRemoveDraftAppVersionResourceMappings(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8141,7 +8654,7 @@ func awsRestjson1_deserializeOpErrorResolveAppVersionResources(response *smithyh } } -func awsRestjson1_deserializeOpDocumentResolveAppVersionResourcesOutput(v **ResolveAppVersionResourcesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentRemoveDraftAppVersionResourceMappingsOutput(v **RemoveDraftAppVersionResourceMappingsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8154,9 +8667,9 @@ func awsRestjson1_deserializeOpDocumentResolveAppVersionResourcesOutput(v **Reso return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ResolveAppVersionResourcesOutput + var sv *RemoveDraftAppVersionResourceMappingsOutput if *v == nil { - sv = &ResolveAppVersionResourcesOutput{} + sv = &RemoveDraftAppVersionResourceMappingsOutput{} } else { sv = *v } @@ -8181,24 +8694,6 @@ func awsRestjson1_deserializeOpDocumentResolveAppVersionResourcesOutput(v **Reso sv.AppVersion = ptr.String(jtv) } - case "resolutionId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) - } - sv.ResolutionId = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceResolutionStatusType to be of type string, got %T instead", value) - } - sv.Status = types.ResourceResolutionStatusType(jtv) - } - default: _, _ = key, value @@ -8208,14 +8703,14 @@ func awsRestjson1_deserializeOpDocumentResolveAppVersionResourcesOutput(v **Reso return nil } -type awsRestjson1_deserializeOpStartAppAssessment struct { +type awsRestjson1_deserializeOpResolveAppVersionResources struct { } -func (*awsRestjson1_deserializeOpStartAppAssessment) ID() string { +func (*awsRestjson1_deserializeOpResolveAppVersionResources) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartAppAssessment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpResolveAppVersionResources) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8229,9 +8724,9 @@ func (m *awsRestjson1_deserializeOpStartAppAssessment) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartAppAssessment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorResolveAppVersionResources(response, &metadata) } - output := &StartAppAssessmentOutput{} + output := &ResolveAppVersionResourcesOutput{} out.Result = output var buff [1024]byte @@ -8252,7 +8747,7 @@ func (m *awsRestjson1_deserializeOpStartAppAssessment) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartAppAssessmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentResolveAppVersionResourcesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8265,7 +8760,7 @@ func (m *awsRestjson1_deserializeOpStartAppAssessment) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartAppAssessment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorResolveAppVersionResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8318,9 +8813,6 @@ func awsRestjson1_deserializeOpErrorStartAppAssessment(response *smithyhttp.Resp case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -8337,7 +8829,7 @@ func awsRestjson1_deserializeOpErrorStartAppAssessment(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentStartAppAssessmentOutput(v **StartAppAssessmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentResolveAppVersionResourcesOutput(v **ResolveAppVersionResourcesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8350,19 +8842,50 @@ func awsRestjson1_deserializeOpDocumentStartAppAssessmentOutput(v **StartAppAsse return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartAppAssessmentOutput + var sv *ResolveAppVersionResourcesOutput if *v == nil { - sv = &StartAppAssessmentOutput{} + sv = &ResolveAppVersionResourcesOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "assessment": - if err := awsRestjson1_deserializeDocumentAppAssessment(&sv.Assessment, value); err != nil { - return err - } + case "appArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AppArn = ptr.String(jtv) + } + + case "appVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + } + sv.AppVersion = ptr.String(jtv) + } + + case "resolutionId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.ResolutionId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceResolutionStatusType to be of type string, got %T instead", value) + } + sv.Status = types.ResourceResolutionStatusType(jtv) + } default: _, _ = key, value @@ -8373,14 +8896,14 @@ func awsRestjson1_deserializeOpDocumentStartAppAssessmentOutput(v **StartAppAsse return nil } -type awsRestjson1_deserializeOpTagResource struct { +type awsRestjson1_deserializeOpStartAppAssessment struct { } -func (*awsRestjson1_deserializeOpTagResource) ID() string { +func (*awsRestjson1_deserializeOpStartAppAssessment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartAppAssessment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8394,110 +8917,43 @@ func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartAppAssessment(response, &metadata) } - output := &TagResourceOutput{} + output := &StartAppAssessmentOutput{} 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) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() - jsonCode, message, err := restjson.GetErrorInfo(decoder) - if err != nil { + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ 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_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) + err = awsRestjson1_deserializeOpDocumentStartAppAssessmentOutput(&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(), + } } - output := &UntagResourceOutput{} - out.Result = output return out, metadata, err } -func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartAppAssessment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8541,12 +8997,18 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(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("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -8563,14 +9025,50 @@ func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, } } -type awsRestjson1_deserializeOpUpdateApp struct { +func awsRestjson1_deserializeOpDocumentStartAppAssessmentOutput(v **StartAppAssessmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *StartAppAssessmentOutput + if *v == nil { + sv = &StartAppAssessmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "assessment": + if err := awsRestjson1_deserializeDocumentAppAssessment(&sv.Assessment, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func (*awsRestjson1_deserializeOpUpdateApp) ID() string { +type awsRestjson1_deserializeOpStartResourceGroupingRecommendationTask struct { +} + +func (*awsRestjson1_deserializeOpStartResourceGroupingRecommendationTask) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateApp) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartResourceGroupingRecommendationTask) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8584,9 +9082,9 @@ func (m *awsRestjson1_deserializeOpUpdateApp) HandleDeserialize(ctx context.Cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateApp(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartResourceGroupingRecommendationTask(response, &metadata) } - output := &UpdateAppOutput{} + output := &StartResourceGroupingRecommendationTaskOutput{} out.Result = output var buff [1024]byte @@ -8607,7 +9105,7 @@ func (m *awsRestjson1_deserializeOpUpdateApp) HandleDeserialize(ctx context.Cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAppOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartResourceGroupingRecommendationTaskOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8620,7 +9118,7 @@ func (m *awsRestjson1_deserializeOpUpdateApp) HandleDeserialize(ctx context.Cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateApp(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartResourceGroupingRecommendationTask(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -8689,7 +9187,7 @@ func awsRestjson1_deserializeOpErrorUpdateApp(response *smithyhttp.Response, met } } -func awsRestjson1_deserializeOpDocumentUpdateAppOutput(v **UpdateAppOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartResourceGroupingRecommendationTaskOutput(v **StartResourceGroupingRecommendationTaskOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -8702,18 +9200,49 @@ func awsRestjson1_deserializeOpDocumentUpdateAppOutput(v **UpdateAppOutput, valu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAppOutput + var sv *StartResourceGroupingRecommendationTaskOutput if *v == nil { - sv = &UpdateAppOutput{} + sv = &StartResourceGroupingRecommendationTaskOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "app": - if err := awsRestjson1_deserializeDocumentApp(&sv.App, value); err != nil { - return err + case "appArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AppArn = ptr.String(jtv) + } + + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + } + sv.ErrorMessage = ptr.String(jtv) + } + + case "groupingId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.GroupingId = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourcesGroupingRecGenStatusType to be of type string, got %T instead", value) + } + sv.Status = types.ResourcesGroupingRecGenStatusType(jtv) } default: @@ -8725,14 +9254,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAppOutput(v **UpdateAppOutput, valu return nil } -type awsRestjson1_deserializeOpUpdateAppVersion struct { +type awsRestjson1_deserializeOpTagResource struct { } -func (*awsRestjson1_deserializeOpUpdateAppVersion) ID() string { +func (*awsRestjson1_deserializeOpTagResource) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAppVersion) 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) @@ -8746,43 +9275,110 @@ func (m *awsRestjson1_deserializeOpUpdateAppVersion) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppVersion(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) } - output := &UpdateAppVersionOutput{} + 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(response.Body, ringBuffer) - + body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return out, metadata, err + return err } - err = awsRestjson1_deserializeOpDocumentUpdateAppVersionOutput(&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(), + 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_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_deserializeOpErrorUpdateAppVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { +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)} @@ -8826,9 +9422,6 @@ func awsRestjson1_deserializeOpErrorUpdateAppVersion(response *smithyhttp.Respon case strings.EqualFold("AccessDeniedException", errorCode): return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) - case strings.EqualFold("ConflictException", errorCode): - return awsRestjson1_deserializeErrorConflictException(response, errorBody) - case strings.EqualFold("InternalServerException", errorCode): return awsRestjson1_deserializeErrorInternalServerException(response, errorBody) @@ -8851,68 +9444,14 @@ func awsRestjson1_deserializeOpErrorUpdateAppVersion(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentUpdateAppVersionOutput(v **UpdateAppVersionOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateAppVersionOutput - if *v == nil { - sv = &UpdateAppVersionOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "additionalInfo": - if err := awsRestjson1_deserializeDocumentAdditionalInfoMap(&sv.AdditionalInfo, value); err != nil { - return err - } - - case "appArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.AppArn = ptr.String(jtv) - } - - case "appVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) - } - sv.AppVersion = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type awsRestjson1_deserializeOpUpdateAppVersionAppComponent struct { +type awsRestjson1_deserializeOpUpdateApp struct { } -func (*awsRestjson1_deserializeOpUpdateAppVersionAppComponent) ID() string { +func (*awsRestjson1_deserializeOpUpdateApp) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAppVersionAppComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateApp) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -8926,9 +9465,9 @@ func (m *awsRestjson1_deserializeOpUpdateAppVersionAppComponent) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppVersionAppComponent(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateApp(response, &metadata) } - output := &UpdateAppVersionAppComponentOutput{} + output := &UpdateAppOutput{} out.Result = output var buff [1024]byte @@ -8949,7 +9488,7 @@ func (m *awsRestjson1_deserializeOpUpdateAppVersionAppComponent) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAppVersionAppComponentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAppOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -8962,7 +9501,7 @@ func (m *awsRestjson1_deserializeOpUpdateAppVersionAppComponent) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAppVersionAppComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateApp(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9031,7 +9570,7 @@ func awsRestjson1_deserializeOpErrorUpdateAppVersionAppComponent(response *smith } } -func awsRestjson1_deserializeOpDocumentUpdateAppVersionAppComponentOutput(v **UpdateAppVersionAppComponentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAppOutput(v **UpdateAppOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9044,38 +9583,20 @@ func awsRestjson1_deserializeOpDocumentUpdateAppVersionAppComponentOutput(v **Up return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAppVersionAppComponentOutput + var sv *UpdateAppOutput if *v == nil { - sv = &UpdateAppVersionAppComponentOutput{} + sv = &UpdateAppOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "appArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.AppArn = ptr.String(jtv) - } - - case "appComponent": - if err := awsRestjson1_deserializeDocumentAppComponent(&sv.AppComponent, value); err != nil { + case "app": + if err := awsRestjson1_deserializeDocumentApp(&sv.App, value); err != nil { return err } - case "appVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) - } - sv.AppVersion = ptr.String(jtv) - } - default: _, _ = key, value @@ -9085,14 +9606,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAppVersionAppComponentOutput(v **Up return nil } -type awsRestjson1_deserializeOpUpdateAppVersionResource struct { +type awsRestjson1_deserializeOpUpdateAppVersion struct { } -func (*awsRestjson1_deserializeOpUpdateAppVersionResource) ID() string { +func (*awsRestjson1_deserializeOpUpdateAppVersion) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateAppVersionResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAppVersion) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9106,9 +9627,9 @@ func (m *awsRestjson1_deserializeOpUpdateAppVersionResource) HandleDeserialize(c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppVersionResource(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppVersion(response, &metadata) } - output := &UpdateAppVersionResourceOutput{} + output := &UpdateAppVersionOutput{} out.Result = output var buff [1024]byte @@ -9129,7 +9650,7 @@ func (m *awsRestjson1_deserializeOpUpdateAppVersionResource) HandleDeserialize(c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateAppVersionResourceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAppVersionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9142,7 +9663,7 @@ func (m *awsRestjson1_deserializeOpUpdateAppVersionResource) HandleDeserialize(c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateAppVersionResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAppVersion(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9195,9 +9716,6 @@ func awsRestjson1_deserializeOpErrorUpdateAppVersionResource(response *smithyhtt case strings.EqualFold("ResourceNotFoundException", errorCode): return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) - case strings.EqualFold("ServiceQuotaExceededException", errorCode): - return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) - case strings.EqualFold("ThrottlingException", errorCode): return awsRestjson1_deserializeErrorThrottlingException(response, errorBody) @@ -9214,7 +9732,7 @@ func awsRestjson1_deserializeOpErrorUpdateAppVersionResource(response *smithyhtt } } -func awsRestjson1_deserializeOpDocumentUpdateAppVersionResourceOutput(v **UpdateAppVersionResourceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAppVersionOutput(v **UpdateAppVersionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9227,15 +9745,20 @@ func awsRestjson1_deserializeOpDocumentUpdateAppVersionResourceOutput(v **Update return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateAppVersionResourceOutput + var sv *UpdateAppVersionOutput if *v == nil { - sv = &UpdateAppVersionResourceOutput{} + sv = &UpdateAppVersionOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "additionalInfo": + if err := awsRestjson1_deserializeDocumentAdditionalInfoMap(&sv.AdditionalInfo, value); err != nil { + return err + } + case "appArn": if value != nil { jtv, ok := value.(string) @@ -9254,11 +9777,6 @@ func awsRestjson1_deserializeOpDocumentUpdateAppVersionResourceOutput(v **Update sv.AppVersion = ptr.String(jtv) } - case "physicalResource": - if err := awsRestjson1_deserializeDocumentPhysicalResource(&sv.PhysicalResource, value); err != nil { - return err - } - default: _, _ = key, value @@ -9268,14 +9786,14 @@ func awsRestjson1_deserializeOpDocumentUpdateAppVersionResourceOutput(v **Update return nil } -type awsRestjson1_deserializeOpUpdateResiliencyPolicy struct { +type awsRestjson1_deserializeOpUpdateAppVersionAppComponent struct { } -func (*awsRestjson1_deserializeOpUpdateResiliencyPolicy) ID() string { +func (*awsRestjson1_deserializeOpUpdateAppVersionAppComponent) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateResiliencyPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateAppVersionAppComponent) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -9289,9 +9807,9 @@ func (m *awsRestjson1_deserializeOpUpdateResiliencyPolicy) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateResiliencyPolicy(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppVersionAppComponent(response, &metadata) } - output := &UpdateResiliencyPolicyOutput{} + output := &UpdateAppVersionAppComponentOutput{} out.Result = output var buff [1024]byte @@ -9312,7 +9830,7 @@ func (m *awsRestjson1_deserializeOpUpdateResiliencyPolicy) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateResiliencyPolicyOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateAppVersionAppComponentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9325,7 +9843,7 @@ func (m *awsRestjson1_deserializeOpUpdateResiliencyPolicy) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateResiliencyPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateAppVersionAppComponent(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -9394,7 +9912,7 @@ func awsRestjson1_deserializeOpErrorUpdateResiliencyPolicy(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentUpdateResiliencyPolicyOutput(v **UpdateResiliencyPolicyOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateAppVersionAppComponentOutput(v **UpdateAppVersionAppComponentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9407,20 +9925,38 @@ func awsRestjson1_deserializeOpDocumentUpdateResiliencyPolicyOutput(v **UpdateRe return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateResiliencyPolicyOutput + var sv *UpdateAppVersionAppComponentOutput if *v == nil { - sv = &UpdateResiliencyPolicyOutput{} + sv = &UpdateAppVersionAppComponentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "policy": - if err := awsRestjson1_deserializeDocumentResiliencyPolicy(&sv.Policy, value); err != nil { + case "appArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AppArn = ptr.String(jtv) + } + + case "appComponent": + if err := awsRestjson1_deserializeDocumentAppComponent(&sv.AppComponent, value); err != nil { return err } + case "appVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + } + sv.AppVersion = ptr.String(jtv) + } + default: _, _ = key, value @@ -9430,48 +9966,37 @@ func awsRestjson1_deserializeOpDocumentUpdateResiliencyPolicyOutput(v **UpdateRe return nil } -func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.AccessDeniedException{} - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) +type awsRestjson1_deserializeOpUpdateAppVersionResource struct { +} - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) +func (*awsRestjson1_deserializeOpUpdateAppVersionResource) ID() string { + return "OperationDeserializer" +} +func (m *awsRestjson1_deserializeOpUpdateAppVersionResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err + return out, metadata, err } - errorBody.Seek(0, io.SeekStart) + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } - return output -} + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUpdateAppVersionResource(response, &metadata) + } + output := &UpdateAppVersionResourceOutput{} + out.Result = 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) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -9482,36 +10007,45 @@ func awsRestjson1_deserializeErrorConflictException(response *smithyhttp.Respons Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentConflictException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentUpdateAppVersionResourceOutput(&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_deserializeErrorInternalServerException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.InternalServerException{} +func awsRestjson1_deserializeOpErrorUpdateAppVersionResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) body := io.TeeReader(errorBody, ringBuffer) decoder := json.NewDecoder(body) decoder.UseNumber() - var shape interface{} - if err := decoder.Decode(&shape); err != nil && err != io.EOF { + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) err = &smithy.DeserializationError{ @@ -9521,29 +10055,131 @@ func awsRestjson1_deserializeErrorInternalServerException(response *smithyhttp.R return err } - err := awsRestjson1_deserializeDocumentInternalServerException(&output, shape) + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(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("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(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 err + return genericError + } +} - errorBody.Seek(0, io.SeekStart) +func awsRestjson1_deserializeOpDocumentUpdateAppVersionResourceOutput(v **UpdateAppVersionResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - return output + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateAppVersionResourceOutput + if *v == nil { + sv = &UpdateAppVersionResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AppArn = ptr.String(jtv) + } + + case "appVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + } + sv.AppVersion = ptr.String(jtv) + } + + case "physicalResource": + if err := awsRestjson1_deserializeDocumentPhysicalResource(&sv.PhysicalResource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil } -func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ResourceNotFoundException{} +type awsRestjson1_deserializeOpUpdateResiliencyPolicy struct { +} + +func (*awsRestjson1_deserializeOpUpdateResiliencyPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUpdateResiliencyPolicy) HandleDeserialize(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_deserializeOpErrorUpdateResiliencyPolicy(response, &metadata) + } + output := &UpdateResiliencyPolicyOutput{} + out.Result = output + var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) - body := io.TeeReader(errorBody, ringBuffer) + body := io.TeeReader(response.Body, ringBuffer) + decoder := json.NewDecoder(body) decoder.UseNumber() var shape interface{} @@ -9554,47 +10190,44 @@ func awsRestjson1_deserializeErrorResourceNotFoundException(response *smithyhttp Err: fmt.Errorf("failed to decode response body, %w", err), Snapshot: snapshot.Bytes(), } - return err + return out, metadata, err } - err := awsRestjson1_deserializeDocumentResourceNotFoundException(&output, shape) - + err = awsRestjson1_deserializeOpDocumentUpdateResiliencyPolicyOutput(&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_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { - output := &types.ServiceQuotaExceededException{} +func awsRestjson1_deserializeOpErrorUpdateResiliencyPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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_deserializeDocumentServiceQuotaExceededException(&output, shape) - + jsonCode, message, err := restjson.GetErrorInfo(decoder) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -9606,8 +10239,256 @@ func awsRestjson1_deserializeErrorServiceQuotaExceededException(response *smithy } errorBody.Seek(0, io.SeekStart) + 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) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(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 + + } +} + +func awsRestjson1_deserializeOpDocumentUpdateResiliencyPolicyOutput(v **UpdateResiliencyPolicyOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateResiliencyPolicyOutput + if *v == nil { + sv = &UpdateResiliencyPolicyOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "policy": + if err := awsRestjson1_deserializeDocumentResiliencyPolicy(&sv.Policy, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeErrorAccessDeniedException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + output := &types.AccessDeniedException{} + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + err := awsRestjson1_deserializeDocumentAccessDeniedException(&output, shape) + + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + + return output +} + +func awsRestjson1_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) + + 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 { @@ -10257,62 +11138,785 @@ func awsRestjson1_deserializeDocumentAppAssessment(v **types.AppAssessment, valu sv.AppVersion = ptr.String(jtv) } - case "assessmentArn": + case "assessmentArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AssessmentArn = ptr.String(jtv) + } + + case "assessmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.AssessmentName = ptr.String(jtv) + } + + case "assessmentStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssessmentStatus to be of type string, got %T instead", value) + } + sv.AssessmentStatus = types.AssessmentStatus(jtv) + } + + case "compliance": + if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.Compliance, value); err != nil { + return err + } + + case "complianceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) + } + sv.ComplianceStatus = types.ComplianceStatus(jtv) + } + + case "cost": + if err := awsRestjson1_deserializeDocumentCost(&sv.Cost, value); err != nil { + return err + } + + case "driftStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DriftStatus to be of type string, got %T instead", value) + } + sv.DriftStatus = types.DriftStatus(jtv) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + + } + } + + case "invoker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssessmentInvoker to be of type string, got %T instead", value) + } + sv.Invoker = types.AssessmentInvoker(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "policy": + if err := awsRestjson1_deserializeDocumentResiliencyPolicy(&sv.Policy, value); err != nil { + return err + } + + case "resiliencyScore": + if err := awsRestjson1_deserializeDocumentResiliencyScore(&sv.ResiliencyScore, value); err != nil { + return err + } + + case "resourceErrorsDetails": + if err := awsRestjson1_deserializeDocumentResourceErrorsDetails(&sv.ResourceErrorsDetails, value); err != nil { + return err + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + + } + } + + case "summary": + if err := awsRestjson1_deserializeDocumentAssessmentSummary(&sv.Summary, value); err != nil { + return err + } + + case "tags": + if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { + return err + } + + case "versionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppAssessmentSummary(v **types.AppAssessmentSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AppAssessmentSummary + if *v == nil { + sv = &types.AppAssessmentSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AppArn = ptr.String(jtv) + } + + case "appVersion": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + } + sv.AppVersion = ptr.String(jtv) + } + + case "assessmentArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.AssessmentArn = ptr.String(jtv) + } + + case "assessmentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.AssessmentName = ptr.String(jtv) + } + + case "assessmentStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssessmentStatus to be of type string, got %T instead", value) + } + sv.AssessmentStatus = types.AssessmentStatus(jtv) + } + + case "complianceStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) + } + sv.ComplianceStatus = types.ComplianceStatus(jtv) + } + + case "cost": + if err := awsRestjson1_deserializeDocumentCost(&sv.Cost, value); err != nil { + return err + } + + case "driftStatus": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DriftStatus to be of type string, got %T instead", value) + } + sv.DriftStatus = types.DriftStatus(jtv) + } + + case "endTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + + } + } + + case "invoker": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected AssessmentInvoker to be of type string, got %T instead", value) + } + sv.Invoker = types.AssessmentInvoker(jtv) + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resiliencyScore": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.ResiliencyScore = 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.ResiliencyScore = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "startTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + + } + } + + case "versionName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + } + sv.VersionName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppAssessmentSummaryList(v *[]types.AppAssessmentSummary, 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.AppAssessmentSummary + if *v == nil { + cv = []types.AppAssessmentSummary{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AppAssessmentSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppAssessmentSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAppComponent(v **types.AppComponent, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AppComponent + if *v == nil { + sv = &types.AppComponent{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "additionalInfo": + if err := awsRestjson1_deserializeDocumentAdditionalInfoMap(&sv.AdditionalInfo, value); err != nil { + return err + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName255 to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName255 to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "type": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.Type = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppComponentCompliance(v **types.AppComponentCompliance, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AppComponentCompliance + if *v == nil { + sv = &types.AppComponentCompliance{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appComponentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) + } + sv.AppComponentName = ptr.String(jtv) + } + + case "compliance": + if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.Compliance, value); err != nil { + return err + } + + case "cost": + if err := awsRestjson1_deserializeDocumentCost(&sv.Cost, value); err != nil { + return err + } + + case "message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "resiliencyScore": + if err := awsRestjson1_deserializeDocumentResiliencyScore(&sv.ResiliencyScore, value); err != nil { + return err + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) + } + sv.Status = types.ComplianceStatus(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppComponentList(v *[]types.AppComponent, 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.AppComponent + if *v == nil { + cv = []types.AppComponent{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AppComponent + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppComponent(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAppComponentNameList(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAppInputSource(v **types.AppInputSource, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AppInputSource + if *v == nil { + sv = &types.AppInputSource{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "eksSourceClusterNamespace": + if err := awsRestjson1_deserializeDocumentEksSourceClusterNamespace(&sv.EksSourceClusterNamespace, value); err != nil { + return err + } + + case "importType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceMappingType to be of type string, got %T instead", value) + } + sv.ImportType = types.ResourceMappingType(jtv) + } + + case "resourceCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.ResourceCount = int32(i64) + } + + case "sourceArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.SourceArn = ptr.String(jtv) + } + + case "sourceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.SourceName = ptr.String(jtv) + } + + case "terraformSource": + if err := awsRestjson1_deserializeDocumentTerraformSource(&sv.TerraformSource, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentAppInputSourceList(v *[]types.AppInputSource, 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.AppInputSource + if *v == nil { + cv = []types.AppInputSource{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.AppInputSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppInputSource(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAppSummary(v **types.AppSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AppSummary + if *v == nil { + sv = &types.AppSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "appArn": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.AssessmentArn = ptr.String(jtv) + sv.AppArn = ptr.String(jtv) } - case "assessmentName": + case "assessmentSchedule": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + return fmt.Errorf("expected AppAssessmentScheduleType to be of type string, got %T instead", value) } - sv.AssessmentName = ptr.String(jtv) + sv.AssessmentSchedule = types.AppAssessmentScheduleType(jtv) } - case "assessmentStatus": + case "complianceStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AssessmentStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected AppComplianceStatusType to be of type string, got %T instead", value) } - sv.AssessmentStatus = types.AssessmentStatus(jtv) + sv.ComplianceStatus = types.AppComplianceStatusType(jtv) } - case "compliance": - if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.Compliance, value); err != nil { - return err + case "creationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + + } } - case "complianceStatus": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value) } - sv.ComplianceStatus = types.ComplianceStatus(jtv) - } - - case "cost": - if err := awsRestjson1_deserializeDocumentCost(&sv.Cost, value); err != nil { - return err + sv.Description = ptr.String(jtv) } case "driftStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DriftStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected AppDriftStatusType to be of type string, got %T instead", value) } - sv.DriftStatus = types.DriftStatus(jtv) + sv.DriftStatus = types.AppDriftStatusType(jtv) } - case "endTime": + case "lastAppComplianceEvaluationTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -10320,7 +11924,7 @@ func awsRestjson1_deserializeDocumentAppAssessment(v **types.AppAssessment, valu if err != nil { return err } - sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.LastAppComplianceEvaluationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) @@ -10328,40 +11932,16 @@ func awsRestjson1_deserializeDocumentAppAssessment(v **types.AppAssessment, valu } } - case "invoker": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AssessmentInvoker to be of type string, got %T instead", value) - } - sv.Invoker = types.AssessmentInvoker(jtv) - } - - case "message": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) - } - - case "policy": - if err := awsRestjson1_deserializeDocumentResiliencyPolicy(&sv.Policy, value); err != nil { - return err + sv.Name = ptr.String(jtv) } case "resiliencyScore": - if err := awsRestjson1_deserializeDocumentResiliencyScore(&sv.ResiliencyScore, value); err != nil { - return err - } - - case "resourceErrorsDetails": - if err := awsRestjson1_deserializeDocumentResourceErrorsDetails(&sv.ResourceErrorsDetails, value); err != nil { - return err - } - - case "startTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -10369,26 +11949,65 @@ func awsRestjson1_deserializeDocumentAppAssessment(v **types.AppAssessment, valu if err != nil { return err } - sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.ResiliencyScore = 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.ResiliencyScore = f64 default: - return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) } } - case "tags": - if err := awsRestjson1_deserializeDocumentTagMap(&sv.Tags, value); err != nil { - return err + case "rpoInSecs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RpoInSecs = ptr.Int32(int32(i64)) } - case "versionName": + case "rtoInSecs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected IntegerOptional to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RtoInSecs = ptr.Int32(int32(i64)) + } + + case "status": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + return fmt.Errorf("expected AppStatusType to be of type string, got %T instead", value) } - sv.VersionName = ptr.String(jtv) + sv.Status = types.AppStatusType(jtv) } default: @@ -10400,7 +12019,7 @@ func awsRestjson1_deserializeDocumentAppAssessment(v **types.AppAssessment, valu return nil } -func awsRestjson1_deserializeDocumentAppAssessmentSummary(v **types.AppAssessmentSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentAppSummaryList(v *[]types.AppSummary, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10408,89 +12027,98 @@ func awsRestjson1_deserializeDocumentAppAssessmentSummary(v **types.AppAssessmen return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AppAssessmentSummary + var cv []types.AppSummary if *v == nil { - sv = &types.AppAssessmentSummary{} + cv = []types.AppSummary{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "appArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.AppArn = ptr.String(jtv) - } + for _, value := range shape { + var col types.AppSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - case "appVersion": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) - } - sv.AppVersion = ptr.String(jtv) - } + } + *v = cv + return nil +} - case "assessmentArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - sv.AssessmentArn = ptr.String(jtv) - } +func awsRestjson1_deserializeDocumentAppVersionList(v *[]types.AppVersionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case "assessmentName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) - } - sv.AssessmentName = ptr.String(jtv) - } + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "assessmentStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AssessmentStatus to be of type string, got %T instead", value) - } - sv.AssessmentStatus = types.AssessmentStatus(jtv) - } + var cv []types.AppVersionSummary + if *v == nil { + cv = []types.AppVersionSummary{} + } else { + cv = *v + } - case "complianceStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) - } - sv.ComplianceStatus = types.ComplianceStatus(jtv) - } + for _, value := range shape { + var col types.AppVersionSummary + destAddr := &col + if err := awsRestjson1_deserializeDocumentAppVersionSummary(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsRestjson1_deserializeDocumentAppVersionSummary(v **types.AppVersionSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - case "cost": - if err := awsRestjson1_deserializeDocumentCost(&sv.Cost, value); err != nil { - return err - } + var sv *types.AppVersionSummary + if *v == nil { + sv = &types.AppVersionSummary{} + } else { + sv = *v + } - case "driftStatus": + for key, value := range shape { + switch key { + case "appVersion": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DriftStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) } - sv.DriftStatus = types.DriftStatus(jtv) + sv.AppVersion = ptr.String(jtv) } - case "endTime": + case "creationTime": if value != nil { switch jtv := value.(type) { case json.Number: @@ -10498,7 +12126,7 @@ func awsRestjson1_deserializeDocumentAppAssessmentSummary(v **types.AppAssessmen if err != nil { return err } - sv.EndTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) default: return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) @@ -10506,72 +12134,17 @@ func awsRestjson1_deserializeDocumentAppAssessmentSummary(v **types.AppAssessmen } } - case "invoker": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected AssessmentInvoker to be of type string, got %T instead", value) - } - sv.Invoker = types.AssessmentInvoker(jtv) - } - - case "message": + case "identifier": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - case "resiliencyScore": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ResiliencyScore = 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.ResiliencyScore = f64 - - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) - + return fmt.Errorf("expected LongOptional to be json.Number, got %T instead", value) } - } - - case "startTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.StartTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) - + i64, err := jtv.Int64() + if err != nil { + return err } + sv.Identifier = ptr.Int64(i64) } case "versionName": @@ -10592,7 +12165,7 @@ func awsRestjson1_deserializeDocumentAppAssessmentSummary(v **types.AppAssessmen return nil } -func awsRestjson1_deserializeDocumentAppAssessmentSummaryList(v *[]types.AppAssessmentSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentArnList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10605,20 +12178,22 @@ func awsRestjson1_deserializeDocumentAppAssessmentSummaryList(v *[]types.AppAsse return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AppAssessmentSummary + var cv []string if *v == nil { - cv = []types.AppAssessmentSummary{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.AppAssessmentSummary - destAddr := &col - if err := awsRestjson1_deserializeDocumentAppAssessmentSummary(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -10626,7 +12201,7 @@ func awsRestjson1_deserializeDocumentAppAssessmentSummaryList(v *[]types.AppAsse return nil } -func awsRestjson1_deserializeDocumentAppComponent(v **types.AppComponent, value interface{}) error { +func awsRestjson1_deserializeDocumentAssessmentCompliance(v *map[string]types.DisruptionCompliance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10639,57 +12214,29 @@ func awsRestjson1_deserializeDocumentAppComponent(v **types.AppComponent, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AppComponent + var mv map[string]types.DisruptionCompliance if *v == nil { - sv = &types.AppComponent{} + mv = map[string]types.DisruptionCompliance{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "additionalInfo": - if err := awsRestjson1_deserializeDocumentAdditionalInfoMap(&sv.AdditionalInfo, value); err != nil { - return err - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "type": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) - } - sv.Type = ptr.String(jtv) - } - - default: - _, _ = key, value - + var parsedVal types.DisruptionCompliance + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentDisruptionCompliance(&destAddr, value); err != nil { + return err } + parsedVal = *destAddr + mv[key] = parsedVal + } - *v = sv + *v = mv return nil } -func awsRestjson1_deserializeDocumentAppComponentCompliance(v **types.AppComponentCompliance, value interface{}) error { +func awsRestjson1_deserializeDocumentAssessmentRiskRecommendation(v **types.AssessmentRiskRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10702,55 +12249,36 @@ func awsRestjson1_deserializeDocumentAppComponentCompliance(v **types.AppCompone return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AppComponentCompliance + var sv *types.AssessmentRiskRecommendation if *v == nil { - sv = &types.AppComponentCompliance{} + sv = &types.AssessmentRiskRecommendation{} } else { sv = *v } for key, value := range shape { switch key { - case "appComponentName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) - } - sv.AppComponentName = ptr.String(jtv) - } - - case "compliance": - if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.Compliance, value); err != nil { - return err - } - - case "cost": - if err := awsRestjson1_deserializeDocumentCost(&sv.Cost, value); err != nil { + case "appComponents": + if err := awsRestjson1_deserializeDocumentAppComponentNameList(&sv.AppComponents, value); err != nil { return err } - case "message": + case "recommendation": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.Message = ptr.String(jtv) - } - - case "resiliencyScore": - if err := awsRestjson1_deserializeDocumentResiliencyScore(&sv.ResiliencyScore, value); err != nil { - return err + sv.Recommendation = ptr.String(jtv) } - case "status": + case "risk": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.Status = types.ComplianceStatus(jtv) + sv.Risk = ptr.String(jtv) } default: @@ -10762,7 +12290,7 @@ func awsRestjson1_deserializeDocumentAppComponentCompliance(v **types.AppCompone return nil } -func awsRestjson1_deserializeDocumentAppComponentList(v *[]types.AppComponent, value interface{}) error { +func awsRestjson1_deserializeDocumentAssessmentRiskRecommendationList(v *[]types.AssessmentRiskRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10775,17 +12303,17 @@ func awsRestjson1_deserializeDocumentAppComponentList(v *[]types.AppComponent, v return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AppComponent + var cv []types.AssessmentRiskRecommendation if *v == nil { - cv = []types.AppComponent{} + cv = []types.AssessmentRiskRecommendation{} } else { cv = *v } for _, value := range shape { - var col types.AppComponent + var col types.AssessmentRiskRecommendation destAddr := &col - if err := awsRestjson1_deserializeDocumentAppComponent(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentAssessmentRiskRecommendation(&destAddr, value); err != nil { return err } col = *destAddr @@ -10796,7 +12324,52 @@ func awsRestjson1_deserializeDocumentAppComponentList(v *[]types.AppComponent, v return nil } -func awsRestjson1_deserializeDocumentAppComponentNameList(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentAssessmentSummary(v **types.AssessmentSummary, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.AssessmentSummary + if *v == nil { + sv = &types.AssessmentSummary{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "riskRecommendations": + if err := awsRestjson1_deserializeDocumentAssessmentRiskRecommendationList(&sv.RiskRecommendations, value); err != nil { + return err + } + + case "summary": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + } + sv.Summary = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntries(v *[]types.BatchUpdateRecommendationStatusFailedEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10809,22 +12382,20 @@ func awsRestjson1_deserializeDocumentAppComponentNameList(v *[]string, value int return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.BatchUpdateRecommendationStatusFailedEntry if *v == nil { - cv = []string{} + cv = []types.BatchUpdateRecommendationStatusFailedEntry{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) - } - col = jtv + var col types.BatchUpdateRecommendationStatusFailedEntry + destAddr := &col + if err := awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntry(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -10832,7 +12403,7 @@ func awsRestjson1_deserializeDocumentAppComponentNameList(v *[]string, value int return nil } -func awsRestjson1_deserializeDocumentAppInputSource(v **types.AppInputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntry(v **types.BatchUpdateRecommendationStatusFailedEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10845,63 +12416,31 @@ func awsRestjson1_deserializeDocumentAppInputSource(v **types.AppInputSource, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AppInputSource + var sv *types.BatchUpdateRecommendationStatusFailedEntry if *v == nil { - sv = &types.AppInputSource{} + sv = &types.BatchUpdateRecommendationStatusFailedEntry{} } else { sv = *v } for key, value := range shape { switch key { - case "eksSourceClusterNamespace": - if err := awsRestjson1_deserializeDocumentEksSourceClusterNamespace(&sv.EksSourceClusterNamespace, value); err != nil { - return err - } - - case "importType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceMappingType to be of type string, got %T instead", value) - } - sv.ImportType = types.ResourceMappingType(jtv) - } - - case "resourceCount": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Integer to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.ResourceCount = int32(i64) - } - - case "sourceArn": + case "entryId": 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 String255 to be of type string, got %T instead", value) } - sv.SourceArn = ptr.String(jtv) + sv.EntryId = ptr.String(jtv) } - case "sourceName": + case "errorMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - sv.SourceName = ptr.String(jtv) - } - - case "terraformSource": - if err := awsRestjson1_deserializeDocumentTerraformSource(&sv.TerraformSource, value); err != nil { - return err + sv.ErrorMessage = ptr.String(jtv) } default: @@ -10913,7 +12452,7 @@ func awsRestjson1_deserializeDocumentAppInputSource(v **types.AppInputSource, va return nil } -func awsRestjson1_deserializeDocumentAppInputSourceList(v *[]types.AppInputSource, value interface{}) error { +func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEntries(v *[]types.BatchUpdateRecommendationStatusSuccessfulEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10926,17 +12465,17 @@ func awsRestjson1_deserializeDocumentAppInputSourceList(v *[]types.AppInputSourc return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AppInputSource + var cv []types.BatchUpdateRecommendationStatusSuccessfulEntry if *v == nil { - cv = []types.AppInputSource{} + cv = []types.BatchUpdateRecommendationStatusSuccessfulEntry{} } else { cv = *v } for _, value := range shape { - var col types.AppInputSource + var col types.BatchUpdateRecommendationStatusSuccessfulEntry destAddr := &col - if err := awsRestjson1_deserializeDocumentAppInputSource(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEntry(&destAddr, value); err != nil { return err } col = *destAddr @@ -10947,7 +12486,7 @@ func awsRestjson1_deserializeDocumentAppInputSourceList(v *[]types.AppInputSourc return nil } -func awsRestjson1_deserializeDocumentAppSummary(v **types.AppSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEntry(v **types.BatchUpdateRecommendationStatusSuccessfulEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -10960,168 +12499,167 @@ func awsRestjson1_deserializeDocumentAppSummary(v **types.AppSummary, value inte return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AppSummary + var sv *types.BatchUpdateRecommendationStatusSuccessfulEntry if *v == nil { - sv = &types.AppSummary{} + sv = &types.BatchUpdateRecommendationStatusSuccessfulEntry{} } else { sv = *v } for key, value := range shape { switch key { - case "appArn": + case "entryId": 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 String255 to be of type string, got %T instead", value) } - sv.AppArn = ptr.String(jtv) + sv.EntryId = ptr.String(jtv) } - case "assessmentSchedule": + case "excluded": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(bool) if !ok { - return fmt.Errorf("expected AppAssessmentScheduleType to be of type string, got %T instead", value) + return fmt.Errorf("expected BooleanOptional to be of type *bool, got %T instead", value) } - sv.AssessmentSchedule = types.AppAssessmentScheduleType(jtv) + sv.Excluded = ptr.Bool(jtv) } - case "complianceStatus": + case "excludeReason": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AppComplianceStatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected ExcludeRecommendationReason to be of type string, got %T instead", value) } - sv.ComplianceStatus = types.AppComplianceStatusType(jtv) + sv.ExcludeReason = types.ExcludeRecommendationReason(jtv) } - case "creationTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + case "item": + if err := awsRestjson1_deserializeDocumentUpdateRecommendationStatusItem(&sv.Item, value); err != nil { + return err + } + case "referenceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SpecReferenceId to be of type string, got %T instead", value) } + sv.ReferenceId = ptr.String(jtv) } - case "description": + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentComplianceDrift(v **types.ComplianceDrift, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ComplianceDrift + if *v == nil { + sv = &types.ComplianceDrift{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "actualReferenceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value) + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.ActualReferenceId = ptr.String(jtv) } - case "driftStatus": + case "actualValue": + if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.ActualValue, value); err != nil { + return err + } + + case "appId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AppDriftStatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.DriftStatus = types.AppDriftStatusType(jtv) + sv.AppId = ptr.String(jtv) } - case "lastAppComplianceEvaluationTime": + case "appVersion": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastAppComplianceEvaluationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } + sv.AppVersion = ptr.String(jtv) } - case "name": + case "diffType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + return fmt.Errorf("expected DifferenceType to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.DiffType = types.DifferenceType(jtv) } - case "resiliencyScore": + case "driftType": if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.ResiliencyScore = 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.ResiliencyScore = f64 - - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) - + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DriftType to be of type string, got %T instead", value) } + sv.DriftType = types.DriftType(jtv) } - case "rpoInSecs": + case "entityId": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IntegerOptional to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.RpoInSecs = ptr.Int32(int32(i64)) + sv.EntityId = ptr.String(jtv) } - case "rtoInSecs": + case "entityType": if value != nil { - jtv, ok := value.(json.Number) + jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected IntegerOptional to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.RtoInSecs = ptr.Int32(int32(i64)) + sv.EntityType = ptr.String(jtv) } - case "status": + case "expectedReferenceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected AppStatusType to be of type string, got %T instead", value) + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.Status = types.AppStatusType(jtv) + sv.ExpectedReferenceId = ptr.String(jtv) + } + + case "expectedValue": + if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.ExpectedValue, value); err != nil { + return err } default: @@ -11133,7 +12671,7 @@ func awsRestjson1_deserializeDocumentAppSummary(v **types.AppSummary, value inte return nil } -func awsRestjson1_deserializeDocumentAppSummaryList(v *[]types.AppSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentComplianceDriftList(v *[]types.ComplianceDrift, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11146,17 +12684,17 @@ func awsRestjson1_deserializeDocumentAppSummaryList(v *[]types.AppSummary, value return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AppSummary + var cv []types.ComplianceDrift if *v == nil { - cv = []types.AppSummary{} + cv = []types.ComplianceDrift{} } else { cv = *v } for _, value := range shape { - var col types.AppSummary + var col types.ComplianceDrift destAddr := &col - if err := awsRestjson1_deserializeDocumentAppSummary(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentComplianceDrift(&destAddr, value); err != nil { return err } col = *destAddr @@ -11167,7 +12705,7 @@ func awsRestjson1_deserializeDocumentAppSummaryList(v *[]types.AppSummary, value return nil } -func awsRestjson1_deserializeDocumentAppVersionList(v *[]types.AppVersionSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentComponentCompliancesList(v *[]types.AppComponentCompliance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11180,17 +12718,17 @@ func awsRestjson1_deserializeDocumentAppVersionList(v *[]types.AppVersionSummary return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.AppVersionSummary + var cv []types.AppComponentCompliance if *v == nil { - cv = []types.AppVersionSummary{} + cv = []types.AppComponentCompliance{} } else { cv = *v } for _, value := range shape { - var col types.AppVersionSummary + var col types.AppComponentCompliance destAddr := &col - if err := awsRestjson1_deserializeDocumentAppVersionSummary(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentAppComponentCompliance(&destAddr, value); err != nil { return err } col = *destAddr @@ -11201,7 +12739,7 @@ func awsRestjson1_deserializeDocumentAppVersionList(v *[]types.AppVersionSummary return nil } -func awsRestjson1_deserializeDocumentAppVersionSummary(v **types.AppVersionSummary, value interface{}) error { +func awsRestjson1_deserializeDocumentComponentRecommendation(v **types.ComponentRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11214,60 +12752,36 @@ func awsRestjson1_deserializeDocumentAppVersionSummary(v **types.AppVersionSumma return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.AppVersionSummary + var sv *types.ComponentRecommendation if *v == nil { - sv = &types.AppVersionSummary{} + sv = &types.ComponentRecommendation{} } else { sv = *v } for key, value := range shape { switch key { - case "appVersion": + case "appComponentName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) - } - sv.AppVersion = ptr.String(jtv) - } - - case "creationTime": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) - + return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) } + sv.AppComponentName = ptr.String(jtv) } - case "identifier": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected LongOptional to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.Identifier = ptr.Int64(i64) + case "configRecommendations": + if err := awsRestjson1_deserializeDocumentConfigRecommendationList(&sv.ConfigRecommendations, value); err != nil { + return err } - case "versionName": + case "recommendationStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityVersion to be of type string, got %T instead", value) + return fmt.Errorf("expected RecommendationComplianceStatus to be of type string, got %T instead", value) } - sv.VersionName = ptr.String(jtv) + sv.RecommendationStatus = types.RecommendationComplianceStatus(jtv) } default: @@ -11279,7 +12793,7 @@ func awsRestjson1_deserializeDocumentAppVersionSummary(v **types.AppVersionSumma return nil } -func awsRestjson1_deserializeDocumentArnList(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentComponentRecommendationList(v *[]types.ComponentRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11292,22 +12806,20 @@ func awsRestjson1_deserializeDocumentArnList(v *[]string, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var cv []types.ComponentRecommendation if *v == nil { - cv = []string{} + cv = []types.ComponentRecommendation{} } else { cv = *v } for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Arn to be of type string, got %T instead", value) - } - col = jtv + var col types.ComponentRecommendation + destAddr := &col + if err := awsRestjson1_deserializeDocumentComponentRecommendation(&destAddr, value); err != nil { + return err } + col = *destAddr cv = append(cv, col) } @@ -11315,7 +12827,7 @@ func awsRestjson1_deserializeDocumentArnList(v *[]string, value interface{}) err return nil } -func awsRestjson1_deserializeDocumentAssessmentCompliance(v *map[string]types.DisruptionCompliance, value interface{}) error { +func awsRestjson1_deserializeDocumentConfigRecommendation(v **types.ConfigRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11328,29 +12840,99 @@ func awsRestjson1_deserializeDocumentAssessmentCompliance(v *map[string]types.Di return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]types.DisruptionCompliance + var sv *types.ConfigRecommendation if *v == nil { - mv = map[string]types.DisruptionCompliance{} + sv = &types.ConfigRecommendation{} } else { - mv = *v + sv = *v } for key, value := range shape { - var parsedVal types.DisruptionCompliance - mapVar := parsedVal - destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentDisruptionCompliance(&destAddr, value); err != nil { - return err - } - parsedVal = *destAddr - mv[key] = parsedVal + switch key { + case "appComponentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) + } + sv.AppComponentName = ptr.String(jtv) + } + + case "compliance": + if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.Compliance, value); err != nil { + return err + } + + case "cost": + if err := awsRestjson1_deserializeDocumentCost(&sv.Cost, value); err != nil { + return err + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "haArchitecture": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected HaArchitecture to be of type string, got %T instead", value) + } + sv.HaArchitecture = types.HaArchitecture(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "optimizationType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ConfigRecommendationOptimizationType to be of type string, got %T instead", value) + } + sv.OptimizationType = types.ConfigRecommendationOptimizationType(jtv) + } + + case "recommendationCompliance": + if err := awsRestjson1_deserializeDocumentRecommendationCompliance(&sv.RecommendationCompliance, value); err != nil { + return err + } + + case "referenceId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SpecReferenceId to be of type string, got %T instead", value) + } + sv.ReferenceId = ptr.String(jtv) + } + + case "suggestedChanges": + if err := awsRestjson1_deserializeDocumentSuggestedChangesList(&sv.SuggestedChanges, value); err != nil { + return err + } + default: + _, _ = key, value + + } } - *v = mv + *v = sv return nil } -func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntries(v *[]types.BatchUpdateRecommendationStatusFailedEntry, value interface{}) error { +func awsRestjson1_deserializeDocumentConfigRecommendationList(v *[]types.ConfigRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11363,17 +12945,17 @@ func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntrie return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.BatchUpdateRecommendationStatusFailedEntry + var cv []types.ConfigRecommendation if *v == nil { - cv = []types.BatchUpdateRecommendationStatusFailedEntry{} + cv = []types.ConfigRecommendation{} } else { cv = *v } for _, value := range shape { - var col types.BatchUpdateRecommendationStatusFailedEntry + var col types.ConfigRecommendation destAddr := &col - if err := awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntry(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentConfigRecommendation(&destAddr, value); err != nil { return err } col = *destAddr @@ -11384,7 +12966,7 @@ func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntrie return nil } -func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntry(v **types.BatchUpdateRecommendationStatusFailedEntry, value interface{}) error { +func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11397,31 +12979,40 @@ func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntry( return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.BatchUpdateRecommendationStatusFailedEntry + var sv *types.ConflictException if *v == nil { - sv = &types.BatchUpdateRecommendationStatusFailedEntry{} + sv = &types.ConflictException{} } else { sv = *v } for key, value := range shape { switch key { - case "entryId": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) } - sv.EntryId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "errorMessage": + case "resourceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) } - sv.ErrorMessage = ptr.String(jtv) + sv.ResourceId = ptr.String(jtv) + } + + case "resourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) } default: @@ -11433,7 +13024,7 @@ func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusFailedEntry( return nil } -func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEntries(v *[]types.BatchUpdateRecommendationStatusSuccessfulEntry, value interface{}) error { +func awsRestjson1_deserializeDocumentCost(v **types.Cost, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11441,93 +13032,70 @@ func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEn 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.BatchUpdateRecommendationStatusSuccessfulEntry + var sv *types.Cost if *v == nil { - cv = []types.BatchUpdateRecommendationStatusSuccessfulEntry{} + sv = &types.Cost{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col types.BatchUpdateRecommendationStatusSuccessfulEntry - destAddr := &col - if err := awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEntry(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) + for key, value := range shape { + switch key { + case "amount": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Amount = f64 - } - *v = cv - return nil -} + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() + + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) -func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEntry(v **types.BatchUpdateRecommendationStatusSuccessfulEntry, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) - var sv *types.BatchUpdateRecommendationStatusSuccessfulEntry - if *v == nil { - sv = &types.BatchUpdateRecommendationStatusSuccessfulEntry{} - } else { - sv = *v - } + } + sv.Amount = f64 - for key, value := range shape { - switch key { - case "entryId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) - } - sv.EntryId = ptr.String(jtv) - } + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) - case "excluded": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected BooleanOptional to be of type *bool, got %T instead", value) } - sv.Excluded = ptr.Bool(jtv) } - case "excludeReason": + case "currency": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ExcludeRecommendationReason to be of type string, got %T instead", value) + return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) } - sv.ExcludeReason = types.ExcludeRecommendationReason(jtv) - } - - case "item": - if err := awsRestjson1_deserializeDocumentUpdateRecommendationStatusItem(&sv.Item, value); err != nil { - return err + sv.Currency = ptr.String(jtv) } - case "referenceId": + case "frequency": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SpecReferenceId to be of type string, got %T instead", value) + return fmt.Errorf("expected CostFrequency to be of type string, got %T instead", value) } - sv.ReferenceId = ptr.String(jtv) + sv.Frequency = types.CostFrequency(jtv) } default: @@ -11539,7 +13107,7 @@ func awsRestjson1_deserializeDocumentBatchUpdateRecommendationStatusSuccessfulEn return nil } -func awsRestjson1_deserializeDocumentComplianceDrift(v **types.ComplianceDrift, value interface{}) error { +func awsRestjson1_deserializeDocumentDisruptionCompliance(v **types.DisruptionCompliance, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11552,217 +13120,119 @@ func awsRestjson1_deserializeDocumentComplianceDrift(v **types.ComplianceDrift, return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ComplianceDrift + var sv *types.DisruptionCompliance if *v == nil { - sv = &types.ComplianceDrift{} + sv = &types.DisruptionCompliance{} } else { sv = *v } for key, value := range shape { switch key { - case "actualReferenceId": + case "achievableRpoInSecs": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) } - sv.ActualReferenceId = ptr.String(jtv) - } - - case "actualValue": - if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.ActualValue, value); err != nil { - return err + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AchievableRpoInSecs = int32(i64) } - case "appId": + case "achievableRtoInSecs": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) } - sv.AppId = ptr.String(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.AchievableRtoInSecs = int32(i64) } - case "appVersion": + case "complianceStatus": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) } - sv.AppVersion = ptr.String(jtv) + sv.ComplianceStatus = types.ComplianceStatus(jtv) } - case "diffType": + case "currentRpoInSecs": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected DifferenceType to be of type string, got %T instead", value) + return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) } - sv.DiffType = types.DifferenceType(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CurrentRpoInSecs = int32(i64) } - case "driftType": + case "currentRtoInSecs": if value != nil { - jtv, ok := value.(string) + jtv, ok := value.(json.Number) if !ok { - return fmt.Errorf("expected DriftType to be of type string, got %T instead", value) + return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) } - sv.DriftType = types.DriftType(jtv) + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.CurrentRtoInSecs = int32(i64) } - case "entityId": + case "message": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) } - sv.EntityId = ptr.String(jtv) + sv.Message = ptr.String(jtv) } - case "entityType": + case "rpoDescription": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) } - sv.EntityType = ptr.String(jtv) + sv.RpoDescription = ptr.String(jtv) } - case "expectedReferenceId": + case "rpoReferenceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) } - sv.ExpectedReferenceId = ptr.String(jtv) - } - - case "expectedValue": - if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.ExpectedValue, value); err != nil { - return err + sv.RpoReferenceId = ptr.String(jtv) } - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsRestjson1_deserializeDocumentComplianceDriftList(v *[]types.ComplianceDrift, 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.ComplianceDrift - if *v == nil { - cv = []types.ComplianceDrift{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ComplianceDrift - destAddr := &col - if err := awsRestjson1_deserializeDocumentComplianceDrift(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentComponentCompliancesList(v *[]types.AppComponentCompliance, 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.AppComponentCompliance - if *v == nil { - cv = []types.AppComponentCompliance{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.AppComponentCompliance - destAddr := &col - if err := awsRestjson1_deserializeDocumentAppComponentCompliance(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsRestjson1_deserializeDocumentComponentRecommendation(v **types.ComponentRecommendation, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ComponentRecommendation - if *v == nil { - sv = &types.ComponentRecommendation{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "appComponentName": + case "rtoDescription": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) } - sv.AppComponentName = ptr.String(jtv) - } - - case "configRecommendations": - if err := awsRestjson1_deserializeDocumentConfigRecommendationList(&sv.ConfigRecommendations, value); err != nil { - return err + sv.RtoDescription = ptr.String(jtv) } - case "recommendationStatus": + case "rtoReferenceId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RecommendationComplianceStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected String500 to be of type string, got %T instead", value) } - sv.RecommendationStatus = types.RecommendationComplianceStatus(jtv) + sv.RtoReferenceId = ptr.String(jtv) } default: @@ -11774,7 +13244,7 @@ func awsRestjson1_deserializeDocumentComponentRecommendation(v **types.Component return nil } -func awsRestjson1_deserializeDocumentComponentRecommendationList(v *[]types.ComponentRecommendation, value interface{}) error { +func awsRestjson1_deserializeDocumentDisruptionPolicy(v *map[string]types.FailurePolicy, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11782,33 +13252,34 @@ func awsRestjson1_deserializeDocumentComponentRecommendationList(v *[]types.Comp 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.ComponentRecommendation + var mv map[string]types.FailurePolicy if *v == nil { - cv = []types.ComponentRecommendation{} + mv = map[string]types.FailurePolicy{} } else { - cv = *v + mv = *v } - for _, value := range shape { - var col types.ComponentRecommendation - destAddr := &col - if err := awsRestjson1_deserializeDocumentComponentRecommendation(&destAddr, value); err != nil { + for key, value := range shape { + var parsedVal types.FailurePolicy + mapVar := parsedVal + destAddr := &mapVar + if err := awsRestjson1_deserializeDocumentFailurePolicy(&destAddr, value); err != nil { return err } - col = *destAddr - cv = append(cv, col) + parsedVal = *destAddr + mv[key] = parsedVal } - *v = cv + *v = mv return nil } -func awsRestjson1_deserializeDocumentConfigRecommendation(v **types.ConfigRecommendation, value interface{}) error { +func awsRestjson1_deserializeDocumentDisruptionResiliencyScore(v *map[string]float64, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11821,99 +13292,55 @@ func awsRestjson1_deserializeDocumentConfigRecommendation(v **types.ConfigRecomm return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConfigRecommendation + var mv map[string]float64 if *v == nil { - sv = &types.ConfigRecommendation{} + mv = map[string]float64{} } else { - sv = *v + mv = *v } for key, value := range shape { - switch key { - case "appComponentName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityId to be of type string, got %T instead", value) + var parsedVal float64 + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err } - sv.AppComponentName = ptr.String(jtv) - } - - case "compliance": - if err := awsRestjson1_deserializeDocumentAssessmentCompliance(&sv.Compliance, value); err != nil { - return err - } + parsedVal = f64 - case "cost": - if err := awsRestjson1_deserializeDocumentCost(&sv.Cost, value); err != nil { - return err - } + case string: + var f64 float64 + switch { + case strings.EqualFold(jtv, "NaN"): + f64 = math.NaN() - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } + case strings.EqualFold(jtv, "Infinity"): + f64 = math.Inf(1) - case "haArchitecture": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected HaArchitecture to be of type string, got %T instead", value) - } - sv.HaArchitecture = types.HaArchitecture(jtv) - } + case strings.EqualFold(jtv, "-Infinity"): + f64 = math.Inf(-1) - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EntityName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } + default: + return fmt.Errorf("unknown JSON number value: %s", jtv) - case "optimizationType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ConfigRecommendationOptimizationType to be of type string, got %T instead", value) } - sv.OptimizationType = types.ConfigRecommendationOptimizationType(jtv) - } - - case "recommendationCompliance": - if err := awsRestjson1_deserializeDocumentRecommendationCompliance(&sv.RecommendationCompliance, value); err != nil { - return err - } + parsedVal = f64 - case "referenceId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SpecReferenceId to be of type string, got %T instead", value) - } - sv.ReferenceId = ptr.String(jtv) - } + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) - case "suggestedChanges": - if err := awsRestjson1_deserializeDocumentSuggestedChangesList(&sv.SuggestedChanges, value); err != nil { - return err } - - default: - _, _ = key, value - } + mv[key] = parsedVal + } - *v = sv + *v = mv return nil } -func awsRestjson1_deserializeDocumentConfigRecommendationList(v *[]types.ConfigRecommendation, value interface{}) error { +func awsRestjson1_deserializeDocumentEksNamespaceList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11926,20 +13353,22 @@ func awsRestjson1_deserializeDocumentConfigRecommendationList(v *[]types.ConfigR return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.ConfigRecommendation + var cv []string if *v == nil { - cv = []types.ConfigRecommendation{} + cv = []string{} } else { cv = *v } for _, value := range shape { - var col types.ConfigRecommendation - destAddr := &col - if err := awsRestjson1_deserializeDocumentConfigRecommendation(&destAddr, value); err != nil { - return err + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EksNamespace to be of type string, got %T instead", value) + } + col = jtv } - col = *destAddr cv = append(cv, col) } @@ -11947,7 +13376,7 @@ func awsRestjson1_deserializeDocumentConfigRecommendationList(v *[]types.ConfigR return nil } -func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictException, value interface{}) error { +func awsRestjson1_deserializeDocumentEksSource(v **types.EksSource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -11960,40 +13389,27 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.ConflictException + var sv *types.EksSource if *v == nil { - sv = &types.ConflictException{} + sv = &types.EksSource{} } else { sv = *v } for key, value := range shape { switch key { - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - case "resourceId": + case "eksClusterArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.ResourceId = ptr.String(jtv) + sv.EksClusterArn = ptr.String(jtv) } - case "resourceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ResourceType to be of type string, got %T instead", value) - } - sv.ResourceType = ptr.String(jtv) + case "namespaces": + if err := awsRestjson1_deserializeDocumentEksNamespaceList(&sv.Namespaces, value); err != nil { + return err } default: @@ -12005,7 +13421,7 @@ func awsRestjson1_deserializeDocumentConflictException(v **types.ConflictExcepti return nil } -func awsRestjson1_deserializeDocumentCost(v **types.Cost, value interface{}) error { +func awsRestjson1_deserializeDocumentEksSourceClusterNamespace(v **types.EksSourceClusterNamespace, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12018,77 +13434,77 @@ func awsRestjson1_deserializeDocumentCost(v **types.Cost, value interface{}) err return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.Cost + var sv *types.EksSourceClusterNamespace if *v == nil { - sv = &types.Cost{} + sv = &types.EksSourceClusterNamespace{} } else { sv = *v } for key, value := range shape { switch key { - case "amount": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.Amount = 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.Amount = f64 - - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) - - } - } - - case "currency": + case "eksClusterArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CurrencyCode to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.Currency = ptr.String(jtv) + sv.EksClusterArn = ptr.String(jtv) } - case "frequency": + case "namespace": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected CostFrequency to be of type string, got %T instead", value) + return fmt.Errorf("expected EksNamespace to be of type string, got %T instead", value) } - sv.Frequency = types.CostFrequency(jtv) + sv.Namespace = ptr.String(jtv) } - default: - _, _ = key, value + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentEksSourceList(v *[]types.EksSource, 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.EksSource + if *v == nil { + cv = []types.EksSource{} + } else { + cv = *v + } + for _, value := range shape { + var col types.EksSource + destAddr := &col + if err := awsRestjson1_deserializeDocumentEksSource(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } -func awsRestjson1_deserializeDocumentDisruptionCompliance(v **types.DisruptionCompliance, value interface{}) error { +func awsRestjson1_deserializeDocumentEventSubscription(v **types.EventSubscription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12101,119 +13517,40 @@ func awsRestjson1_deserializeDocumentDisruptionCompliance(v **types.DisruptionCo return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.DisruptionCompliance + var sv *types.EventSubscription if *v == nil { - sv = &types.DisruptionCompliance{} + sv = &types.EventSubscription{} } else { sv = *v } for key, value := range shape { switch key { - case "achievableRpoInSecs": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.AchievableRpoInSecs = int32(i64) - } - - case "achievableRtoInSecs": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.AchievableRtoInSecs = int32(i64) - } - - case "complianceStatus": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ComplianceStatus to be of type string, got %T instead", value) - } - sv.ComplianceStatus = types.ComplianceStatus(jtv) - } - - case "currentRpoInSecs": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.CurrentRpoInSecs = int32(i64) - } - - case "currentRtoInSecs": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.CurrentRtoInSecs = int32(i64) - } - - case "message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - case "rpoDescription": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) - } - sv.RpoDescription = ptr.String(jtv) - } - - case "rpoReferenceId": + case "eventType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + return fmt.Errorf("expected EventType to be of type string, got %T instead", value) } - sv.RpoReferenceId = ptr.String(jtv) + sv.EventType = types.EventType(jtv) } - case "rtoDescription": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.RtoDescription = ptr.String(jtv) + sv.Name = ptr.String(jtv) } - case "rtoReferenceId": + case "snsTopicArn": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String500 to be of type string, got %T instead", value) + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) } - sv.RtoReferenceId = ptr.String(jtv) + sv.SnsTopicArn = ptr.String(jtv) } default: @@ -12225,7 +13562,7 @@ func awsRestjson1_deserializeDocumentDisruptionCompliance(v **types.DisruptionCo return nil } -func awsRestjson1_deserializeDocumentDisruptionPolicy(v *map[string]types.FailurePolicy, value interface{}) error { +func awsRestjson1_deserializeDocumentEventSubscriptionList(v *[]types.EventSubscription, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12233,34 +13570,33 @@ func awsRestjson1_deserializeDocumentDisruptionPolicy(v *map[string]types.Failur return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]types.FailurePolicy + var cv []types.EventSubscription if *v == nil { - mv = map[string]types.FailurePolicy{} + cv = []types.EventSubscription{} } else { - mv = *v + cv = *v } - for key, value := range shape { - var parsedVal types.FailurePolicy - mapVar := parsedVal - destAddr := &mapVar - if err := awsRestjson1_deserializeDocumentFailurePolicy(&destAddr, value); err != nil { + for _, value := range shape { + var col types.EventSubscription + destAddr := &col + if err := awsRestjson1_deserializeDocumentEventSubscription(&destAddr, value); err != nil { return err } - parsedVal = *destAddr - mv[key] = parsedVal + col = *destAddr + cv = append(cv, col) } - *v = mv + *v = cv return nil } -func awsRestjson1_deserializeDocumentDisruptionResiliencyScore(v *map[string]float64, value interface{}) error { +func awsRestjson1_deserializeDocumentFailedGroupingRecommendationEntries(v *[]types.FailedGroupingRecommendationEntry, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12268,60 +13604,82 @@ func awsRestjson1_deserializeDocumentDisruptionResiliencyScore(v *map[string]flo return nil } - shape, ok := value.(map[string]interface{}) + shape, ok := value.([]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var mv map[string]float64 + var cv []types.FailedGroupingRecommendationEntry if *v == nil { - mv = map[string]float64{} + cv = []types.FailedGroupingRecommendationEntry{} } else { - mv = *v + cv = *v } - for key, value := range shape { - var parsedVal float64 - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - parsedVal = f64 + for _, value := range shape { + var col types.FailedGroupingRecommendationEntry + destAddr := &col + if err := awsRestjson1_deserializeDocumentFailedGroupingRecommendationEntry(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) - case string: - var f64 float64 - switch { - case strings.EqualFold(jtv, "NaN"): - f64 = math.NaN() + } + *v = cv + return nil +} - case strings.EqualFold(jtv, "Infinity"): - f64 = math.Inf(1) +func awsRestjson1_deserializeDocumentFailedGroupingRecommendationEntry(v **types.FailedGroupingRecommendationEntry, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } - case strings.EqualFold(jtv, "-Infinity"): - f64 = math.Inf(-1) + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } - default: - return fmt.Errorf("unknown JSON number value: %s", jtv) + var sv *types.FailedGroupingRecommendationEntry + if *v == nil { + sv = &types.FailedGroupingRecommendationEntry{} + } else { + sv = *v + } + for key, value := range shape { + switch key { + case "errorMessage": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ErrorMessage to be of type string, got %T instead", value) } - parsedVal = f64 - - default: - return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + sv.ErrorMessage = ptr.String(jtv) + } + case "groupingRecommendationId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.GroupingRecommendationId = ptr.String(jtv) } - } - mv[key] = parsedVal + default: + _, _ = key, value + + } } - *v = mv + *v = sv return nil } -func awsRestjson1_deserializeDocumentEksNamespaceList(v *[]string, value interface{}) error { +func awsRestjson1_deserializeDocumentFailurePolicy(v **types.FailurePolicy, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12329,35 +13687,56 @@ func awsRestjson1_deserializeDocumentEksNamespaceList(v *[]string, value interfa return nil } - shape, ok := value.([]interface{}) + shape, ok := value.(map[string]interface{}) if !ok { return fmt.Errorf("unexpected JSON type %v", value) } - var cv []string + var sv *types.FailurePolicy if *v == nil { - cv = []string{} + sv = &types.FailurePolicy{} } else { - cv = *v + sv = *v } - for _, value := range shape { - var col string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EksNamespace to be of type string, got %T instead", value) + for key, value := range shape { + switch key { + case "rpoInSecs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RpoInSecs = int32(i64) + } + + case "rtoInSecs": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.RtoInSecs = int32(i64) } - col = jtv - } - cv = append(cv, col) + default: + _, _ = key, value + + } } - *v = cv + *v = sv return nil } -func awsRestjson1_deserializeDocumentEksSource(v **types.EksSource, value interface{}) error { +func awsRestjson1_deserializeDocumentGroupingAppComponent(v **types.GroupingAppComponent, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12370,27 +13749,40 @@ func awsRestjson1_deserializeDocumentEksSource(v **types.EksSource, value interf return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EksSource + var sv *types.GroupingAppComponent if *v == nil { - sv = &types.EksSource{} + sv = &types.GroupingAppComponent{} } else { sv = *v } for key, value := range shape { switch key { - case "eksClusterArn": + case "appComponentId": 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 EntityName255 to be of type string, got %T instead", value) } - sv.EksClusterArn = ptr.String(jtv) + sv.AppComponentId = ptr.String(jtv) } - case "namespaces": - if err := awsRestjson1_deserializeDocumentEksNamespaceList(&sv.Namespaces, value); err != nil { - return err + case "appComponentName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected EntityName255 to be of type string, got %T instead", value) + } + sv.AppComponentName = ptr.String(jtv) + } + + case "appComponentType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + sv.AppComponentType = ptr.String(jtv) } default: @@ -12402,7 +13794,7 @@ func awsRestjson1_deserializeDocumentEksSource(v **types.EksSource, value interf return nil } -func awsRestjson1_deserializeDocumentEksSourceClusterNamespace(v **types.EksSourceClusterNamespace, value interface{}) error { +func awsRestjson1_deserializeDocumentGroupingRecommendation(v **types.GroupingRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12415,31 +13807,114 @@ func awsRestjson1_deserializeDocumentEksSourceClusterNamespace(v **types.EksSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EksSourceClusterNamespace + var sv *types.GroupingRecommendation if *v == nil { - sv = &types.EksSourceClusterNamespace{} + sv = &types.GroupingRecommendation{} } else { sv = *v } for key, value := range shape { switch key { - case "eksClusterArn": + case "confidenceLevel": 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 GroupingRecommendationConfidenceLevel to be of type string, got %T instead", value) } - sv.EksClusterArn = ptr.String(jtv) + sv.ConfidenceLevel = types.GroupingRecommendationConfidenceLevel(jtv) } - case "namespace": + case "creationTime": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.CreationTime = ptr.Time(smithytime.ParseEpochSeconds(f64)) + + default: + return fmt.Errorf("expected TimeStamp to be a JSON Number, got %T instead", value) + + } + } + + case "groupingAppComponent": + if err := awsRestjson1_deserializeDocumentGroupingAppComponent(&sv.GroupingAppComponent, value); err != nil { + return err + } + + case "groupingRecommendationId": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected EksNamespace to be of type string, got %T instead", value) + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.Namespace = ptr.String(jtv) + sv.GroupingRecommendationId = ptr.String(jtv) + } + + case "recommendationReasons": + if err := awsRestjson1_deserializeDocumentString255List(&sv.RecommendationReasons, value); err != nil { + return err + } + + case "rejectionReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GroupingRecommendationRejectionReason to be of type string, got %T instead", value) + } + sv.RejectionReason = types.GroupingRecommendationRejectionReason(jtv) + } + + case "resources": + if err := awsRestjson1_deserializeDocumentGroupingResourceList(&sv.Resources, value); err != nil { + return err + } + + case "score": + if value != nil { + switch jtv := value.(type) { + case json.Number: + f64, err := jtv.Float64() + if err != nil { + return err + } + sv.Score = 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.Score = f64 + + default: + return fmt.Errorf("expected Double to be a JSON Number, got %T instead", value) + + } + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected GroupingRecommendationStatusType to be of type string, got %T instead", value) + } + sv.Status = types.GroupingRecommendationStatusType(jtv) } default: @@ -12451,7 +13926,7 @@ func awsRestjson1_deserializeDocumentEksSourceClusterNamespace(v **types.EksSour return nil } -func awsRestjson1_deserializeDocumentEksSourceList(v *[]types.EksSource, value interface{}) error { +func awsRestjson1_deserializeDocumentGroupingRecommendationList(v *[]types.GroupingRecommendation, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12464,17 +13939,17 @@ func awsRestjson1_deserializeDocumentEksSourceList(v *[]types.EksSource, value i return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EksSource + var cv []types.GroupingRecommendation if *v == nil { - cv = []types.EksSource{} + cv = []types.GroupingRecommendation{} } else { cv = *v } for _, value := range shape { - var col types.EksSource + var col types.GroupingRecommendation destAddr := &col - if err := awsRestjson1_deserializeDocumentEksSource(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentGroupingRecommendation(&destAddr, value); err != nil { return err } col = *destAddr @@ -12485,7 +13960,7 @@ func awsRestjson1_deserializeDocumentEksSourceList(v *[]types.EksSource, value i return nil } -func awsRestjson1_deserializeDocumentEventSubscription(v **types.EventSubscription, value interface{}) error { +func awsRestjson1_deserializeDocumentGroupingResource(v **types.GroupingResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12498,40 +13973,46 @@ func awsRestjson1_deserializeDocumentEventSubscription(v **types.EventSubscripti return fmt.Errorf("unexpected JSON type %v", value) } - var sv *types.EventSubscription + var sv *types.GroupingResource if *v == nil { - sv = &types.EventSubscription{} + sv = &types.GroupingResource{} } else { sv = *v } for key, value := range shape { switch key { - case "eventType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected EventType to be of type string, got %T instead", value) - } - sv.EventType = types.EventType(jtv) + case "logicalResourceId": + if err := awsRestjson1_deserializeDocumentLogicalResourceId(&sv.LogicalResourceId, value); err != nil { + return err } - case "name": + case "physicalResourceId": + if err := awsRestjson1_deserializeDocumentPhysicalResourceId(&sv.PhysicalResourceId, value); err != nil { + return err + } + + case "resourceName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String255 to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.ResourceName = ptr.String(jtv) } - case "snsTopicArn": + case "resourceType": 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 String255 to be of type string, got %T instead", value) } - sv.SnsTopicArn = ptr.String(jtv) + sv.ResourceType = ptr.String(jtv) + } + + case "sourceAppComponentIds": + if err := awsRestjson1_deserializeDocumentString255List(&sv.SourceAppComponentIds, value); err != nil { + return err } default: @@ -12543,7 +14024,7 @@ func awsRestjson1_deserializeDocumentEventSubscription(v **types.EventSubscripti return nil } -func awsRestjson1_deserializeDocumentEventSubscriptionList(v *[]types.EventSubscription, value interface{}) error { +func awsRestjson1_deserializeDocumentGroupingResourceList(v *[]types.GroupingResource, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -12556,17 +14037,17 @@ func awsRestjson1_deserializeDocumentEventSubscriptionList(v *[]types.EventSubsc return fmt.Errorf("unexpected JSON type %v", value) } - var cv []types.EventSubscription + var cv []types.GroupingResource if *v == nil { - cv = []types.EventSubscription{} + cv = []types.GroupingResource{} } else { cv = *v } for _, value := range shape { - var col types.EventSubscription + var col types.GroupingResource destAddr := &col - if err := awsRestjson1_deserializeDocumentEventSubscription(&destAddr, value); err != nil { + if err := awsRestjson1_deserializeDocumentGroupingResource(&destAddr, value); err != nil { return err } col = *destAddr @@ -12577,63 +14058,6 @@ func awsRestjson1_deserializeDocumentEventSubscriptionList(v *[]types.EventSubsc return nil } -func awsRestjson1_deserializeDocumentFailurePolicy(v **types.FailurePolicy, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.FailurePolicy - if *v == nil { - sv = &types.FailurePolicy{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "rpoInSecs": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.RpoInSecs = int32(i64) - } - - case "rtoInSecs": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected Seconds to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.RtoInSecs = int32(i64) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - func awsRestjson1_deserializeDocumentIamRoleArnList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -14626,6 +16050,42 @@ func awsRestjson1_deserializeDocumentSopRecommendationList(v *[]types.SopRecomme return nil } +func awsRestjson1_deserializeDocumentString255List(v *[]string, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.([]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var cv []string + if *v == nil { + cv = []string{} + } else { + cv = *v + } + + for _, value := range shape { + var col string + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String255 to be of type string, got %T instead", value) + } + col = jtv + } + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentSuggestedChangesList(v *[]string, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/resiliencehub/generated.json b/service/resiliencehub/generated.json index 83fc6827767..f2bf77eca6f 100644 --- a/service/resiliencehub/generated.json +++ b/service/resiliencehub/generated.json @@ -8,6 +8,7 @@ "files": [ "api_client.go", "api_client_test.go", + "api_op_AcceptResourceGroupingRecommendations.go", "api_op_AddDraftAppVersionResourceMappings.go", "api_op_BatchUpdateRecommendationStatus.go", "api_op_CreateApp.go", @@ -31,6 +32,7 @@ "api_op_DescribeAppVersionTemplate.go", "api_op_DescribeDraftAppVersionResourcesImportStatus.go", "api_op_DescribeResiliencyPolicy.go", + "api_op_DescribeResourceGroupingRecommendationTask.go", "api_op_ImportResourcesToDraftAppVersion.go", "api_op_ListAlarmRecommendations.go", "api_op_ListAppAssessmentComplianceDrifts.go", @@ -46,6 +48,7 @@ "api_op_ListApps.go", "api_op_ListRecommendationTemplates.go", "api_op_ListResiliencyPolicies.go", + "api_op_ListResourceGroupingRecommendations.go", "api_op_ListSopRecommendations.go", "api_op_ListSuggestedResiliencyPolicies.go", "api_op_ListTagsForResource.go", @@ -53,9 +56,11 @@ "api_op_ListUnsupportedAppVersionResources.go", "api_op_PublishAppVersion.go", "api_op_PutDraftAppVersionTemplate.go", + "api_op_RejectResourceGroupingRecommendations.go", "api_op_RemoveDraftAppVersionResourceMappings.go", "api_op_ResolveAppVersionResources.go", "api_op_StartAppAssessment.go", + "api_op_StartResourceGroupingRecommendationTask.go", "api_op_TagResource.go", "api_op_UntagResource.go", "api_op_UpdateApp.go", diff --git a/service/resiliencehub/serializers.go b/service/resiliencehub/serializers.go index 5fcef2a8916..3a0c697044f 100644 --- a/service/resiliencehub/serializers.go +++ b/service/resiliencehub/serializers.go @@ -15,6 +15,88 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) +type awsRestjson1_serializeOpAcceptResourceGroupingRecommendations struct { +} + +func (*awsRestjson1_serializeOpAcceptResourceGroupingRecommendations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpAcceptResourceGroupingRecommendations) 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.(*AcceptResourceGroupingRecommendationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/accept-resource-grouping-recommendations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentAcceptResourceGroupingRecommendationsInput(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_serializeOpHttpBindingsAcceptResourceGroupingRecommendationsInput(v *AcceptResourceGroupingRecommendationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentAcceptResourceGroupingRecommendationsInput(v *AcceptResourceGroupingRecommendationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppArn != nil { + ok := object.Key("appArn") + ok.String(*v.AppArn) + } + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsRestjson1_serializeDocumentAcceptGroupingRecommendationEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpAddDraftAppVersionResourceMappings struct { } @@ -2101,6 +2183,86 @@ func awsRestjson1_serializeOpDocumentDescribeResiliencyPolicyInput(v *DescribeRe return nil } +type awsRestjson1_serializeOpDescribeResourceGroupingRecommendationTask struct { +} + +func (*awsRestjson1_serializeOpDescribeResourceGroupingRecommendationTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDescribeResourceGroupingRecommendationTask) 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.(*DescribeResourceGroupingRecommendationTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/describe-resource-grouping-recommendation-task") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentDescribeResourceGroupingRecommendationTaskInput(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_serializeOpHttpBindingsDescribeResourceGroupingRecommendationTaskInput(v *DescribeResourceGroupingRecommendationTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentDescribeResourceGroupingRecommendationTaskInput(v *DescribeResourceGroupingRecommendationTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppArn != nil { + ok := object.Key("appArn") + ok.String(*v.AppArn) + } + + if v.GroupingId != nil { + ok := object.Key("groupingId") + ok.String(*v.GroupingId) + } + + return nil +} + type awsRestjson1_serializeOpImportResourcesToDraftAppVersion struct { } @@ -3415,6 +3577,74 @@ func awsRestjson1_serializeOpHttpBindingsListResiliencyPoliciesInput(v *ListResi return nil } +type awsRestjson1_serializeOpListResourceGroupingRecommendations struct { +} + +func (*awsRestjson1_serializeOpListResourceGroupingRecommendations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListResourceGroupingRecommendations) 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.(*ListResourceGroupingRecommendationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/list-resource-grouping-recommendations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListResourceGroupingRecommendationsInput(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_serializeOpHttpBindingsListResourceGroupingRecommendationsInput(v *ListResourceGroupingRecommendationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.AppArn != nil { + encoder.SetQuery("appArn").String(*v.AppArn) + } + + if v.MaxResults != nil { + encoder.SetQuery("maxResults").Integer(*v.MaxResults) + } + + if v.NextToken != nil { + encoder.SetQuery("nextToken").String(*v.NextToken) + } + + return nil +} + type awsRestjson1_serializeOpListSopRecommendations struct { } @@ -3969,6 +4199,88 @@ func awsRestjson1_serializeOpDocumentPutDraftAppVersionTemplateInput(v *PutDraft return nil } +type awsRestjson1_serializeOpRejectResourceGroupingRecommendations struct { +} + +func (*awsRestjson1_serializeOpRejectResourceGroupingRecommendations) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpRejectResourceGroupingRecommendations) 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.(*RejectResourceGroupingRecommendationsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/reject-resource-grouping-recommendations") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentRejectResourceGroupingRecommendationsInput(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_serializeOpHttpBindingsRejectResourceGroupingRecommendationsInput(v *RejectResourceGroupingRecommendationsInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentRejectResourceGroupingRecommendationsInput(v *RejectResourceGroupingRecommendationsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppArn != nil { + ok := object.Key("appArn") + ok.String(*v.AppArn) + } + + if v.Entries != nil { + ok := object.Key("entries") + if err := awsRestjson1_serializeDocumentRejectGroupingRecommendationEntries(v.Entries, ok); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpRemoveDraftAppVersionResourceMappings struct { } @@ -4263,6 +4575,81 @@ func awsRestjson1_serializeOpDocumentStartAppAssessmentInput(v *StartAppAssessme return nil } +type awsRestjson1_serializeOpStartResourceGroupingRecommendationTask struct { +} + +func (*awsRestjson1_serializeOpStartResourceGroupingRecommendationTask) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpStartResourceGroupingRecommendationTask) 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.(*StartResourceGroupingRecommendationTaskInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/start-resource-grouping-recommendation-task") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + var restEncoder *httpbinding.Encoder + if request.URL.RawPath == "" { + restEncoder, err = httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + } else { + request.URL.RawPath = smithyhttp.JoinPath(request.URL.RawPath, opPath) + restEncoder, err = httpbinding.NewEncoderWithRawPath(request.URL.Path, request.URL.RawPath, request.URL.RawQuery, request.Header) + } + + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentStartResourceGroupingRecommendationTaskInput(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_serializeOpHttpBindingsStartResourceGroupingRecommendationTaskInput(v *StartResourceGroupingRecommendationTaskInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + return nil +} + +func awsRestjson1_serializeOpDocumentStartResourceGroupingRecommendationTaskInput(v *StartResourceGroupingRecommendationTaskInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.AppArn != nil { + ok := object.Key("appArn") + ok.String(*v.AppArn) + } + + return nil +} + type awsRestjson1_serializeOpTagResource struct { } @@ -4940,6 +5327,31 @@ func awsRestjson1_serializeOpDocumentUpdateResiliencyPolicyInput(v *UpdateResili return nil } +func awsRestjson1_serializeDocumentAcceptGroupingRecommendationEntries(v []types.AcceptGroupingRecommendationEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentAcceptGroupingRecommendationEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentAcceptGroupingRecommendationEntry(v *types.AcceptGroupingRecommendationEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GroupingRecommendationId != nil { + ok := object.Key("groupingRecommendationId") + ok.String(*v.GroupingRecommendationId) + } + + return nil +} + func awsRestjson1_serializeDocumentAdditionalInfoMap(v map[string][]string, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -5231,6 +5643,36 @@ func awsRestjson1_serializeDocumentRecommendationIdList(v []string, value smithy return nil } +func awsRestjson1_serializeDocumentRejectGroupingRecommendationEntries(v []types.RejectGroupingRecommendationEntry, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentRejectGroupingRecommendationEntry(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsRestjson1_serializeDocumentRejectGroupingRecommendationEntry(v *types.RejectGroupingRecommendationEntry, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.GroupingRecommendationId != nil { + ok := object.Key("groupingRecommendationId") + ok.String(*v.GroupingRecommendationId) + } + + if len(v.RejectionReason) > 0 { + ok := object.Key("rejectionReason") + ok.String(string(v.RejectionReason)) + } + + return nil +} + func awsRestjson1_serializeDocumentRenderRecommendationTypeList(v []types.RenderRecommendationType, value smithyjson.Value) error { array := value.Array() defer array.Close() diff --git a/service/resiliencehub/snapshot/api_op_AcceptResourceGroupingRecommendations.go.snap b/service/resiliencehub/snapshot/api_op_AcceptResourceGroupingRecommendations.go.snap new file mode 100644 index 00000000000..bc2e27adec0 --- /dev/null +++ b/service/resiliencehub/snapshot/api_op_AcceptResourceGroupingRecommendations.go.snap @@ -0,0 +1,36 @@ +AcceptResourceGroupingRecommendations + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/resiliencehub/snapshot/api_op_DescribeResourceGroupingRecommendationTask.go.snap b/service/resiliencehub/snapshot/api_op_DescribeResourceGroupingRecommendationTask.go.snap new file mode 100644 index 00000000000..d9638d30c85 --- /dev/null +++ b/service/resiliencehub/snapshot/api_op_DescribeResourceGroupingRecommendationTask.go.snap @@ -0,0 +1,36 @@ +DescribeResourceGroupingRecommendationTask + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/resiliencehub/snapshot/api_op_ListResourceGroupingRecommendations.go.snap b/service/resiliencehub/snapshot/api_op_ListResourceGroupingRecommendations.go.snap new file mode 100644 index 00000000000..3f15ca61d3c --- /dev/null +++ b/service/resiliencehub/snapshot/api_op_ListResourceGroupingRecommendations.go.snap @@ -0,0 +1,35 @@ +ListResourceGroupingRecommendations + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/resiliencehub/snapshot/api_op_RejectResourceGroupingRecommendations.go.snap b/service/resiliencehub/snapshot/api_op_RejectResourceGroupingRecommendations.go.snap new file mode 100644 index 00000000000..6c846dfbec6 --- /dev/null +++ b/service/resiliencehub/snapshot/api_op_RejectResourceGroupingRecommendations.go.snap @@ -0,0 +1,36 @@ +RejectResourceGroupingRecommendations + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/resiliencehub/snapshot/api_op_StartResourceGroupingRecommendationTask.go.snap b/service/resiliencehub/snapshot/api_op_StartResourceGroupingRecommendationTask.go.snap new file mode 100644 index 00000000000..9caf677b073 --- /dev/null +++ b/service/resiliencehub/snapshot/api_op_StartResourceGroupingRecommendationTask.go.snap @@ -0,0 +1,36 @@ +StartResourceGroupingRecommendationTask + Initialize stack step + RegisterServiceMetadata + legacyEndpointContextSetter + SetLogger + OperationInputValidation + Serialize stack step + setOperationInput + ResolveEndpoint + OperationSerializer + Build stack step + ClientRequestID + ComputeContentLength + UserAgent + AddTimeOffsetMiddleware + RecursionDetection + Finalize stack step + ResolveAuthScheme + GetIdentity + ResolveEndpointV2 + disableHTTPS + ComputePayloadHash + Retry + RetryMetricsHeader + setLegacyContextSigningOptions + Signing + Deserialize stack step + AddRawResponseToMetadata + ErrorCloseResponseBody + CloseResponseBody + ResponseErrorWrapper + RequestIDRetriever + OperationDeserializer + AddTimeOffsetMiddleware + RecordResponseTiming + RequestResponseLogger diff --git a/service/resiliencehub/snapshot_test.go b/service/resiliencehub/snapshot_test.go index 9756829f907..d9480cf6ce5 100644 --- a/service/resiliencehub/snapshot_test.go +++ b/service/resiliencehub/snapshot_test.go @@ -62,6 +62,18 @@ func testSnapshot(stack *middleware.Stack, operation string) error { } return snapshotOK{} } +func TestCheckSnapshot_AcceptResourceGroupingRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.AcceptResourceGroupingRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "AcceptResourceGroupingRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_AddDraftAppVersionResourceMappings(t *testing.T) { svc := New(Options{}) _, err := svc.AddDraftAppVersionResourceMappings(context.Background(), nil, func(o *Options) { @@ -338,6 +350,18 @@ func TestCheckSnapshot_DescribeResiliencyPolicy(t *testing.T) { } } +func TestCheckSnapshot_DescribeResourceGroupingRecommendationTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeResourceGroupingRecommendationTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "DescribeResourceGroupingRecommendationTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ImportResourcesToDraftAppVersion(t *testing.T) { svc := New(Options{}) _, err := svc.ImportResourcesToDraftAppVersion(context.Background(), nil, func(o *Options) { @@ -518,6 +542,18 @@ func TestCheckSnapshot_ListResiliencyPolicies(t *testing.T) { } } +func TestCheckSnapshot_ListResourceGroupingRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListResourceGroupingRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "ListResourceGroupingRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_ListSopRecommendations(t *testing.T) { svc := New(Options{}) _, err := svc.ListSopRecommendations(context.Background(), nil, func(o *Options) { @@ -602,6 +638,18 @@ func TestCheckSnapshot_PutDraftAppVersionTemplate(t *testing.T) { } } +func TestCheckSnapshot_RejectResourceGroupingRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.RejectResourceGroupingRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "RejectResourceGroupingRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_RemoveDraftAppVersionResourceMappings(t *testing.T) { svc := New(Options{}) _, err := svc.RemoveDraftAppVersionResourceMappings(context.Background(), nil, func(o *Options) { @@ -638,6 +686,18 @@ func TestCheckSnapshot_StartAppAssessment(t *testing.T) { } } +func TestCheckSnapshot_StartResourceGroupingRecommendationTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartResourceGroupingRecommendationTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return testSnapshot(stack, "StartResourceGroupingRecommendationTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestCheckSnapshot_TagResource(t *testing.T) { svc := New(Options{}) _, err := svc.TagResource(context.Background(), nil, func(o *Options) { @@ -721,6 +781,18 @@ func TestCheckSnapshot_UpdateResiliencyPolicy(t *testing.T) { t.Fatal(err) } } +func TestUpdateSnapshot_AcceptResourceGroupingRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.AcceptResourceGroupingRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "AcceptResourceGroupingRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_AddDraftAppVersionResourceMappings(t *testing.T) { svc := New(Options{}) _, err := svc.AddDraftAppVersionResourceMappings(context.Background(), nil, func(o *Options) { @@ -997,6 +1069,18 @@ func TestUpdateSnapshot_DescribeResiliencyPolicy(t *testing.T) { } } +func TestUpdateSnapshot_DescribeResourceGroupingRecommendationTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.DescribeResourceGroupingRecommendationTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "DescribeResourceGroupingRecommendationTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ImportResourcesToDraftAppVersion(t *testing.T) { svc := New(Options{}) _, err := svc.ImportResourcesToDraftAppVersion(context.Background(), nil, func(o *Options) { @@ -1177,6 +1261,18 @@ func TestUpdateSnapshot_ListResiliencyPolicies(t *testing.T) { } } +func TestUpdateSnapshot_ListResourceGroupingRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.ListResourceGroupingRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "ListResourceGroupingRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_ListSopRecommendations(t *testing.T) { svc := New(Options{}) _, err := svc.ListSopRecommendations(context.Background(), nil, func(o *Options) { @@ -1261,6 +1357,18 @@ func TestUpdateSnapshot_PutDraftAppVersionTemplate(t *testing.T) { } } +func TestUpdateSnapshot_RejectResourceGroupingRecommendations(t *testing.T) { + svc := New(Options{}) + _, err := svc.RejectResourceGroupingRecommendations(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "RejectResourceGroupingRecommendations") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_RemoveDraftAppVersionResourceMappings(t *testing.T) { svc := New(Options{}) _, err := svc.RemoveDraftAppVersionResourceMappings(context.Background(), nil, func(o *Options) { @@ -1297,6 +1405,18 @@ func TestUpdateSnapshot_StartAppAssessment(t *testing.T) { } } +func TestUpdateSnapshot_StartResourceGroupingRecommendationTask(t *testing.T) { + svc := New(Options{}) + _, err := svc.StartResourceGroupingRecommendationTask(context.Background(), nil, func(o *Options) { + o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { + return updateSnapshot(stack, "StartResourceGroupingRecommendationTask") + }) + }) + if _, ok := err.(snapshotOK); !ok && err != nil { + t.Fatal(err) + } +} + func TestUpdateSnapshot_TagResource(t *testing.T) { svc := New(Options{}) _, err := svc.TagResource(context.Background(), nil, func(o *Options) { diff --git a/service/resiliencehub/types/enums.go b/service/resiliencehub/types/enums.go index a122d8014fb..624ce6789a6 100644 --- a/service/resiliencehub/types/enums.go +++ b/service/resiliencehub/types/enums.go @@ -54,6 +54,8 @@ const ( AppComplianceStatusTypePolicyMet AppComplianceStatusType = "PolicyMet" AppComplianceStatusTypeNotAssessed AppComplianceStatusType = "NotAssessed" AppComplianceStatusTypeChangesDetected AppComplianceStatusType = "ChangesDetected" + AppComplianceStatusTypeNotApplicable AppComplianceStatusType = "NotApplicable" + AppComplianceStatusTypeMissingPolicy AppComplianceStatusType = "MissingPolicy" ) // Values returns all known values for AppComplianceStatusType. Note that this can @@ -66,6 +68,8 @@ func (AppComplianceStatusType) Values() []AppComplianceStatusType { "PolicyMet", "NotAssessed", "ChangesDetected", + "NotApplicable", + "MissingPolicy", } } @@ -157,6 +161,8 @@ type ComplianceStatus string const ( ComplianceStatusPolicyBreached ComplianceStatus = "PolicyBreached" ComplianceStatusPolicyMet ComplianceStatus = "PolicyMet" + ComplianceStatusNotApplicable ComplianceStatus = "NotApplicable" + ComplianceStatusMissingPolicy ComplianceStatus = "MissingPolicy" ) // Values returns all known values for ComplianceStatus. Note that this can be @@ -167,6 +173,8 @@ func (ComplianceStatus) Values() []ComplianceStatus { return []ComplianceStatus{ "PolicyBreached", "PolicyMet", + "NotApplicable", + "MissingPolicy", } } @@ -389,6 +397,72 @@ func (ExcludeRecommendationReason) Values() []ExcludeRecommendationReason { } } +type GroupingRecommendationConfidenceLevel string + +// Enum values for GroupingRecommendationConfidenceLevel +const ( + GroupingRecommendationConfidenceLevelHigh GroupingRecommendationConfidenceLevel = "High" + GroupingRecommendationConfidenceLevelMedium GroupingRecommendationConfidenceLevel = "Medium" +) + +// Values returns all known values for GroupingRecommendationConfidenceLevel. 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 (GroupingRecommendationConfidenceLevel) Values() []GroupingRecommendationConfidenceLevel { + return []GroupingRecommendationConfidenceLevel{ + "High", + "Medium", + } +} + +type GroupingRecommendationRejectionReason string + +// Enum values for GroupingRecommendationRejectionReason +const ( + GroupingRecommendationRejectionReasonDistinctBusinessPurpose GroupingRecommendationRejectionReason = "DistinctBusinessPurpose" + GroupingRecommendationRejectionReasonSeparateDataConcern GroupingRecommendationRejectionReason = "SeparateDataConcern" + GroupingRecommendationRejectionReasonDistinctUserGroupHandling GroupingRecommendationRejectionReason = "DistinctUserGroupHandling" + GroupingRecommendationRejectionReasonOther GroupingRecommendationRejectionReason = "Other" +) + +// Values returns all known values for GroupingRecommendationRejectionReason. 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 (GroupingRecommendationRejectionReason) Values() []GroupingRecommendationRejectionReason { + return []GroupingRecommendationRejectionReason{ + "DistinctBusinessPurpose", + "SeparateDataConcern", + "DistinctUserGroupHandling", + "Other", + } +} + +type GroupingRecommendationStatusType string + +// Enum values for GroupingRecommendationStatusType +const ( + GroupingRecommendationStatusTypeAccepted GroupingRecommendationStatusType = "Accepted" + GroupingRecommendationStatusTypeRejected GroupingRecommendationStatusType = "Rejected" + GroupingRecommendationStatusTypePendingDecision GroupingRecommendationStatusType = "PendingDecision" +) + +// Values returns all known values for GroupingRecommendationStatusType. 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 (GroupingRecommendationStatusType) Values() []GroupingRecommendationStatusType { + return []GroupingRecommendationStatusType{ + "Accepted", + "Rejected", + "PendingDecision", + } +} + type HaArchitecture string // Enum values for HaArchitecture @@ -459,6 +533,7 @@ const ( RecommendationComplianceStatusBreachedUnattainable RecommendationComplianceStatus = "BreachedUnattainable" RecommendationComplianceStatusBreachedCanMeet RecommendationComplianceStatus = "BreachedCanMeet" RecommendationComplianceStatusMetCanImprove RecommendationComplianceStatus = "MetCanImprove" + RecommendationComplianceStatusMissingPolicy RecommendationComplianceStatus = "MissingPolicy" ) // Values returns all known values for RecommendationComplianceStatus. Note that @@ -471,6 +546,7 @@ func (RecommendationComplianceStatus) Values() []RecommendationComplianceStatus "BreachedUnattainable", "BreachedCanMeet", "MetCanImprove", + "MissingPolicy", } } @@ -685,6 +761,30 @@ func (ResourceResolutionStatusType) Values() []ResourceResolutionStatusType { } } +type ResourcesGroupingRecGenStatusType string + +// Enum values for ResourcesGroupingRecGenStatusType +const ( + ResourcesGroupingRecGenStatusTypePending ResourcesGroupingRecGenStatusType = "Pending" + ResourcesGroupingRecGenStatusTypeInProgress ResourcesGroupingRecGenStatusType = "InProgress" + ResourcesGroupingRecGenStatusTypeFailed ResourcesGroupingRecGenStatusType = "Failed" + ResourcesGroupingRecGenStatusTypeSuccess ResourcesGroupingRecGenStatusType = "Success" +) + +// Values returns all known values for ResourcesGroupingRecGenStatusType. 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 (ResourcesGroupingRecGenStatusType) Values() []ResourcesGroupingRecGenStatusType { + return []ResourcesGroupingRecGenStatusType{ + "Pending", + "InProgress", + "Failed", + "Success", + } +} + type ResourceSourceType string // Enum values for ResourceSourceType diff --git a/service/resiliencehub/types/types.go b/service/resiliencehub/types/types.go index 97f1e78c45f..6cce0643c34 100644 --- a/service/resiliencehub/types/types.go +++ b/service/resiliencehub/types/types.go @@ -7,6 +7,18 @@ import ( "time" ) +// Indicates the grouping recommendation you have accepted to include in your +// application. +type AcceptGroupingRecommendationEntry struct { + + // Indicates the identifier of the grouping recommendation. + // + // This member is required. + GroupingRecommendationId *string + + noSmithyDocumentSerde +} + // Defines a recommendation for a CloudWatch alarm. type AlarmRecommendation struct { @@ -205,6 +217,10 @@ type AppAssessment struct { // Starting time for the action. StartTime *time.Time + // Indicates a concise summary that provides an overview of the Resilience Hub + // assessment. + Summary *AssessmentSummary + // Tags assigned to the resource. A tag is a label that you assign to an Amazon // Web Services resource. Each tag consists of a key/value pair. Tags map[string]string @@ -246,7 +262,7 @@ type AppAssessmentSummary struct { // Name of the assessment. AssessmentName *string - // TCurrent status of compliance for the resiliency policy. + // Current status of compliance for the resiliency policy. ComplianceStatus ComplianceStatus // Cost for an application. @@ -438,6 +454,62 @@ type AppVersionSummary struct { noSmithyDocumentSerde } +// Indicates a specific risk identified in the Resilience Hub assessment and the +// corresponding recommendation provided to address that risk. +// +// The assessment summary generated by large language models (LLMs) on Amazon +// Bedrock are only suggestions. The current level of generative AI technology is +// not perfect and LLMs are not infallible. Bias and incorrect answers, although +// rare, should be expected. Review each recommendation in the assessment summary +// before you use the output from an LLM. +// +// This property is available only in the US East (N. Virginia) Region. +type AssessmentRiskRecommendation struct { + + // Indicates the Application Components (AppComponents) that were assessed as part + // of the assessnent and are associated with the identified risk and + // recommendation. + // + // This property is available only in the US East (N. Virginia) Region. + AppComponents []string + + // Indicates the recommendation provided by the Resilience Hub to address the + // identified risks in the application. + // + // This property is available only in the US East (N. Virginia) Region. + Recommendation *string + + // Indicates the description of the potential risk identified in the application + // as part of the Resilience Hub assessment. + // + // This property is available only in the US East (N. Virginia) Region. + Risk *string + + noSmithyDocumentSerde +} + +// Indicates the AI-generated summary for the Resilience Hub assessment, providing +// a concise overview that highlights the top risks and recommendations. +// +// This property is available only in the US East (N. Virginia) Region. +type AssessmentSummary struct { + + // Indicates the top risks and recommendations identified by the Resilience Hub + // assessment, each representing a specific risk and the corresponding + // recommendation to address it. + // + // This property is available only in the US East (N. Virginia) Region. + RiskRecommendations []AssessmentRiskRecommendation + + // Indicates a concise summary that provides an overview of the Resilience Hub + // assessment. + // + // This property is available only in the US East (N. Virginia) Region. + Summary *string + + noSmithyDocumentSerde +} + // List of operational recommendations that did not get included or excluded. type BatchUpdateRecommendationStatusFailedEntry struct { @@ -732,6 +804,22 @@ type EventSubscription struct { noSmithyDocumentSerde } +// Indicates the accepted grouping recommendation whose implementation failed. +type FailedGroupingRecommendationEntry struct { + + // Indicates the error that occurred while implementing a grouping recommendation. + // + // This member is required. + ErrorMessage *string + + // Indicates the identifier of the grouping recommendation. + // + // This member is required. + GroupingRecommendationId *string + + noSmithyDocumentSerde +} + // Defines a failure policy. type FailurePolicy struct { @@ -748,6 +836,109 @@ type FailurePolicy struct { noSmithyDocumentSerde } +// Creates a new recommended Application Component (AppComponent). +type GroupingAppComponent struct { + + // Indicates the identifier of an AppComponent. + // + // This member is required. + AppComponentId *string + + // Indicates the name of an AppComponent. + // + // This member is required. + AppComponentName *string + + // Indicates the type of an AppComponent. + // + // This member is required. + AppComponentType *string + + noSmithyDocumentSerde +} + +// Creates a new grouping recommendation. +type GroupingRecommendation struct { + + // Indicates the confidence level of Resilience Hub on the grouping recommendation. + // + // This member is required. + ConfidenceLevel GroupingRecommendationConfidenceLevel + + // Indicates the creation time of the grouping recommendation. + // + // This member is required. + CreationTime *time.Time + + // Indicates the name of the recommended Application Component (AppComponent). + // + // This member is required. + GroupingAppComponent *GroupingAppComponent + + // Indicates all the reasons available for rejecting a grouping recommendation. + // + // This member is required. + GroupingRecommendationId *string + + // Indicates all the reasons available for rejecting a grouping recommendation. + // + // This member is required. + RecommendationReasons []string + + // Indicates the resources that are grouped in a recommended AppComponent. + // + // This member is required. + Resources []GroupingResource + + // Indicates the confidence level of the grouping recommendation. + // + // This member is required. + Score float64 + + // Indicates the status of grouping resources into AppComponents. + // + // This member is required. + Status GroupingRecommendationStatusType + + // Indicates the reason you had selected while rejecting a grouping recommendation. + RejectionReason GroupingRecommendationRejectionReason + + noSmithyDocumentSerde +} + +// Indicates the resource that will be grouped in the recommended Application +// Component (AppComponent). +type GroupingResource struct { + + // Indicates the logical identifier of the resource. + // + // This member is required. + LogicalResourceId *LogicalResourceId + + // Indicates the physical identifier of the resource. + // + // This member is required. + PhysicalResourceId *PhysicalResourceId + + // Indicates the resource name. + // + // This member is required. + ResourceName *string + + // Indicates the resource type. + // + // This member is required. + ResourceType *string + + // Indicates the identifier of the source AppComponents in which the resources + // were previously grouped into. + // + // This member is required. + SourceAppComponentIds []string + + noSmithyDocumentSerde +} + // Defines a logical resource identifier. type LogicalResourceId struct { @@ -1068,6 +1259,20 @@ type RecommendationTemplate struct { noSmithyDocumentSerde } +// Indicates the rejected grouping recommendation. +type RejectGroupingRecommendationEntry struct { + + // Indicates the identifier of the grouping recommendation. + // + // This member is required. + GroupingRecommendationId *string + + // Indicates the reason you had selected while rejecting a grouping recommendation. + RejectionReason GroupingRecommendationRejectionReason + + noSmithyDocumentSerde +} + // Defines a resiliency policy. // // Resilience Hub allows you to provide a value of zero for rtoInSecs and rpoInSecs diff --git a/service/resiliencehub/validators.go b/service/resiliencehub/validators.go index 426c402287b..7aa88e0cd67 100644 --- a/service/resiliencehub/validators.go +++ b/service/resiliencehub/validators.go @@ -10,6 +10,26 @@ import ( "github.com/aws/smithy-go/middleware" ) +type validateOpAcceptResourceGroupingRecommendations struct { +} + +func (*validateOpAcceptResourceGroupingRecommendations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpAcceptResourceGroupingRecommendations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*AcceptResourceGroupingRecommendationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpAcceptResourceGroupingRecommendationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpAddDraftAppVersionResourceMappings struct { } @@ -470,6 +490,26 @@ func (m *validateOpDescribeResiliencyPolicy) HandleInitialize(ctx context.Contex return next.HandleInitialize(ctx, in) } +type validateOpDescribeResourceGroupingRecommendationTask struct { +} + +func (*validateOpDescribeResourceGroupingRecommendationTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDescribeResourceGroupingRecommendationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DescribeResourceGroupingRecommendationTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDescribeResourceGroupingRecommendationTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpImportResourcesToDraftAppVersion struct { } @@ -810,6 +850,26 @@ func (m *validateOpPutDraftAppVersionTemplate) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpRejectResourceGroupingRecommendations struct { +} + +func (*validateOpRejectResourceGroupingRecommendations) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpRejectResourceGroupingRecommendations) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*RejectResourceGroupingRecommendationsInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpRejectResourceGroupingRecommendationsInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRemoveDraftAppVersionResourceMappings struct { } @@ -870,6 +930,26 @@ func (m *validateOpStartAppAssessment) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpStartResourceGroupingRecommendationTask struct { +} + +func (*validateOpStartResourceGroupingRecommendationTask) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpStartResourceGroupingRecommendationTask) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*StartResourceGroupingRecommendationTaskInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpStartResourceGroupingRecommendationTaskInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpTagResource struct { } @@ -1010,6 +1090,10 @@ func (m *validateOpUpdateResiliencyPolicy) HandleInitialize(ctx context.Context, return next.HandleInitialize(ctx, in) } +func addOpAcceptResourceGroupingRecommendationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpAcceptResourceGroupingRecommendations{}, middleware.After) +} + func addOpAddDraftAppVersionResourceMappingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpAddDraftAppVersionResourceMappings{}, middleware.After) } @@ -1102,6 +1186,10 @@ func addOpDescribeResiliencyPolicyValidationMiddleware(stack *middleware.Stack) return stack.Initialize.Add(&validateOpDescribeResiliencyPolicy{}, middleware.After) } +func addOpDescribeResourceGroupingRecommendationTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDescribeResourceGroupingRecommendationTask{}, middleware.After) +} + func addOpImportResourcesToDraftAppVersionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpImportResourcesToDraftAppVersion{}, middleware.After) } @@ -1170,6 +1258,10 @@ func addOpPutDraftAppVersionTemplateValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpPutDraftAppVersionTemplate{}, middleware.After) } +func addOpRejectResourceGroupingRecommendationsValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpRejectResourceGroupingRecommendations{}, middleware.After) +} + func addOpRemoveDraftAppVersionResourceMappingsValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRemoveDraftAppVersionResourceMappings{}, middleware.After) } @@ -1182,6 +1274,10 @@ func addOpStartAppAssessmentValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpStartAppAssessment{}, middleware.After) } +func addOpStartResourceGroupingRecommendationTaskValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpStartResourceGroupingRecommendationTask{}, middleware.After) +} + func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) } @@ -1210,6 +1306,38 @@ func addOpUpdateResiliencyPolicyValidationMiddleware(stack *middleware.Stack) er return stack.Initialize.Add(&validateOpUpdateResiliencyPolicy{}, middleware.After) } +func validateAcceptGroupingRecommendationEntries(v []types.AcceptGroupingRecommendationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptGroupingRecommendationEntries"} + for i := range v { + if err := validateAcceptGroupingRecommendationEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateAcceptGroupingRecommendationEntry(v *types.AcceptGroupingRecommendationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptGroupingRecommendationEntry"} + if v.GroupingRecommendationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupingRecommendationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateDisruptionPolicy(v map[string]types.FailurePolicy) error { if v == nil { return nil @@ -1376,6 +1504,38 @@ func validatePhysicalResourceId(v *types.PhysicalResourceId) error { } } +func validateRejectGroupingRecommendationEntries(v []types.RejectGroupingRecommendationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RejectGroupingRecommendationEntries"} + for i := range v { + if err := validateRejectGroupingRecommendationEntry(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateRejectGroupingRecommendationEntry(v *types.RejectGroupingRecommendationEntry) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RejectGroupingRecommendationEntry"} + if v.GroupingRecommendationId == nil { + invalidParams.Add(smithy.NewErrParamRequired("GroupingRecommendationId")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateResourceMapping(v *types.ResourceMapping) error { if v == nil { return nil @@ -1488,6 +1648,28 @@ func validateUpdateRecommendationStatusRequestEntry(v *types.UpdateRecommendatio } } +func validateOpAcceptResourceGroupingRecommendationsInput(v *AcceptResourceGroupingRecommendationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "AcceptResourceGroupingRecommendationsInput"} + if v.AppArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppArn")) + } + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateAcceptGroupingRecommendationEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpAddDraftAppVersionResourceMappingsInput(v *AddDraftAppVersionResourceMappingsInput) error { if v == nil { return nil @@ -1933,6 +2115,21 @@ func validateOpDescribeResiliencyPolicyInput(v *DescribeResiliencyPolicyInput) e } } +func validateOpDescribeResourceGroupingRecommendationTaskInput(v *DescribeResourceGroupingRecommendationTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DescribeResourceGroupingRecommendationTaskInput"} + if v.AppArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpImportResourcesToDraftAppVersionInput(v *ImportResourcesToDraftAppVersionInput) error { if v == nil { return nil @@ -2216,6 +2413,28 @@ func validateOpPutDraftAppVersionTemplateInput(v *PutDraftAppVersionTemplateInpu } } +func validateOpRejectResourceGroupingRecommendationsInput(v *RejectResourceGroupingRecommendationsInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "RejectResourceGroupingRecommendationsInput"} + if v.AppArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppArn")) + } + if v.Entries == nil { + invalidParams.Add(smithy.NewErrParamRequired("Entries")) + } else if v.Entries != nil { + if err := validateRejectGroupingRecommendationEntries(v.Entries); err != nil { + invalidParams.AddNested("Entries", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRemoveDraftAppVersionResourceMappingsInput(v *RemoveDraftAppVersionResourceMappingsInput) error { if v == nil { return nil @@ -2270,6 +2489,21 @@ func validateOpStartAppAssessmentInput(v *StartAppAssessmentInput) error { } } +func validateOpStartResourceGroupingRecommendationTaskInput(v *StartResourceGroupingRecommendationTaskInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "StartResourceGroupingRecommendationTaskInput"} + if v.AppArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("AppArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpTagResourceInput(v *TagResourceInput) error { if v == nil { return nil