From 8f0c0b0c78fd7f53f64cb738925cb1509df084eb Mon Sep 17 00:00:00 2001 From: AWS SDK for Go v2 automation user Date: Thu, 20 Jul 2023 18:26:15 +0000 Subject: [PATCH] Regenerated Clients --- .../010ecc29b86745a18ca78d5e6c4cadaf.json | 8 + .../14c181da1dcf458e8b195408084b150a.json | 8 + .../1c3fa3a41c9049e6869e90f52fd689f6.json | 8 + .../32c755ec42ad42708be6b39d18154047.json | 8 + .../35bcfaf770d14653b5da2255da25d620.json | 8 + .../4017f0fec86443ebad801c5afdbca4e3.json | 8 + .../582ac35824274d8ebb8085969c16a97f.json | 8 + .../741d0974cbac4a9d81153103a5ba3a69.json | 8 + .../c78117aab6ce411a8eb29f2da7ed31e5.json | 8 + .../api_op_CreateSourceRepository.go | 150 ++ service/codecatalyst/api_op_DeleteProject.go | 134 + .../api_op_DeleteSourceRepository.go | 142 ++ service/codecatalyst/api_op_DeleteSpace.go | 126 + .../api_op_GetSourceRepository.go | 158 ++ service/codecatalyst/api_op_UpdateProject.go | 135 + service/codecatalyst/api_op_UpdateSpace.go | 127 + service/codecatalyst/deserializers.go | 2216 +++++++++++++---- service/codecatalyst/doc.go | 59 +- service/codecatalyst/generated.json | 7 + service/codecatalyst/serializers.go | 547 ++++ service/codecatalyst/types/types.go | 13 +- service/codecatalyst/validators.go | 297 +++ service/connectcases/api_op_DeleteDomain.go | 6 +- service/connectcases/deserializers.go | 41 + service/connectcases/serializers.go | 19 + service/connectcases/types/types.go | 27 + .../connectcases/types/types_exported_test.go | 7 + service/connectcases/validators.go | 5 + .../api_op_ListIntentStageMetrics.go | 4 +- .../api_op_ListUtteranceAnalyticsData.go | 14 +- .../api_op_ListUtteranceMetrics.go | 8 +- service/lexmodelsv2/deserializers.go | 8 +- service/lexmodelsv2/types/enums.go | 20 - service/lexmodelsv2/types/types.go | 8 +- .../api_op_CreateOutpostResolver.go | 152 ++ .../api_op_CreateResolverEndpoint.go | 10 +- .../api_op_CreateResolverRule.go | 7 +- .../api_op_DeleteOutpostResolver.go | 125 + .../api_op_GetOutpostResolver.go | 126 + .../api_op_ListOutpostResolvers.go | 228 ++ .../api_op_PutResolverQueryLogConfigPolicy.go | 1 - .../api_op_UpdateOutpostResolver.go | 134 + .../api_op_UpdateResolverEndpoint.go | 6 +- service/route53resolver/deserializers.go | 1221 ++++++++- service/route53resolver/generated.json | 5 + service/route53resolver/serializers.go | 397 +++ service/route53resolver/types/enums.go | 30 + service/route53resolver/types/errors.go | 26 + service/route53resolver/types/types.go | 51 +- service/route53resolver/validators.go | 170 ++ .../sagemaker/api_op_DescribeFeatureGroup.go | 2 +- .../api_op_DescribeFeatureMetadata.go | 3 +- .../sagemaker/api_op_ListResourceCatalogs.go | 237 ++ service/sagemaker/api_op_Search.go | 10 + .../sagemaker/api_op_UpdateFeatureGroup.go | 14 +- .../sagemaker/api_op_UpdateFeatureMetadata.go | 3 +- service/sagemaker/deserializers.go | 261 ++ service/sagemaker/generated.json | 1 + service/sagemaker/serializers.go | 102 + service/sagemaker/types/enums.go | 52 + service/sagemaker/types/types.go | 32 +- .../api_op_BatchGetRecord.go | 5 +- .../api_op_DeleteRecord.go | 3 +- .../api_op_GetRecord.go | 9 +- .../api_op_PutRecord.go | 20 +- .../deserializers.go | 2 +- .../types/types.go | 5 +- .../securitylake/api_op_CreateAwsLogSource.go | 2 +- service/securitylake/api_op_CreateDataLake.go | 31 +- .../securitylake/api_op_CreateSubscriber.go | 5 + ...DeleteDataLakeOrganizationConfiguration.go | 14 +- service/securitylake/api_op_ListDataLakes.go | 4 +- .../api_op_ListTagsForResource.go | 128 + service/securitylake/api_op_TagResource.go | 137 + service/securitylake/api_op_UntagResource.go | 128 + service/securitylake/deserializers.go | 441 ++++ service/securitylake/generated.json | 3 + service/securitylake/serializers.go | 249 ++ service/securitylake/types/types.go | 48 +- service/securitylake/validators.go | 172 ++ .../api_op_StartTranscriptionJob.go | 7 + service/transcribe/deserializers.go | 116 + service/transcribe/serializers.go | 45 + service/transcribe/types/enums.go | 16 + service/transcribe/types/types.go | 21 + service/transcribe/validators.go | 37 + 86 files changed, 8766 insertions(+), 638 deletions(-) create mode 100644 .changelog/010ecc29b86745a18ca78d5e6c4cadaf.json create mode 100644 .changelog/14c181da1dcf458e8b195408084b150a.json create mode 100644 .changelog/1c3fa3a41c9049e6869e90f52fd689f6.json create mode 100644 .changelog/32c755ec42ad42708be6b39d18154047.json create mode 100644 .changelog/35bcfaf770d14653b5da2255da25d620.json create mode 100644 .changelog/4017f0fec86443ebad801c5afdbca4e3.json create mode 100644 .changelog/582ac35824274d8ebb8085969c16a97f.json create mode 100644 .changelog/741d0974cbac4a9d81153103a5ba3a69.json create mode 100644 .changelog/c78117aab6ce411a8eb29f2da7ed31e5.json create mode 100644 service/codecatalyst/api_op_CreateSourceRepository.go create mode 100644 service/codecatalyst/api_op_DeleteProject.go create mode 100644 service/codecatalyst/api_op_DeleteSourceRepository.go create mode 100644 service/codecatalyst/api_op_DeleteSpace.go create mode 100644 service/codecatalyst/api_op_GetSourceRepository.go create mode 100644 service/codecatalyst/api_op_UpdateProject.go create mode 100644 service/codecatalyst/api_op_UpdateSpace.go create mode 100644 service/route53resolver/api_op_CreateOutpostResolver.go create mode 100644 service/route53resolver/api_op_DeleteOutpostResolver.go create mode 100644 service/route53resolver/api_op_GetOutpostResolver.go create mode 100644 service/route53resolver/api_op_ListOutpostResolvers.go create mode 100644 service/route53resolver/api_op_UpdateOutpostResolver.go create mode 100644 service/sagemaker/api_op_ListResourceCatalogs.go create mode 100644 service/securitylake/api_op_ListTagsForResource.go create mode 100644 service/securitylake/api_op_TagResource.go create mode 100644 service/securitylake/api_op_UntagResource.go diff --git a/.changelog/010ecc29b86745a18ca78d5e6c4cadaf.json b/.changelog/010ecc29b86745a18ca78d5e6c4cadaf.json new file mode 100644 index 00000000000..abdc2e8f6dc --- /dev/null +++ b/.changelog/010ecc29b86745a18ca78d5e6c4cadaf.json @@ -0,0 +1,8 @@ +{ + "id": "010ecc29-b867-45a1-8ca7-8d5e6c4cadaf", + "type": "feature", + "description": "This release updates type for Channel field in SessionSpecification and UtteranceSpecification", + "modules": [ + "service/lexmodelsv2" + ] +} \ No newline at end of file diff --git a/.changelog/14c181da1dcf458e8b195408084b150a.json b/.changelog/14c181da1dcf458e8b195408084b150a.json new file mode 100644 index 00000000000..41bd2a42d4e --- /dev/null +++ b/.changelog/14c181da1dcf458e8b195408084b150a.json @@ -0,0 +1,8 @@ +{ + "id": "14c181da-1dcf-458e-8b19-5408084b150a", + "type": "feature", + "description": "Added API argument --toxicity-detection to startTranscriptionJob API, which allows users to view toxicity scores of submitted audio.", + "modules": [ + "service/transcribe" + ] +} \ No newline at end of file diff --git a/.changelog/1c3fa3a41c9049e6869e90f52fd689f6.json b/.changelog/1c3fa3a41c9049e6869e90f52fd689f6.json new file mode 100644 index 00000000000..d430d719e42 --- /dev/null +++ b/.changelog/1c3fa3a41c9049e6869e90f52fd689f6.json @@ -0,0 +1,8 @@ +{ + "id": "1c3fa3a4-1c90-49e6-869e-90f52fd689f6", + "type": "feature", + "description": "Cross account support for SageMaker Feature Store", + "modules": [ + "service/sagemakerfeaturestoreruntime" + ] +} \ No newline at end of file diff --git a/.changelog/32c755ec42ad42708be6b39d18154047.json b/.changelog/32c755ec42ad42708be6b39d18154047.json new file mode 100644 index 00000000000..0b74c6232ae --- /dev/null +++ b/.changelog/32c755ec42ad42708be6b39d18154047.json @@ -0,0 +1,8 @@ +{ + "id": "32c755ec-42ad-4270-8be6-b39d18154047", + "type": "feature", + "description": "This release adds support for Route 53 On Outposts, a new feature that allows customers to run Route 53 Resolver and Resolver endpoints locally on their Outposts.", + "modules": [ + "service/route53resolver" + ] +} \ No newline at end of file diff --git a/.changelog/35bcfaf770d14653b5da2255da25d620.json b/.changelog/35bcfaf770d14653b5da2255da25d620.json new file mode 100644 index 00000000000..15d5220116e --- /dev/null +++ b/.changelog/35bcfaf770d14653b5da2255da25d620.json @@ -0,0 +1,8 @@ +{ + "id": "35bcfaf7-70d1-4653-b5da-2255da25d620", + "type": "feature", + "description": "This release adds support for updating and deleting spaces and projects in Amazon CodeCatalyst. It also adds support for creating, getting, and deleting source repositories in CodeCatalyst projects.", + "modules": [ + "service/codecatalyst" + ] +} \ No newline at end of file diff --git a/.changelog/4017f0fec86443ebad801c5afdbca4e3.json b/.changelog/4017f0fec86443ebad801c5afdbca4e3.json new file mode 100644 index 00000000000..0f97b8855bb --- /dev/null +++ b/.changelog/4017f0fec86443ebad801c5afdbca4e3.json @@ -0,0 +1,8 @@ +{ + "id": "4017f0fe-c864-43eb-ad80-1c5afdbca4e3", + "type": "feature", + "description": "Adding support for Tags on Create and Resource Tagging API.", + "modules": [ + "service/securitylake" + ] +} \ No newline at end of file diff --git a/.changelog/582ac35824274d8ebb8085969c16a97f.json b/.changelog/582ac35824274d8ebb8085969c16a97f.json new file mode 100644 index 00000000000..f325bd7ec8b --- /dev/null +++ b/.changelog/582ac35824274d8ebb8085969c16a97f.json @@ -0,0 +1,8 @@ +{ + "id": "582ac358-2427-4d8e-bb80-85969c16a97f", + "type": "feature", + "description": "Improve performance of S3 clients by simplifying and optimizing endpoint resolution.", + "modules": [ + "service/s3" + ] +} \ No newline at end of file diff --git a/.changelog/741d0974cbac4a9d81153103a5ba3a69.json b/.changelog/741d0974cbac4a9d81153103a5ba3a69.json new file mode 100644 index 00000000000..53ba9ecb559 --- /dev/null +++ b/.changelog/741d0974cbac4a9d81153103a5ba3a69.json @@ -0,0 +1,8 @@ +{ + "id": "741d0974-cbac-4a9d-8115-3103a5ba3a69", + "type": "feature", + "description": "This release adds the ability to assign a case to a queue or user.", + "modules": [ + "service/connectcases" + ] +} \ No newline at end of file diff --git a/.changelog/c78117aab6ce411a8eb29f2da7ed31e5.json b/.changelog/c78117aab6ce411a8eb29f2da7ed31e5.json new file mode 100644 index 00000000000..c2e03d65660 --- /dev/null +++ b/.changelog/c78117aab6ce411a8eb29f2da7ed31e5.json @@ -0,0 +1,8 @@ +{ + "id": "c78117aa-b6ce-411a-8eb2-9f2da7ed31e5", + "type": "feature", + "description": "Cross account support for SageMaker Feature Store", + "modules": [ + "service/sagemaker" + ] +} \ No newline at end of file diff --git a/service/codecatalyst/api_op_CreateSourceRepository.go b/service/codecatalyst/api_op_CreateSourceRepository.go new file mode 100644 index 00000000000..9165af7dafc --- /dev/null +++ b/service/codecatalyst/api_op_CreateSourceRepository.go @@ -0,0 +1,150 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codecatalyst + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an empty Git-based source repository in a specified project. The +// repository is created with an initial empty commit with a default branch named +// main . +func (c *Client) CreateSourceRepository(ctx context.Context, params *CreateSourceRepositoryInput, optFns ...func(*Options)) (*CreateSourceRepositoryOutput, error) { + if params == nil { + params = &CreateSourceRepositoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateSourceRepository", params, optFns, c.addOperationCreateSourceRepositoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateSourceRepositoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateSourceRepositoryInput struct { + + // The name of the source repository. For more information about name + // requirements, see Quotas for source repositories (https://docs.aws.amazon.com/codecatalyst/latest/userguide/source-quotas.html) + // . + // + // This member is required. + Name *string + + // The name of the project in the space. + // + // This member is required. + ProjectName *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + // The description of the source repository. + Description *string + + noSmithyDocumentSerde +} + +type CreateSourceRepositoryOutput struct { + + // The name of the source repository. + // + // This member is required. + Name *string + + // The name of the project in the space. + // + // This member is required. + ProjectName *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + // The description of the source repository. + Description *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateSourceRepositoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpCreateSourceRepository{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpCreateSourceRepository{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addBearerAuthSignerMiddleware(stack, options); err != nil { + return err + } + if err = addOpCreateSourceRepositoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateSourceRepository(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateSourceRepository(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "CreateSourceRepository", + } +} diff --git a/service/codecatalyst/api_op_DeleteProject.go b/service/codecatalyst/api_op_DeleteProject.go new file mode 100644 index 00000000000..3aa5dcf4c10 --- /dev/null +++ b/service/codecatalyst/api_op_DeleteProject.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codecatalyst + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a project in a space. +func (c *Client) DeleteProject(ctx context.Context, params *DeleteProjectInput, optFns ...func(*Options)) (*DeleteProjectOutput, error) { + if params == nil { + params = &DeleteProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteProject", params, optFns, c.addOperationDeleteProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteProjectInput struct { + + // The name of the project in the space. To retrieve a list of project names, use + // ListProjects . + // + // This member is required. + Name *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + noSmithyDocumentSerde +} + +type DeleteProjectOutput struct { + + // The name of the project in the space. + // + // This member is required. + Name *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + // The friendly name displayed to users of the project in Amazon CodeCatalyst. + DisplayName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteProject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addBearerAuthSignerMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteProject(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteProject", + } +} diff --git a/service/codecatalyst/api_op_DeleteSourceRepository.go b/service/codecatalyst/api_op_DeleteSourceRepository.go new file mode 100644 index 00000000000..91b9014fa39 --- /dev/null +++ b/service/codecatalyst/api_op_DeleteSourceRepository.go @@ -0,0 +1,142 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codecatalyst + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a source repository in Amazon CodeCatalyst. You cannot use this API to +// delete a linked repository. It can only be used to delete a Amazon CodeCatalyst +// source repository. +func (c *Client) DeleteSourceRepository(ctx context.Context, params *DeleteSourceRepositoryInput, optFns ...func(*Options)) (*DeleteSourceRepositoryOutput, error) { + if params == nil { + params = &DeleteSourceRepositoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteSourceRepository", params, optFns, c.addOperationDeleteSourceRepositoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteSourceRepositoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteSourceRepositoryInput struct { + + // The name of the source repository. + // + // This member is required. + Name *string + + // The name of the project in the space. + // + // This member is required. + ProjectName *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + noSmithyDocumentSerde +} + +type DeleteSourceRepositoryOutput struct { + + // The name of the repository. + // + // This member is required. + Name *string + + // The name of the project in the space. + // + // This member is required. + ProjectName *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteSourceRepositoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteSourceRepository{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteSourceRepository{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addBearerAuthSignerMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteSourceRepositoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSourceRepository(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteSourceRepository(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteSourceRepository", + } +} diff --git a/service/codecatalyst/api_op_DeleteSpace.go b/service/codecatalyst/api_op_DeleteSpace.go new file mode 100644 index 00000000000..b7bf2d280e2 --- /dev/null +++ b/service/codecatalyst/api_op_DeleteSpace.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codecatalyst + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a space. Deleting a space cannot be undone. Additionally, since space +// names must be unique across Amazon CodeCatalyst, you cannot reuse names of +// deleted spaces. +func (c *Client) DeleteSpace(ctx context.Context, params *DeleteSpaceInput, optFns ...func(*Options)) (*DeleteSpaceOutput, error) { + if params == nil { + params = &DeleteSpaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteSpace", params, optFns, c.addOperationDeleteSpaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteSpaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteSpaceInput struct { + + // The name of the space. To retrieve a list of space names, use ListSpaces . + // + // This member is required. + Name *string + + noSmithyDocumentSerde +} + +type DeleteSpaceOutput struct { + + // The name of the space. + // + // This member is required. + Name *string + + // The friendly name of the space displayed to users of the space in Amazon + // CodeCatalyst. + DisplayName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteSpaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpDeleteSpace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpDeleteSpace{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addBearerAuthSignerMiddleware(stack, options); err != nil { + return err + } + if err = addOpDeleteSpaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteSpace(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteSpace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "DeleteSpace", + } +} diff --git a/service/codecatalyst/api_op_GetSourceRepository.go b/service/codecatalyst/api_op_GetSourceRepository.go new file mode 100644 index 00000000000..474533193b0 --- /dev/null +++ b/service/codecatalyst/api_op_GetSourceRepository.go @@ -0,0 +1,158 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codecatalyst + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Returns information about a source repository. +func (c *Client) GetSourceRepository(ctx context.Context, params *GetSourceRepositoryInput, optFns ...func(*Options)) (*GetSourceRepositoryOutput, error) { + if params == nil { + params = &GetSourceRepositoryInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetSourceRepository", params, optFns, c.addOperationGetSourceRepositoryMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetSourceRepositoryOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetSourceRepositoryInput struct { + + // The name of the source repository. + // + // This member is required. + Name *string + + // The name of the project in the space. + // + // This member is required. + ProjectName *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + noSmithyDocumentSerde +} + +type GetSourceRepositoryOutput struct { + + // The time the source repository was created, in coordinated universal time (UTC) + // timestamp format as specified in RFC 3339 (https://www.rfc-editor.org/rfc/rfc3339#section-5.6) + // . + // + // This member is required. + CreatedTime *time.Time + + // The time the source repository was last updated, in coordinated universal time + // (UTC) timestamp format as specified in RFC 3339 (https://www.rfc-editor.org/rfc/rfc3339#section-5.6) + // . + // + // This member is required. + LastUpdatedTime *time.Time + + // The name of the source repository. + // + // This member is required. + Name *string + + // The name of the project in the space. + // + // This member is required. + ProjectName *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + // The description of the source repository. + Description *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetSourceRepositoryMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpGetSourceRepository{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpGetSourceRepository{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addBearerAuthSignerMiddleware(stack, options); err != nil { + return err + } + if err = addOpGetSourceRepositoryValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetSourceRepository(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetSourceRepository(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "GetSourceRepository", + } +} diff --git a/service/codecatalyst/api_op_UpdateProject.go b/service/codecatalyst/api_op_UpdateProject.go new file mode 100644 index 00000000000..0bde6604b49 --- /dev/null +++ b/service/codecatalyst/api_op_UpdateProject.go @@ -0,0 +1,135 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codecatalyst + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes one or more values for a project. +func (c *Client) UpdateProject(ctx context.Context, params *UpdateProjectInput, optFns ...func(*Options)) (*UpdateProjectOutput, error) { + if params == nil { + params = &UpdateProjectInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateProject", params, optFns, c.addOperationUpdateProjectMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateProjectOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateProjectInput struct { + + // The name of the project. + // + // This member is required. + Name *string + + // The name of the space. + // + // This member is required. + SpaceName *string + + // The description of the project. + Description *string + + noSmithyDocumentSerde +} + +type UpdateProjectOutput struct { + + // The description of the project. + Description *string + + // The friendly name of the project displayed to users in Amazon CodeCatalyst. + DisplayName *string + + // The name of the project. + Name *string + + // The name of the space. + SpaceName *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateProject{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateProject{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addBearerAuthSignerMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProject(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateProject(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateProject", + } +} diff --git a/service/codecatalyst/api_op_UpdateSpace.go b/service/codecatalyst/api_op_UpdateSpace.go new file mode 100644 index 00000000000..1c2257b23d6 --- /dev/null +++ b/service/codecatalyst/api_op_UpdateSpace.go @@ -0,0 +1,127 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package codecatalyst + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Changes one or more values for a space. +func (c *Client) UpdateSpace(ctx context.Context, params *UpdateSpaceInput, optFns ...func(*Options)) (*UpdateSpaceOutput, error) { + if params == nil { + params = &UpdateSpaceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateSpace", params, optFns, c.addOperationUpdateSpaceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateSpaceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateSpaceInput struct { + + // The name of the space. + // + // This member is required. + Name *string + + // The description of the space. + Description *string + + noSmithyDocumentSerde +} + +type UpdateSpaceOutput struct { + + // The description of the space. + Description *string + + // The friendly name of the space displayed to users in Amazon CodeCatalyst. + DisplayName *string + + // The name of the space. + Name *string + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateSpaceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUpdateSpace{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUpdateSpace{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addBearerAuthSignerMiddleware(stack, options); err != nil { + return err + } + if err = addOpUpdateSpaceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateSpace(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateSpace(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + OperationName: "UpdateSpace", + } +} diff --git a/service/codecatalyst/deserializers.go b/service/codecatalyst/deserializers.go index 64e21012521..4264f6ddcbd 100644 --- a/service/codecatalyst/deserializers.go +++ b/service/codecatalyst/deserializers.go @@ -593,6 +593,199 @@ func awsRestjson1_deserializeOpDocumentCreateProjectOutput(v **CreateProjectOutp return nil } +type awsRestjson1_deserializeOpCreateSourceRepository struct { +} + +func (*awsRestjson1_deserializeOpCreateSourceRepository) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpCreateSourceRepository) HandleDeserialize(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_deserializeOpErrorCreateSourceRepository(response, &metadata) + } + output := &CreateSourceRepositoryOutput{} + 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_deserializeOpDocumentCreateSourceRepositoryOutput(&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_deserializeOpErrorCreateSourceRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentCreateSourceRepositoryOutput(v **CreateSourceRepositoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateSourceRepositoryOutput + if *v == nil { + sv = &CreateSourceRepositoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceRepositoryDescriptionString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceRepositoryNameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "projectName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ProjectName = ptr.String(jtv) + } + + case "spaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.SpaceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpCreateSourceRepositoryBranch struct { } @@ -1072,14 +1265,14 @@ func awsRestjson1_deserializeOpDocumentDeleteDevEnvironmentOutput(v **DeleteDevE return nil } -type awsRestjson1_deserializeOpGetDevEnvironment struct { +type awsRestjson1_deserializeOpDeleteProject struct { } -func (*awsRestjson1_deserializeOpGetDevEnvironment) ID() string { +func (*awsRestjson1_deserializeOpDeleteProject) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetDevEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpDeleteProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1093,9 +1286,1234 @@ func (m *awsRestjson1_deserializeOpGetDevEnvironment) HandleDeserialize(ctx cont } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetDevEnvironment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorDeleteProject(response, &metadata) } - output := &GetDevEnvironmentOutput{} + output := &DeleteProjectOutput{} + 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_deserializeOpDocumentDeleteProjectOutput(&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_deserializeOpErrorDeleteProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentDeleteProjectOutput(v **DeleteProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteProjectOutput + if *v == nil { + sv = &DeleteProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "spaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.SpaceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteSourceRepository struct { +} + +func (*awsRestjson1_deserializeOpDeleteSourceRepository) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteSourceRepository) HandleDeserialize(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_deserializeOpErrorDeleteSourceRepository(response, &metadata) + } + output := &DeleteSourceRepositoryOutput{} + 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_deserializeOpDocumentDeleteSourceRepositoryOutput(&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_deserializeOpErrorDeleteSourceRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentDeleteSourceRepositoryOutput(v **DeleteSourceRepositoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteSourceRepositoryOutput + if *v == nil { + sv = &DeleteSourceRepositoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceRepositoryNameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "projectName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ProjectName = ptr.String(jtv) + } + + case "spaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.SpaceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpDeleteSpace struct { +} + +func (*awsRestjson1_deserializeOpDeleteSpace) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpDeleteSpace) HandleDeserialize(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_deserializeOpErrorDeleteSpace(response, &metadata) + } + output := &DeleteSpaceOutput{} + 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_deserializeOpDocumentDeleteSpaceOutput(&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_deserializeOpErrorDeleteSpace(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentDeleteSpaceOutput(v **DeleteSpaceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteSpaceOutput + if *v == nil { + sv = &DeleteSpaceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetDevEnvironment struct { +} + +func (*awsRestjson1_deserializeOpGetDevEnvironment) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetDevEnvironment) HandleDeserialize(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_deserializeOpErrorGetDevEnvironment(response, &metadata) + } + output := &GetDevEnvironmentOutput{} + 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_deserializeOpDocumentGetDevEnvironmentOutput(&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_deserializeOpErrorGetDevEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentGetDevEnvironmentOutput(v **GetDevEnvironmentOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetDevEnvironmentOutput + if *v == nil { + sv = &GetDevEnvironmentOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "creatorId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.CreatorId = ptr.String(jtv) + } + + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "ides": + if err := awsRestjson1_deserializeDocumentIdes(&sv.Ides, value); err != nil { + return err + } + + case "inactivityTimeoutMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InactivityTimeoutMinutes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InactivityTimeoutMinutes = int32(i64) + } + + case "instanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) + } + sv.InstanceType = types.InstanceType(jtv) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(t) + } + + case "persistentStorage": + if err := awsRestjson1_deserializeDocumentPersistentStorage(&sv.PersistentStorage, value); err != nil { + return err + } + + case "projectName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ProjectName = ptr.String(jtv) + } + + case "repositories": + if err := awsRestjson1_deserializeDocumentDevEnvironmentRepositorySummaries(&sv.Repositories, value); err != nil { + return err + } + + case "spaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.SpaceName = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DevEnvironmentStatus to be of type string, got %T instead", value) + } + sv.Status = types.DevEnvironmentStatus(jtv) + } + + case "statusReason": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected StatusReason to be of type string, got %T instead", value) + } + sv.StatusReason = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetProject struct { +} + +func (*awsRestjson1_deserializeOpGetProject) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetProject) HandleDeserialize(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_deserializeOpErrorGetProject(response, &metadata) + } + output := &GetProjectOutput{} + 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_deserializeOpDocumentGetProjectOutput(&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_deserializeOpErrorGetProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentGetProjectOutput(v **GetProjectOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetProjectOutput + if *v == nil { + sv = &GetProjectOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "displayName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.DisplayName = ptr.String(jtv) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "spaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.SpaceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetSourceRepository struct { +} + +func (*awsRestjson1_deserializeOpGetSourceRepository) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSourceRepository) HandleDeserialize(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_deserializeOpErrorGetSourceRepository(response, &metadata) + } + output := &GetSourceRepositoryOutput{} + 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_deserializeOpDocumentGetSourceRepositoryOutput(&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_deserializeOpErrorGetSourceRepository(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsRestjson1_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsRestjson1_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("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_deserializeOpDocumentGetSourceRepositoryOutput(v **GetSourceRepositoryOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetSourceRepositoryOutput + if *v == nil { + sv = &GetSourceRepositoryOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "createdTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.CreatedTime = ptr.Time(t) + } + + case "description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceRepositoryDescriptionString to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "lastUpdatedTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) + } + t, err := smithytime.ParseDateTime(jtv) + if err != nil { + return err + } + sv.LastUpdatedTime = ptr.Time(t) + } + + case "name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SourceRepositoryNameString to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "projectName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ProjectName = ptr.String(jtv) + } + + case "spaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.SpaceName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +type awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls struct { +} + +func (*awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls) HandleDeserialize(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_deserializeOpErrorGetSourceRepositoryCloneUrls(response, &metadata) + } + output := &GetSourceRepositoryCloneUrlsOutput{} out.Result = output var buff [1024]byte @@ -1116,7 +2534,7 @@ func (m *awsRestjson1_deserializeOpGetDevEnvironment) HandleDeserialize(ctx cont return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetDevEnvironmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSourceRepositoryCloneUrlsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1129,7 +2547,7 @@ func (m *awsRestjson1_deserializeOpGetDevEnvironment) HandleDeserialize(ctx cont return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetDevEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSourceRepositoryCloneUrls(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1198,7 +2616,7 @@ func awsRestjson1_deserializeOpErrorGetDevEnvironment(response *smithyhttp.Respo } } -func awsRestjson1_deserializeOpDocumentGetDevEnvironmentOutput(v **GetDevEnvironmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSourceRepositoryCloneUrlsOutput(v **GetSourceRepositoryCloneUrlsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1211,126 +2629,22 @@ func awsRestjson1_deserializeOpDocumentGetDevEnvironmentOutput(v **GetDevEnviron return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetDevEnvironmentOutput + var sv *GetSourceRepositoryCloneUrlsOutput if *v == nil { - sv = &GetDevEnvironmentOutput{} + sv = &GetSourceRepositoryCloneUrlsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "alias": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Alias = ptr.String(jtv) - } - - case "creatorId": + case "https": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.CreatorId = ptr.String(jtv) - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "ides": - if err := awsRestjson1_deserializeDocumentIdes(&sv.Ides, value); err != nil { - return err - } - - case "inactivityTimeoutMinutes": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected InactivityTimeoutMinutes to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.InactivityTimeoutMinutes = int32(i64) - } - - case "instanceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) - } - sv.InstanceType = types.InstanceType(jtv) - } - - case "lastUpdatedTime": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Timestamp to be of type string, got %T instead", value) - } - t, err := smithytime.ParseDateTime(jtv) - if err != nil { - return err - } - sv.LastUpdatedTime = ptr.Time(t) - } - - case "persistentStorage": - if err := awsRestjson1_deserializeDocumentPersistentStorage(&sv.PersistentStorage, value); err != nil { - return err - } - - case "projectName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) - } - sv.ProjectName = ptr.String(jtv) - } - - case "repositories": - if err := awsRestjson1_deserializeDocumentDevEnvironmentRepositorySummaries(&sv.Repositories, value); err != nil { - return err - } - - case "spaceName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) - } - sv.SpaceName = ptr.String(jtv) - } - - case "status": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected DevEnvironmentStatus to be of type string, got %T instead", value) - } - sv.Status = types.DevEnvironmentStatus(jtv) - } - - case "statusReason": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StatusReason to be of type string, got %T instead", value) - } - sv.StatusReason = ptr.String(jtv) + sv.Https = ptr.String(jtv) } default: @@ -1342,14 +2656,14 @@ func awsRestjson1_deserializeOpDocumentGetDevEnvironmentOutput(v **GetDevEnviron return nil } -type awsRestjson1_deserializeOpGetProject struct { +type awsRestjson1_deserializeOpGetSpace struct { } -func (*awsRestjson1_deserializeOpGetProject) ID() string { +func (*awsRestjson1_deserializeOpGetSpace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSpace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1363,9 +2677,9 @@ func (m *awsRestjson1_deserializeOpGetProject) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetProject(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSpace(response, &metadata) } - output := &GetProjectOutput{} + output := &GetSpaceOutput{} out.Result = output var buff [1024]byte @@ -1386,7 +2700,7 @@ func (m *awsRestjson1_deserializeOpGetProject) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetProjectOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSpaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1399,7 +2713,7 @@ func (m *awsRestjson1_deserializeOpGetProject) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSpace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1468,7 +2782,7 @@ func awsRestjson1_deserializeOpErrorGetProject(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentGetProjectOutput(v **GetProjectOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSpaceOutput(v **GetSpaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1481,9 +2795,9 @@ func awsRestjson1_deserializeOpDocumentGetProjectOutput(v **GetProjectOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetProjectOutput + var sv *GetSpaceOutput if *v == nil { - sv = &GetProjectOutput{} + sv = &GetSpaceOutput{} } else { sv = *v } @@ -1512,18 +2826,18 @@ func awsRestjson1_deserializeOpDocumentGetProjectOutput(v **GetProjectOutput, va if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) } sv.Name = ptr.String(jtv) } - case "spaceName": + case "regionName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + return fmt.Errorf("expected RegionString to be of type string, got %T instead", value) } - sv.SpaceName = ptr.String(jtv) + sv.RegionName = ptr.String(jtv) } default: @@ -1535,14 +2849,14 @@ func awsRestjson1_deserializeOpDocumentGetProjectOutput(v **GetProjectOutput, va return nil } -type awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls struct { +type awsRestjson1_deserializeOpGetSubscription struct { } -func (*awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls) ID() string { +func (*awsRestjson1_deserializeOpGetSubscription) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1556,9 +2870,9 @@ func (m *awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSourceRepositoryCloneUrls(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetSubscription(response, &metadata) } - output := &GetSourceRepositoryCloneUrlsOutput{} + output := &GetSubscriptionOutput{} out.Result = output var buff [1024]byte @@ -1579,7 +2893,7 @@ func (m *awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSourceRepositoryCloneUrlsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1592,7 +2906,7 @@ func (m *awsRestjson1_deserializeOpGetSourceRepositoryCloneUrls) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSourceRepositoryCloneUrls(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1661,7 +2975,7 @@ func awsRestjson1_deserializeOpErrorGetSourceRepositoryCloneUrls(response *smith } } -func awsRestjson1_deserializeOpDocumentGetSourceRepositoryCloneUrlsOutput(v **GetSourceRepositoryCloneUrlsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscriptionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1674,22 +2988,31 @@ func awsRestjson1_deserializeOpDocumentGetSourceRepositoryCloneUrlsOutput(v **Ge return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSourceRepositoryCloneUrlsOutput + var sv *GetSubscriptionOutput if *v == nil { - sv = &GetSourceRepositoryCloneUrlsOutput{} + sv = &GetSubscriptionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "https": + case "awsAccountName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.AwsAccountName = ptr.String(jtv) + } + + case "subscriptionType": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Https = ptr.String(jtv) + sv.SubscriptionType = ptr.String(jtv) } default: @@ -1701,14 +3024,14 @@ func awsRestjson1_deserializeOpDocumentGetSourceRepositoryCloneUrlsOutput(v **Ge return nil } -type awsRestjson1_deserializeOpGetSpace struct { +type awsRestjson1_deserializeOpGetUserDetails struct { } -func (*awsRestjson1_deserializeOpGetSpace) ID() string { +func (*awsRestjson1_deserializeOpGetUserDetails) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSpace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpGetUserDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1722,9 +3045,9 @@ func (m *awsRestjson1_deserializeOpGetSpace) HandleDeserialize(ctx context.Conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSpace(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorGetUserDetails(response, &metadata) } - output := &GetSpaceOutput{} + output := &GetUserDetailsOutput{} out.Result = output var buff [1024]byte @@ -1745,7 +3068,7 @@ func (m *awsRestjson1_deserializeOpGetSpace) HandleDeserialize(ctx context.Conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSpaceOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentGetUserDetailsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1758,7 +3081,7 @@ func (m *awsRestjson1_deserializeOpGetSpace) HandleDeserialize(ctx context.Conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSpace(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorGetUserDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -1827,7 +3150,7 @@ func awsRestjson1_deserializeOpErrorGetSpace(response *smithyhttp.Response, meta } } -func awsRestjson1_deserializeOpDocumentGetSpaceOutput(v **GetSpaceOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentGetUserDetailsOutput(v **GetUserDetailsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -1840,49 +3163,54 @@ func awsRestjson1_deserializeOpDocumentGetSpaceOutput(v **GetSpaceOutput, value return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSpaceOutput + var sv *GetUserDetailsOutput if *v == nil { - sv = &GetSpaceOutput{} + sv = &GetUserDetailsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "description": + case "displayName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Description = ptr.String(jtv) + sv.DisplayName = ptr.String(jtv) } - case "displayName": + case "primaryEmail": + if err := awsRestjson1_deserializeDocumentEmailAddress(&sv.PrimaryEmail, value); err != nil { + return err + } + + case "userId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.DisplayName = ptr.String(jtv) + sv.UserId = ptr.String(jtv) } - case "name": + case "userName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Name = ptr.String(jtv) + sv.UserName = ptr.String(jtv) } - case "regionName": + case "version": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected RegionString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.RegionName = ptr.String(jtv) + sv.Version = ptr.String(jtv) } default: @@ -1894,14 +3222,14 @@ func awsRestjson1_deserializeOpDocumentGetSpaceOutput(v **GetSpaceOutput, value return nil } -type awsRestjson1_deserializeOpGetSubscription struct { +type awsRestjson1_deserializeOpListAccessTokens struct { } -func (*awsRestjson1_deserializeOpGetSubscription) ID() string { +func (*awsRestjson1_deserializeOpListAccessTokens) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListAccessTokens) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -1915,9 +3243,9 @@ func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx contex } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetSubscription(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListAccessTokens(response, &metadata) } - output := &GetSubscriptionOutput{} + output := &ListAccessTokensOutput{} out.Result = output var buff [1024]byte @@ -1938,7 +3266,7 @@ func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx contex return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListAccessTokensOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -1951,7 +3279,7 @@ func (m *awsRestjson1_deserializeOpGetSubscription) HandleDeserialize(ctx contex return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetSubscription(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListAccessTokens(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2020,7 +3348,7 @@ func awsRestjson1_deserializeOpErrorGetSubscription(response *smithyhttp.Respons } } -func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscriptionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListAccessTokensOutput(v **ListAccessTokensOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2033,31 +3361,27 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscription return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetSubscriptionOutput + var sv *ListAccessTokensOutput if *v == nil { - sv = &GetSubscriptionOutput{} + sv = &ListAccessTokensOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "awsAccountName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) - } - sv.AwsAccountName = ptr.String(jtv) + case "items": + if err := awsRestjson1_deserializeDocumentAccessTokenSummaries(&sv.Items, value); err != nil { + return err } - case "subscriptionType": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.SubscriptionType = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -2069,14 +3393,14 @@ func awsRestjson1_deserializeOpDocumentGetSubscriptionOutput(v **GetSubscription return nil } -type awsRestjson1_deserializeOpGetUserDetails struct { +type awsRestjson1_deserializeOpListDevEnvironments struct { } -func (*awsRestjson1_deserializeOpGetUserDetails) ID() string { +func (*awsRestjson1_deserializeOpListDevEnvironments) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpGetUserDetails) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDevEnvironments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2090,9 +3414,9 @@ func (m *awsRestjson1_deserializeOpGetUserDetails) HandleDeserialize(ctx context } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorGetUserDetails(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDevEnvironments(response, &metadata) } - output := &GetUserDetailsOutput{} + output := &ListDevEnvironmentsOutput{} out.Result = output var buff [1024]byte @@ -2113,7 +3437,7 @@ func (m *awsRestjson1_deserializeOpGetUserDetails) HandleDeserialize(ctx context return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentGetUserDetailsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDevEnvironmentsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2126,7 +3450,7 @@ func (m *awsRestjson1_deserializeOpGetUserDetails) HandleDeserialize(ctx context return out, metadata, err } -func awsRestjson1_deserializeOpErrorGetUserDetails(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDevEnvironments(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2195,7 +3519,7 @@ func awsRestjson1_deserializeOpErrorGetUserDetails(response *smithyhttp.Response } } -func awsRestjson1_deserializeOpDocumentGetUserDetailsOutput(v **GetUserDetailsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDevEnvironmentsOutput(v **ListDevEnvironmentsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2208,54 +3532,27 @@ func awsRestjson1_deserializeOpDocumentGetUserDetailsOutput(v **GetUserDetailsOu return fmt.Errorf("unexpected JSON type %v", value) } - var sv *GetUserDetailsOutput + var sv *ListDevEnvironmentsOutput if *v == nil { - sv = &GetUserDetailsOutput{} + sv = &ListDevEnvironmentsOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "displayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "primaryEmail": - if err := awsRestjson1_deserializeDocumentEmailAddress(&sv.PrimaryEmail, value); err != nil { + case "items": + if err := awsRestjson1_deserializeDocumentDevEnvironmentSummaryList(&sv.Items, value); err != nil { return err } - case "userId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UserId = ptr.String(jtv) - } - - case "userName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.UserName = ptr.String(jtv) - } - - case "version": + case "nextToken": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Version = ptr.String(jtv) + sv.NextToken = ptr.String(jtv) } default: @@ -2267,14 +3564,14 @@ func awsRestjson1_deserializeOpDocumentGetUserDetailsOutput(v **GetUserDetailsOu return nil } -type awsRestjson1_deserializeOpListAccessTokens struct { +type awsRestjson1_deserializeOpListDevEnvironmentSessions struct { } -func (*awsRestjson1_deserializeOpListAccessTokens) ID() string { +func (*awsRestjson1_deserializeOpListDevEnvironmentSessions) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListAccessTokens) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListDevEnvironmentSessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2288,9 +3585,9 @@ func (m *awsRestjson1_deserializeOpListAccessTokens) HandleDeserialize(ctx conte } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListAccessTokens(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListDevEnvironmentSessions(response, &metadata) } - output := &ListAccessTokensOutput{} + output := &ListDevEnvironmentSessionsOutput{} out.Result = output var buff [1024]byte @@ -2311,7 +3608,7 @@ func (m *awsRestjson1_deserializeOpListAccessTokens) HandleDeserialize(ctx conte return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListAccessTokensOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListDevEnvironmentSessionsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2324,7 +3621,7 @@ func (m *awsRestjson1_deserializeOpListAccessTokens) HandleDeserialize(ctx conte return out, metadata, err } -func awsRestjson1_deserializeOpErrorListAccessTokens(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListDevEnvironmentSessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2393,7 +3690,7 @@ func awsRestjson1_deserializeOpErrorListAccessTokens(response *smithyhttp.Respon } } -func awsRestjson1_deserializeOpDocumentListAccessTokensOutput(v **ListAccessTokensOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListDevEnvironmentSessionsOutput(v **ListDevEnvironmentSessionsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2406,9 +3703,9 @@ func awsRestjson1_deserializeOpDocumentListAccessTokensOutput(v **ListAccessToke return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListAccessTokensOutput + var sv *ListDevEnvironmentSessionsOutput if *v == nil { - sv = &ListAccessTokensOutput{} + sv = &ListDevEnvironmentSessionsOutput{} } else { sv = *v } @@ -2416,7 +3713,7 @@ func awsRestjson1_deserializeOpDocumentListAccessTokensOutput(v **ListAccessToke for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentAccessTokenSummaries(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentDevEnvironmentSessionsSummaryList(&sv.Items, value); err != nil { return err } @@ -2438,14 +3735,14 @@ func awsRestjson1_deserializeOpDocumentListAccessTokensOutput(v **ListAccessToke return nil } -type awsRestjson1_deserializeOpListDevEnvironments struct { +type awsRestjson1_deserializeOpListEventLogs struct { } -func (*awsRestjson1_deserializeOpListDevEnvironments) ID() string { +func (*awsRestjson1_deserializeOpListEventLogs) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDevEnvironments) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListEventLogs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2459,9 +3756,9 @@ func (m *awsRestjson1_deserializeOpListDevEnvironments) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDevEnvironments(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListEventLogs(response, &metadata) } - output := &ListDevEnvironmentsOutput{} + output := &ListEventLogsOutput{} out.Result = output var buff [1024]byte @@ -2482,7 +3779,7 @@ func (m *awsRestjson1_deserializeOpListDevEnvironments) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDevEnvironmentsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListEventLogsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2495,7 +3792,7 @@ func (m *awsRestjson1_deserializeOpListDevEnvironments) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDevEnvironments(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListEventLogs(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2564,7 +3861,7 @@ func awsRestjson1_deserializeOpErrorListDevEnvironments(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentListDevEnvironmentsOutput(v **ListDevEnvironmentsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListEventLogsOutput(v **ListEventLogsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2577,9 +3874,9 @@ func awsRestjson1_deserializeOpDocumentListDevEnvironmentsOutput(v **ListDevEnvi return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDevEnvironmentsOutput + var sv *ListEventLogsOutput if *v == nil { - sv = &ListDevEnvironmentsOutput{} + sv = &ListEventLogsOutput{} } else { sv = *v } @@ -2587,7 +3884,7 @@ func awsRestjson1_deserializeOpDocumentListDevEnvironmentsOutput(v **ListDevEnvi for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentDevEnvironmentSummaryList(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentEventLogEntries(&sv.Items, value); err != nil { return err } @@ -2609,14 +3906,14 @@ func awsRestjson1_deserializeOpDocumentListDevEnvironmentsOutput(v **ListDevEnvi return nil } -type awsRestjson1_deserializeOpListDevEnvironmentSessions struct { +type awsRestjson1_deserializeOpListProjects struct { } -func (*awsRestjson1_deserializeOpListDevEnvironmentSessions) ID() string { +func (*awsRestjson1_deserializeOpListProjects) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListDevEnvironmentSessions) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2630,9 +3927,9 @@ func (m *awsRestjson1_deserializeOpListDevEnvironmentSessions) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListDevEnvironmentSessions(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListProjects(response, &metadata) } - output := &ListDevEnvironmentSessionsOutput{} + output := &ListProjectsOutput{} out.Result = output var buff [1024]byte @@ -2653,7 +3950,7 @@ func (m *awsRestjson1_deserializeOpListDevEnvironmentSessions) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListDevEnvironmentSessionsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListProjectsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2666,7 +3963,7 @@ func (m *awsRestjson1_deserializeOpListDevEnvironmentSessions) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorListDevEnvironmentSessions(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2735,7 +4032,7 @@ func awsRestjson1_deserializeOpErrorListDevEnvironmentSessions(response *smithyh } } -func awsRestjson1_deserializeOpDocumentListDevEnvironmentSessionsOutput(v **ListDevEnvironmentSessionsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2748,9 +4045,9 @@ func awsRestjson1_deserializeOpDocumentListDevEnvironmentSessionsOutput(v **List return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListDevEnvironmentSessionsOutput + var sv *ListProjectsOutput if *v == nil { - sv = &ListDevEnvironmentSessionsOutput{} + sv = &ListProjectsOutput{} } else { sv = *v } @@ -2758,7 +4055,7 @@ func awsRestjson1_deserializeOpDocumentListDevEnvironmentSessionsOutput(v **List for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentDevEnvironmentSessionsSummaryList(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentProjectSummaries(&sv.Items, value); err != nil { return err } @@ -2780,14 +4077,14 @@ func awsRestjson1_deserializeOpDocumentListDevEnvironmentSessionsOutput(v **List return nil } -type awsRestjson1_deserializeOpListEventLogs struct { +type awsRestjson1_deserializeOpListSourceRepositories struct { } -func (*awsRestjson1_deserializeOpListEventLogs) ID() string { +func (*awsRestjson1_deserializeOpListSourceRepositories) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListEventLogs) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSourceRepositories) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2801,9 +4098,9 @@ func (m *awsRestjson1_deserializeOpListEventLogs) HandleDeserialize(ctx context. } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListEventLogs(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSourceRepositories(response, &metadata) } - output := &ListEventLogsOutput{} + output := &ListSourceRepositoriesOutput{} out.Result = output var buff [1024]byte @@ -2824,7 +4121,7 @@ func (m *awsRestjson1_deserializeOpListEventLogs) HandleDeserialize(ctx context. return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListEventLogsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSourceRepositoriesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2837,7 +4134,7 @@ func (m *awsRestjson1_deserializeOpListEventLogs) HandleDeserialize(ctx context. return out, metadata, err } -func awsRestjson1_deserializeOpErrorListEventLogs(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSourceRepositories(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -2906,7 +4203,7 @@ func awsRestjson1_deserializeOpErrorListEventLogs(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListEventLogsOutput(v **ListEventLogsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSourceRepositoriesOutput(v **ListSourceRepositoriesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -2919,9 +4216,9 @@ func awsRestjson1_deserializeOpDocumentListEventLogsOutput(v **ListEventLogsOutp return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListEventLogsOutput + var sv *ListSourceRepositoriesOutput if *v == nil { - sv = &ListEventLogsOutput{} + sv = &ListSourceRepositoriesOutput{} } else { sv = *v } @@ -2929,7 +4226,7 @@ func awsRestjson1_deserializeOpDocumentListEventLogsOutput(v **ListEventLogsOutp for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentEventLogEntries(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentListSourceRepositoriesItems(&sv.Items, value); err != nil { return err } @@ -2951,14 +4248,14 @@ func awsRestjson1_deserializeOpDocumentListEventLogsOutput(v **ListEventLogsOutp return nil } -type awsRestjson1_deserializeOpListProjects struct { +type awsRestjson1_deserializeOpListSourceRepositoryBranches struct { } -func (*awsRestjson1_deserializeOpListProjects) ID() string { +func (*awsRestjson1_deserializeOpListSourceRepositoryBranches) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSourceRepositoryBranches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -2972,9 +4269,9 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListProjects(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSourceRepositoryBranches(response, &metadata) } - output := &ListProjectsOutput{} + output := &ListSourceRepositoryBranchesOutput{} out.Result = output var buff [1024]byte @@ -2995,7 +4292,7 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListProjectsOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSourceRepositoryBranchesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3008,7 +4305,7 @@ func (m *awsRestjson1_deserializeOpListProjects) HandleDeserialize(ctx context.C return out, metadata, err } -func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSourceRepositoryBranches(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3077,7 +4374,7 @@ func awsRestjson1_deserializeOpErrorListProjects(response *smithyhttp.Response, } } -func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSourceRepositoryBranchesOutput(v **ListSourceRepositoryBranchesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3090,9 +4387,9 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListProjectsOutput + var sv *ListSourceRepositoryBranchesOutput if *v == nil { - sv = &ListProjectsOutput{} + sv = &ListSourceRepositoryBranchesOutput{} } else { sv = *v } @@ -3100,7 +4397,7 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentProjectSummaries(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentListSourceRepositoryBranchesItems(&sv.Items, value); err != nil { return err } @@ -3122,14 +4419,14 @@ func awsRestjson1_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput return nil } -type awsRestjson1_deserializeOpListSourceRepositories struct { +type awsRestjson1_deserializeOpListSpaces struct { } -func (*awsRestjson1_deserializeOpListSourceRepositories) ID() string { +func (*awsRestjson1_deserializeOpListSpaces) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSourceRepositories) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpListSpaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3143,9 +4440,9 @@ func (m *awsRestjson1_deserializeOpListSourceRepositories) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSourceRepositories(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorListSpaces(response, &metadata) } - output := &ListSourceRepositoriesOutput{} + output := &ListSpacesOutput{} out.Result = output var buff [1024]byte @@ -3166,7 +4463,7 @@ func (m *awsRestjson1_deserializeOpListSourceRepositories) HandleDeserialize(ctx return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSourceRepositoriesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentListSpacesOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3179,7 +4476,7 @@ func (m *awsRestjson1_deserializeOpListSourceRepositories) HandleDeserialize(ctx return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSourceRepositories(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorListSpaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3248,7 +4545,7 @@ func awsRestjson1_deserializeOpErrorListSourceRepositories(response *smithyhttp. } } -func awsRestjson1_deserializeOpDocumentListSourceRepositoriesOutput(v **ListSourceRepositoriesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentListSpacesOutput(v **ListSpacesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3261,9 +4558,9 @@ func awsRestjson1_deserializeOpDocumentListSourceRepositoriesOutput(v **ListSour return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSourceRepositoriesOutput + var sv *ListSpacesOutput if *v == nil { - sv = &ListSourceRepositoriesOutput{} + sv = &ListSpacesOutput{} } else { sv = *v } @@ -3271,7 +4568,7 @@ func awsRestjson1_deserializeOpDocumentListSourceRepositoriesOutput(v **ListSour for key, value := range shape { switch key { case "items": - if err := awsRestjson1_deserializeDocumentListSourceRepositoriesItems(&sv.Items, value); err != nil { + if err := awsRestjson1_deserializeDocumentSpaceSummaries(&sv.Items, value); err != nil { return err } @@ -3293,14 +4590,14 @@ func awsRestjson1_deserializeOpDocumentListSourceRepositoriesOutput(v **ListSour return nil } -type awsRestjson1_deserializeOpListSourceRepositoryBranches struct { +type awsRestjson1_deserializeOpStartDevEnvironment struct { } -func (*awsRestjson1_deserializeOpListSourceRepositoryBranches) ID() string { +func (*awsRestjson1_deserializeOpStartDevEnvironment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSourceRepositoryBranches) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartDevEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3314,9 +4611,9 @@ func (m *awsRestjson1_deserializeOpListSourceRepositoryBranches) HandleDeseriali } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSourceRepositoryBranches(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartDevEnvironment(response, &metadata) } - output := &ListSourceRepositoryBranchesOutput{} + output := &StartDevEnvironmentOutput{} out.Result = output var buff [1024]byte @@ -3337,7 +4634,7 @@ func (m *awsRestjson1_deserializeOpListSourceRepositoryBranches) HandleDeseriali return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSourceRepositoryBranchesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartDevEnvironmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3350,7 +4647,7 @@ func (m *awsRestjson1_deserializeOpListSourceRepositoryBranches) HandleDeseriali return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSourceRepositoryBranches(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartDevEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3419,7 +4716,7 @@ func awsRestjson1_deserializeOpErrorListSourceRepositoryBranches(response *smith } } -func awsRestjson1_deserializeOpDocumentListSourceRepositoryBranchesOutput(v **ListSourceRepositoryBranchesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartDevEnvironmentOutput(v **StartDevEnvironmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3432,27 +4729,49 @@ func awsRestjson1_deserializeOpDocumentListSourceRepositoryBranchesOutput(v **Li return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSourceRepositoryBranchesOutput + var sv *StartDevEnvironmentOutput if *v == nil { - sv = &ListSourceRepositoryBranchesOutput{} + sv = &StartDevEnvironmentOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentListSourceRepositoryBranchesItems(&sv.Items, value); err != nil { - return err + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) } - case "nextToken": + case "projectName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.ProjectName = ptr.String(jtv) + } + + case "spaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.SpaceName = ptr.String(jtv) + } + + case "status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected DevEnvironmentStatus to be of type string, got %T instead", value) + } + sv.Status = types.DevEnvironmentStatus(jtv) } default: @@ -3464,14 +4783,14 @@ func awsRestjson1_deserializeOpDocumentListSourceRepositoryBranchesOutput(v **Li return nil } -type awsRestjson1_deserializeOpListSpaces struct { +type awsRestjson1_deserializeOpStartDevEnvironmentSession struct { } -func (*awsRestjson1_deserializeOpListSpaces) ID() string { +func (*awsRestjson1_deserializeOpStartDevEnvironmentSession) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpListSpaces) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStartDevEnvironmentSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3485,9 +4804,9 @@ func (m *awsRestjson1_deserializeOpListSpaces) HandleDeserialize(ctx context.Con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorListSpaces(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStartDevEnvironmentSession(response, &metadata) } - output := &ListSpacesOutput{} + output := &StartDevEnvironmentSessionOutput{} out.Result = output var buff [1024]byte @@ -3508,7 +4827,7 @@ func (m *awsRestjson1_deserializeOpListSpaces) HandleDeserialize(ctx context.Con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentListSpacesOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStartDevEnvironmentSessionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3521,7 +4840,7 @@ func (m *awsRestjson1_deserializeOpListSpaces) HandleDeserialize(ctx context.Con return out, metadata, err } -func awsRestjson1_deserializeOpErrorListSpaces(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStartDevEnvironmentSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3590,7 +4909,7 @@ func awsRestjson1_deserializeOpErrorListSpaces(response *smithyhttp.Response, me } } -func awsRestjson1_deserializeOpDocumentListSpacesOutput(v **ListSpacesOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStartDevEnvironmentSessionOutput(v **StartDevEnvironmentSessionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3603,27 +4922,54 @@ func awsRestjson1_deserializeOpDocumentListSpacesOutput(v **ListSpacesOutput, va return fmt.Errorf("unexpected JSON type %v", value) } - var sv *ListSpacesOutput + var sv *StartDevEnvironmentSessionOutput if *v == nil { - sv = &ListSpacesOutput{} + sv = &StartDevEnvironmentSessionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "items": - if err := awsRestjson1_deserializeDocumentSpaceSummaries(&sv.Items, value); err != nil { + case "accessDetails": + if err := awsRestjson1_deserializeDocumentDevEnvironmentAccessDetails(&sv.AccessDetails, value); err != nil { return err } - case "nextToken": + case "id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "projectName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.ProjectName = ptr.String(jtv) + } + + case "sessionId": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.NextToken = ptr.String(jtv) + sv.SessionId = ptr.String(jtv) + } + + case "spaceName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + } + sv.SpaceName = ptr.String(jtv) } default: @@ -3635,14 +4981,14 @@ func awsRestjson1_deserializeOpDocumentListSpacesOutput(v **ListSpacesOutput, va return nil } -type awsRestjson1_deserializeOpStartDevEnvironment struct { +type awsRestjson1_deserializeOpStopDevEnvironment struct { } -func (*awsRestjson1_deserializeOpStartDevEnvironment) ID() string { +func (*awsRestjson1_deserializeOpStopDevEnvironment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartDevEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStopDevEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3656,9 +5002,9 @@ func (m *awsRestjson1_deserializeOpStartDevEnvironment) HandleDeserialize(ctx co } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartDevEnvironment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStopDevEnvironment(response, &metadata) } - output := &StartDevEnvironmentOutput{} + output := &StopDevEnvironmentOutput{} out.Result = output var buff [1024]byte @@ -3679,7 +5025,7 @@ func (m *awsRestjson1_deserializeOpStartDevEnvironment) HandleDeserialize(ctx co return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartDevEnvironmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStopDevEnvironmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3692,7 +5038,7 @@ func (m *awsRestjson1_deserializeOpStartDevEnvironment) HandleDeserialize(ctx co return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartDevEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStopDevEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3761,7 +5107,7 @@ func awsRestjson1_deserializeOpErrorStartDevEnvironment(response *smithyhttp.Res } } -func awsRestjson1_deserializeOpDocumentStartDevEnvironmentOutput(v **StartDevEnvironmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStopDevEnvironmentOutput(v **StopDevEnvironmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3774,9 +5120,9 @@ func awsRestjson1_deserializeOpDocumentStartDevEnvironmentOutput(v **StartDevEnv return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartDevEnvironmentOutput + var sv *StopDevEnvironmentOutput if *v == nil { - sv = &StartDevEnvironmentOutput{} + sv = &StopDevEnvironmentOutput{} } else { sv = *v } @@ -3828,14 +5174,14 @@ func awsRestjson1_deserializeOpDocumentStartDevEnvironmentOutput(v **StartDevEnv return nil } -type awsRestjson1_deserializeOpStartDevEnvironmentSession struct { +type awsRestjson1_deserializeOpStopDevEnvironmentSession struct { } -func (*awsRestjson1_deserializeOpStartDevEnvironmentSession) ID() string { +func (*awsRestjson1_deserializeOpStopDevEnvironmentSession) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStartDevEnvironmentSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpStopDevEnvironmentSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3849,9 +5195,9 @@ func (m *awsRestjson1_deserializeOpStartDevEnvironmentSession) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStartDevEnvironmentSession(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorStopDevEnvironmentSession(response, &metadata) } - output := &StartDevEnvironmentSessionOutput{} + output := &StopDevEnvironmentSessionOutput{} out.Result = output var buff [1024]byte @@ -3872,7 +5218,7 @@ func (m *awsRestjson1_deserializeOpStartDevEnvironmentSession) HandleDeserialize return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStartDevEnvironmentSessionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentStopDevEnvironmentSessionOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3885,7 +5231,7 @@ func (m *awsRestjson1_deserializeOpStartDevEnvironmentSession) HandleDeserialize return out, metadata, err } -func awsRestjson1_deserializeOpErrorStartDevEnvironmentSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorStopDevEnvironmentSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3954,7 +5300,7 @@ func awsRestjson1_deserializeOpErrorStartDevEnvironmentSession(response *smithyh } } -func awsRestjson1_deserializeOpDocumentStartDevEnvironmentSessionOutput(v **StartDevEnvironmentSessionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentStopDevEnvironmentSessionOutput(v **StopDevEnvironmentSessionOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -3967,20 +5313,15 @@ func awsRestjson1_deserializeOpDocumentStartDevEnvironmentSessionOutput(v **Star return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StartDevEnvironmentSessionOutput + var sv *StopDevEnvironmentSessionOutput if *v == nil { - sv = &StartDevEnvironmentSessionOutput{} + sv = &StopDevEnvironmentSessionOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "accessDetails": - if err := awsRestjson1_deserializeDocumentDevEnvironmentAccessDetails(&sv.AccessDetails, value); err != nil { - return err - } - case "id": if value != nil { jtv, ok := value.(string) @@ -4026,14 +5367,14 @@ func awsRestjson1_deserializeOpDocumentStartDevEnvironmentSessionOutput(v **Star return nil } -type awsRestjson1_deserializeOpStopDevEnvironment struct { +type awsRestjson1_deserializeOpUpdateDevEnvironment struct { } -func (*awsRestjson1_deserializeOpStopDevEnvironment) ID() string { +func (*awsRestjson1_deserializeOpUpdateDevEnvironment) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopDevEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateDevEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4047,9 +5388,9 @@ func (m *awsRestjson1_deserializeOpStopDevEnvironment) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopDevEnvironment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateDevEnvironment(response, &metadata) } - output := &StopDevEnvironmentOutput{} + output := &UpdateDevEnvironmentOutput{} out.Result = output var buff [1024]byte @@ -4070,7 +5411,7 @@ func (m *awsRestjson1_deserializeOpStopDevEnvironment) HandleDeserialize(ctx con return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStopDevEnvironmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateDevEnvironmentOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4083,7 +5424,7 @@ func (m *awsRestjson1_deserializeOpStopDevEnvironment) HandleDeserialize(ctx con return out, metadata, err } -func awsRestjson1_deserializeOpErrorStopDevEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateDevEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4152,7 +5493,7 @@ func awsRestjson1_deserializeOpErrorStopDevEnvironment(response *smithyhttp.Resp } } -func awsRestjson1_deserializeOpDocumentStopDevEnvironmentOutput(v **StopDevEnvironmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateDevEnvironmentOutput(v **UpdateDevEnvironmentOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4165,15 +5506,33 @@ func awsRestjson1_deserializeOpDocumentStopDevEnvironmentOutput(v **StopDevEnvir return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StopDevEnvironmentOutput + var sv *UpdateDevEnvironmentOutput if *v == nil { - sv = &StopDevEnvironmentOutput{} + sv = &UpdateDevEnvironmentOutput{} } else { sv = *v } for key, value := range shape { switch key { + case "alias": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Alias = ptr.String(jtv) + } + + case "clientToken": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ClientToken to be of type string, got %T instead", value) + } + sv.ClientToken = ptr.String(jtv) + } + case "id": if value != nil { jtv, ok := value.(string) @@ -4183,31 +5542,49 @@ func awsRestjson1_deserializeOpDocumentStopDevEnvironmentOutput(v **StopDevEnvir sv.Id = ptr.String(jtv) } - case "projectName": + case "ides": + if err := awsRestjson1_deserializeDocumentIdeConfigurationList(&sv.Ides, value); err != nil { + return err + } + + case "inactivityTimeoutMinutes": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InactivityTimeoutMinutes to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InactivityTimeoutMinutes = int32(i64) + } + + case "instanceType": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) } - sv.ProjectName = ptr.String(jtv) + sv.InstanceType = types.InstanceType(jtv) } - case "spaceName": + case "projectName": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NameString to be of type string, got %T instead", value) } - sv.SpaceName = ptr.String(jtv) + sv.ProjectName = ptr.String(jtv) } - case "status": + case "spaceName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected DevEnvironmentStatus to be of type string, got %T instead", value) + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) } - sv.Status = types.DevEnvironmentStatus(jtv) + sv.SpaceName = ptr.String(jtv) } default: @@ -4219,14 +5596,14 @@ func awsRestjson1_deserializeOpDocumentStopDevEnvironmentOutput(v **StopDevEnvir return nil } -type awsRestjson1_deserializeOpStopDevEnvironmentSession struct { +type awsRestjson1_deserializeOpUpdateProject struct { } -func (*awsRestjson1_deserializeOpStopDevEnvironmentSession) ID() string { +func (*awsRestjson1_deserializeOpUpdateProject) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpStopDevEnvironmentSession) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateProject) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4240,9 +5617,9 @@ func (m *awsRestjson1_deserializeOpStopDevEnvironmentSession) HandleDeserialize( } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorStopDevEnvironmentSession(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateProject(response, &metadata) } - output := &StopDevEnvironmentSessionOutput{} + output := &UpdateProjectOutput{} out.Result = output var buff [1024]byte @@ -4263,7 +5640,7 @@ func (m *awsRestjson1_deserializeOpStopDevEnvironmentSession) HandleDeserialize( return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentStopDevEnvironmentSessionOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateProjectOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4276,7 +5653,7 @@ func (m *awsRestjson1_deserializeOpStopDevEnvironmentSession) HandleDeserialize( return out, metadata, err } -func awsRestjson1_deserializeOpErrorStopDevEnvironmentSession(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4345,7 +5722,7 @@ func awsRestjson1_deserializeOpErrorStopDevEnvironmentSession(response *smithyht } } -func awsRestjson1_deserializeOpDocumentStopDevEnvironmentSessionOutput(v **StopDevEnvironmentSessionOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateProjectOutput(v **UpdateProjectOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4358,40 +5735,40 @@ func awsRestjson1_deserializeOpDocumentStopDevEnvironmentSessionOutput(v **StopD return fmt.Errorf("unexpected JSON type %v", value) } - var sv *StopDevEnvironmentSessionOutput + var sv *UpdateProjectOutput if *v == nil { - sv = &StopDevEnvironmentSessionOutput{} + sv = &UpdateProjectOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "id": + case "description": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Id = ptr.String(jtv) + sv.Description = ptr.String(jtv) } - case "projectName": + case "displayName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ProjectName = ptr.String(jtv) + sv.DisplayName = ptr.String(jtv) } - case "sessionId": + case "name": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) + return fmt.Errorf("expected NameString to be of type string, got %T instead", value) } - sv.SessionId = ptr.String(jtv) + sv.Name = ptr.String(jtv) } case "spaceName": @@ -4412,14 +5789,14 @@ func awsRestjson1_deserializeOpDocumentStopDevEnvironmentSessionOutput(v **StopD return nil } -type awsRestjson1_deserializeOpUpdateDevEnvironment struct { +type awsRestjson1_deserializeOpUpdateSpace struct { } -func (*awsRestjson1_deserializeOpUpdateDevEnvironment) ID() string { +func (*awsRestjson1_deserializeOpUpdateSpace) ID() string { return "OperationDeserializer" } -func (m *awsRestjson1_deserializeOpUpdateDevEnvironment) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsRestjson1_deserializeOpUpdateSpace) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -4433,9 +5810,9 @@ func (m *awsRestjson1_deserializeOpUpdateDevEnvironment) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsRestjson1_deserializeOpErrorUpdateDevEnvironment(response, &metadata) + return out, metadata, awsRestjson1_deserializeOpErrorUpdateSpace(response, &metadata) } - output := &UpdateDevEnvironmentOutput{} + output := &UpdateSpaceOutput{} out.Result = output var buff [1024]byte @@ -4456,7 +5833,7 @@ func (m *awsRestjson1_deserializeOpUpdateDevEnvironment) HandleDeserialize(ctx c return out, metadata, err } - err = awsRestjson1_deserializeOpDocumentUpdateDevEnvironmentOutput(&output, shape) + err = awsRestjson1_deserializeOpDocumentUpdateSpaceOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -4469,7 +5846,7 @@ func (m *awsRestjson1_deserializeOpUpdateDevEnvironment) HandleDeserialize(ctx c return out, metadata, err } -func awsRestjson1_deserializeOpErrorUpdateDevEnvironment(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsRestjson1_deserializeOpErrorUpdateSpace(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -4538,7 +5915,7 @@ func awsRestjson1_deserializeOpErrorUpdateDevEnvironment(response *smithyhttp.Re } } -func awsRestjson1_deserializeOpDocumentUpdateDevEnvironmentOutput(v **UpdateDevEnvironmentOutput, value interface{}) error { +func awsRestjson1_deserializeOpDocumentUpdateSpaceOutput(v **UpdateSpaceOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -4551,85 +5928,40 @@ func awsRestjson1_deserializeOpDocumentUpdateDevEnvironmentOutput(v **UpdateDevE return fmt.Errorf("unexpected JSON type %v", value) } - var sv *UpdateDevEnvironmentOutput + var sv *UpdateSpaceOutput if *v == nil { - sv = &UpdateDevEnvironmentOutput{} + sv = &UpdateSpaceOutput{} } else { sv = *v } for key, value := range shape { switch key { - case "alias": + case "description": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.Alias = ptr.String(jtv) - } - - case "clientToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientToken to be of type string, got %T instead", value) - } - sv.ClientToken = ptr.String(jtv) - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Uuid to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "ides": - if err := awsRestjson1_deserializeDocumentIdeConfigurationList(&sv.Ides, value); err != nil { - return err - } - - case "inactivityTimeoutMinutes": - if value != nil { - jtv, ok := value.(json.Number) - if !ok { - return fmt.Errorf("expected InactivityTimeoutMinutes to be json.Number, got %T instead", value) - } - i64, err := jtv.Int64() - if err != nil { - return err - } - sv.InactivityTimeoutMinutes = int32(i64) - } - - case "instanceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected InstanceType to be of type string, got %T instead", value) - } - sv.InstanceType = types.InstanceType(jtv) + sv.Description = ptr.String(jtv) } - case "projectName": + case "displayName": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected NameString to be of type string, got %T instead", value) + return fmt.Errorf("expected String to be of type string, got %T instead", value) } - sv.ProjectName = ptr.String(jtv) + sv.DisplayName = ptr.String(jtv) } - case "spaceName": + case "name": if value != nil { jtv, ok := value.(string) if !ok { return fmt.Errorf("expected NameString to be of type string, got %T instead", value) } - sv.SpaceName = ptr.String(jtv) + sv.Name = ptr.String(jtv) } default: diff --git a/service/codecatalyst/doc.go b/service/codecatalyst/doc.go index 5d43bf0a3a6..c9f6296e25c 100644 --- a/service/codecatalyst/doc.go +++ b/service/codecatalyst/doc.go @@ -5,35 +5,48 @@ // // Welcome to the Amazon CodeCatalyst API reference. This reference provides // descriptions of operations and data types for Amazon CodeCatalyst. You can use -// the Amazon CodeCatalyst API to work with the following objects. Dev Environments -// and the Amazon Web Services Toolkits, by calling the following: -// - CreateAccessToken , which creates a personal access token (PAT) for the -// current user. -// - CreateDevEnvironment , which creates a Dev Environment, where you can -// quickly work on the code stored in the source repositories of your project. -// - CreateProject which creates a project in a specified space. -// - CreateSourceRepositoryBranch , which creates a branch in a specified -// repository where you can work on code. -// - DeleteDevEnvironment , which deletes a Dev Environment. -// - GetDevEnvironment , which returns information about a Dev Environment. -// - GetProject , which returns information about a project. -// - GetSourceRepositoryCloneUrls , which returns information about the URLs that -// can be used with a Git client to clone a source repository. +// the Amazon CodeCatalyst API to work with the following objects. Spaces, by +// calling the following: +// - DeleteSpace , which deletes a space. // - GetSpace , which returns information about a space. // - GetSubscription , which returns information about the Amazon Web Services // account used for billing purposes and the billing plan for the space. +// - ListSpaces , which retrieves a list of spaces. +// - UpdateSpace , which hanges one or more values for a space. +// +// Projects, by calling the following: +// - CreateProject which creates a project in a specified space. +// - GetProject , which returns information about a project. +// - ListProjects , which retrieves a list of projects in a space. +// +// Users, by calling the following: // - GetUserDetails , which returns information about a user in Amazon // CodeCatalyst. -// - ListDevEnvironments , which retrieves a list of Dev Environments in a -// project. -// - ListDevEnvironmentSessions , which retrieves a list of active Dev -// Environment sessions in a project. -// - ListProjects , which retrieves a list of projects in a space. +// +// Source repositories, by calling the following: +// - CreateSourceRepository , which creates an empty Git-based source repository +// in a specified project. +// - CreateSourceRepositoryBranch , which creates a branch in a specified +// repository where you can work on code. +// - DeleteSourceRepository , which deletes a source repository. +// - GetSourceRepository , which returns information about a source repository. +// - GetSourceRepositoryCloneUrls , which returns information about the URLs that +// can be used with a Git client to clone a source repository. // - ListSourceRepositories , which retrieves a list of source repositories in a // project. // - ListSourceRepositoryBranches , which retrieves a list of branches in a // source repository. -// - ListSpaces , which retrieves a list of spaces. +// +// Dev Environments and the Amazon Web Services Toolkits, by calling the +// following: +// - CreateDevEnvironment , which creates a Dev Environment, where you can +// quickly work on the code stored in the source repositories of your project. +// - DeleteDevEnvironment , which deletes a Dev Environment. +// - GetDevEnvironment , which returns information about a Dev Environment. +// - ListDevEnvironments , which retrieves a list of Dev Environments in a +// project. +// - ListDevEnvironmentSessions , which retrieves a list of active Dev +// Environment sessions in a project. // - StartDevEnvironment , which starts a specified Dev Environment and puts it // into an active state. // - StartDevEnvironmentSession , which starts a session to a specified Dev @@ -44,16 +57,18 @@ // Environment. // - UpdateDevEnvironment , which changes one or more values for a Dev // Environment. -// - VerifySession , which verifies whether the calling user has a valid Amazon -// CodeCatalyst login and session. // // Security, activity, and resource management in Amazon CodeCatalyst, by calling // the following: +// - CreateAccessToken , which creates a personal access token (PAT) for the +// current user. // - DeleteAccessToken , which deletes a specified personal access token (PAT). // - ListAccessTokens , which lists all personal access tokens (PATs) associated // with a user. // - ListEventLogs , which retrieves a list of events that occurred during a // specified time period in a space. +// - VerifySession , which verifies whether the calling user has a valid Amazon +// CodeCatalyst login and session. // // If you are using the Amazon CodeCatalyst APIs with an SDK or the CLI, you must // configure your computer to work with Amazon CodeCatalyst and single sign-on diff --git a/service/codecatalyst/generated.json b/service/codecatalyst/generated.json index a316aa5d206..a10231fa942 100644 --- a/service/codecatalyst/generated.json +++ b/service/codecatalyst/generated.json @@ -11,11 +11,16 @@ "api_op_CreateAccessToken.go", "api_op_CreateDevEnvironment.go", "api_op_CreateProject.go", + "api_op_CreateSourceRepository.go", "api_op_CreateSourceRepositoryBranch.go", "api_op_DeleteAccessToken.go", "api_op_DeleteDevEnvironment.go", + "api_op_DeleteProject.go", + "api_op_DeleteSourceRepository.go", + "api_op_DeleteSpace.go", "api_op_GetDevEnvironment.go", "api_op_GetProject.go", + "api_op_GetSourceRepository.go", "api_op_GetSourceRepositoryCloneUrls.go", "api_op_GetSpace.go", "api_op_GetSubscription.go", @@ -33,6 +38,8 @@ "api_op_StopDevEnvironment.go", "api_op_StopDevEnvironmentSession.go", "api_op_UpdateDevEnvironment.go", + "api_op_UpdateProject.go", + "api_op_UpdateSpace.go", "api_op_VerifySession.go", "deserializers.go", "doc.go", diff --git a/service/codecatalyst/serializers.go b/service/codecatalyst/serializers.go index abf9447d3a2..40101b00009 100644 --- a/service/codecatalyst/serializers.go +++ b/service/codecatalyst/serializers.go @@ -300,6 +300,105 @@ func awsRestjson1_serializeOpDocumentCreateProjectInput(v *CreateProjectInput, v return nil } +type awsRestjson1_serializeOpCreateSourceRepository struct { +} + +func (*awsRestjson1_serializeOpCreateSourceRepository) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpCreateSourceRepository) 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.(*CreateSourceRepositoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PUT" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsCreateSourceRepositoryInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentCreateSourceRepositoryInput(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_serializeOpHttpBindingsCreateSourceRepositoryInput(v *CreateSourceRepositoryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + if v.ProjectName == nil || len(*v.ProjectName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member projectName must not be empty")} + } + if v.ProjectName != nil { + if err := encoder.SetURI("projectName").String(*v.ProjectName); err != nil { + return err + } + } + + if v.SpaceName == nil || len(*v.SpaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member spaceName must not be empty")} + } + if v.SpaceName != nil { + if err := encoder.SetURI("spaceName").String(*v.SpaceName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentCreateSourceRepositoryInput(v *CreateSourceRepositoryInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + return nil +} + type awsRestjson1_serializeOpCreateSourceRepositoryBranch struct { } @@ -542,6 +641,207 @@ func awsRestjson1_serializeOpHttpBindingsDeleteDevEnvironmentInput(v *DeleteDevE return nil } +type awsRestjson1_serializeOpDeleteProject struct { +} + +func (*awsRestjson1_serializeOpDeleteProject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteProject) 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.(*DeleteProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/spaces/{spaceName}/projects/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteProjectInput(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_serializeOpHttpBindingsDeleteProjectInput(v *DeleteProjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + if v.SpaceName == nil || len(*v.SpaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member spaceName must not be empty")} + } + if v.SpaceName != nil { + if err := encoder.SetURI("spaceName").String(*v.SpaceName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteSourceRepository struct { +} + +func (*awsRestjson1_serializeOpDeleteSourceRepository) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteSourceRepository) 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.(*DeleteSourceRepositoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteSourceRepositoryInput(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_serializeOpHttpBindingsDeleteSourceRepositoryInput(v *DeleteSourceRepositoryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + if v.ProjectName == nil || len(*v.ProjectName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member projectName must not be empty")} + } + if v.ProjectName != nil { + if err := encoder.SetURI("projectName").String(*v.ProjectName); err != nil { + return err + } + } + + if v.SpaceName == nil || len(*v.SpaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member spaceName must not be empty")} + } + if v.SpaceName != nil { + if err := encoder.SetURI("spaceName").String(*v.SpaceName); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpDeleteSpace struct { +} + +func (*awsRestjson1_serializeOpDeleteSpace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpDeleteSpace) 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.(*DeleteSpaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/spaces/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsDeleteSpaceInput(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_serializeOpHttpBindingsDeleteSpaceInput(v *DeleteSpaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetDevEnvironment struct { } @@ -685,6 +985,82 @@ func awsRestjson1_serializeOpHttpBindingsGetProjectInput(v *GetProjectInput, enc return nil } +type awsRestjson1_serializeOpGetSourceRepository struct { +} + +func (*awsRestjson1_serializeOpGetSourceRepository) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpGetSourceRepository) 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.(*GetSourceRepositoryInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/spaces/{spaceName}/projects/{projectName}/sourceRepositories/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsGetSourceRepositoryInput(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_serializeOpHttpBindingsGetSourceRepositoryInput(v *GetSourceRepositoryInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + if v.ProjectName == nil || len(*v.ProjectName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member projectName must not be empty")} + } + if v.ProjectName != nil { + if err := encoder.SetURI("projectName").String(*v.ProjectName); err != nil { + return err + } + } + + if v.SpaceName == nil || len(*v.SpaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member spaceName must not be empty")} + } + if v.SpaceName != nil { + if err := encoder.SetURI("spaceName").String(*v.SpaceName); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpGetSourceRepositoryCloneUrls struct { } @@ -2168,6 +2544,177 @@ func awsRestjson1_serializeOpDocumentUpdateDevEnvironmentInput(v *UpdateDevEnvir return nil } +type awsRestjson1_serializeOpUpdateProject struct { +} + +func (*awsRestjson1_serializeOpUpdateProject) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateProject) 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.(*UpdateProjectInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/spaces/{spaceName}/projects/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateProjectInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateProjectInput(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_serializeOpHttpBindingsUpdateProjectInput(v *UpdateProjectInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + if v.SpaceName == nil || len(*v.SpaceName) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member spaceName must not be empty")} + } + if v.SpaceName != nil { + if err := encoder.SetURI("spaceName").String(*v.SpaceName); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateProjectInput(v *UpdateProjectInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + return nil +} + +type awsRestjson1_serializeOpUpdateSpace struct { +} + +func (*awsRestjson1_serializeOpUpdateSpace) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUpdateSpace) 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.(*UpdateSpaceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/spaces/{name}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "PATCH" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUpdateSpaceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentUpdateSpaceInput(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_serializeOpHttpBindingsUpdateSpaceInput(v *UpdateSpaceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.Name == nil || len(*v.Name) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member name must not be empty")} + } + if v.Name != nil { + if err := encoder.SetURI("name").String(*v.Name); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentUpdateSpaceInput(v *UpdateSpaceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Description != nil { + ok := object.Key("description") + ok.String(*v.Description) + } + + return nil +} + type awsRestjson1_serializeOpVerifySession struct { } diff --git a/service/codecatalyst/types/types.go b/service/codecatalyst/types/types.go index 0f677155cd8..ed9104c3410 100644 --- a/service/codecatalyst/types/types.go +++ b/service/codecatalyst/types/types.go @@ -250,7 +250,7 @@ type EventLogEntry struct { // The IP address of the user whose actions are recorded in the event. SourceIpAddress *string - // + // The user agent whose actions are recorded in the event. UserAgent *string noSmithyDocumentSerde @@ -284,19 +284,20 @@ type ExecuteCommandSessionConfiguration struct { noSmithyDocumentSerde } +// Information about a filter used to limit results of a query. type Filter struct { - // + // A key that can be used to sort results. // // This member is required. Key *string - // + // The values of the key. // // This member is required. Values []string - // + // The operator used to compare the fields. ComparisonOperator *string noSmithyDocumentSerde @@ -431,7 +432,7 @@ type ProjectListFilter struct { // This member is required. Key FilterKey - // The value of the key. + // The values of the key. // // This member is required. Values []string @@ -498,7 +499,7 @@ type SpaceSummary struct { // Information about a user whose activity is recorded in an event for a space. type UserIdentity struct { - // + // The ID of the Amazon CodeCatalyst service principal. // // This member is required. PrincipalId *string diff --git a/service/codecatalyst/validators.go b/service/codecatalyst/validators.go index 05ecf9eaace..0c8226c7c5f 100644 --- a/service/codecatalyst/validators.go +++ b/service/codecatalyst/validators.go @@ -90,6 +90,26 @@ func (m *validateOpCreateSourceRepositoryBranch) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpCreateSourceRepository struct { +} + +func (*validateOpCreateSourceRepository) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateSourceRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateSourceRepositoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateSourceRepositoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteAccessToken struct { } @@ -130,6 +150,66 @@ func (m *validateOpDeleteDevEnvironment) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpDeleteProject struct { +} + +func (*validateOpDeleteProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteSourceRepository struct { +} + +func (*validateOpDeleteSourceRepository) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteSourceRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteSourceRepositoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteSourceRepositoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpDeleteSpace struct { +} + +func (*validateOpDeleteSpace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteSpace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteSpaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteSpaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetDevEnvironment struct { } @@ -190,6 +270,26 @@ func (m *validateOpGetSourceRepositoryCloneUrls) HandleInitialize(ctx context.Co return next.HandleInitialize(ctx, in) } +type validateOpGetSourceRepository struct { +} + +func (*validateOpGetSourceRepository) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetSourceRepository) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetSourceRepositoryInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetSourceRepositoryInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetSpace struct { } @@ -450,6 +550,46 @@ func (m *validateOpUpdateDevEnvironment) HandleInitialize(ctx context.Context, i return next.HandleInitialize(ctx, in) } +type validateOpUpdateProject struct { +} + +func (*validateOpUpdateProject) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateProjectInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateProjectInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUpdateSpace struct { +} + +func (*validateOpUpdateSpace) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateSpace) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateSpaceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateSpaceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + func addOpCreateAccessTokenValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateAccessToken{}, middleware.After) } @@ -466,6 +606,10 @@ func addOpCreateSourceRepositoryBranchValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpCreateSourceRepositoryBranch{}, middleware.After) } +func addOpCreateSourceRepositoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateSourceRepository{}, middleware.After) +} + func addOpDeleteAccessTokenValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteAccessToken{}, middleware.After) } @@ -474,6 +618,18 @@ func addOpDeleteDevEnvironmentValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpDeleteDevEnvironment{}, middleware.After) } +func addOpDeleteProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteProject{}, middleware.After) +} + +func addOpDeleteSourceRepositoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSourceRepository{}, middleware.After) +} + +func addOpDeleteSpaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteSpace{}, middleware.After) +} + func addOpGetDevEnvironmentValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetDevEnvironment{}, middleware.After) } @@ -486,6 +642,10 @@ func addOpGetSourceRepositoryCloneUrlsValidationMiddleware(stack *middleware.Sta return stack.Initialize.Add(&validateOpGetSourceRepositoryCloneUrls{}, middleware.After) } +func addOpGetSourceRepositoryValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetSourceRepository{}, middleware.After) +} + func addOpGetSpaceValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSpace{}, middleware.After) } @@ -538,6 +698,14 @@ func addOpUpdateDevEnvironmentValidationMiddleware(stack *middleware.Stack) erro return stack.Initialize.Add(&validateOpUpdateDevEnvironment{}, middleware.After) } +func addOpUpdateProjectValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateProject{}, middleware.After) +} + +func addOpUpdateSpaceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateSpace{}, middleware.After) +} + func validateDevEnvironmentSessionConfiguration(v *types.DevEnvironmentSessionConfiguration) error { if v == nil { return nil @@ -780,6 +948,27 @@ func validateOpCreateSourceRepositoryBranchInput(v *CreateSourceRepositoryBranch } } +func validateOpCreateSourceRepositoryInput(v *CreateSourceRepositoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateSourceRepositoryInput"} + if v.SpaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SpaceName")) + } + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteAccessTokenInput(v *DeleteAccessTokenInput) error { if v == nil { return nil @@ -816,6 +1005,60 @@ func validateOpDeleteDevEnvironmentInput(v *DeleteDevEnvironmentInput) error { } } +func validateOpDeleteProjectInput(v *DeleteProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteProjectInput"} + if v.SpaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SpaceName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteSourceRepositoryInput(v *DeleteSourceRepositoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteSourceRepositoryInput"} + if v.SpaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SpaceName")) + } + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpDeleteSpaceInput(v *DeleteSpaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteSpaceInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetDevEnvironmentInput(v *GetDevEnvironmentInput) error { if v == nil { return nil @@ -876,6 +1119,27 @@ func validateOpGetSourceRepositoryCloneUrlsInput(v *GetSourceRepositoryCloneUrls } } +func validateOpGetSourceRepositoryInput(v *GetSourceRepositoryInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetSourceRepositoryInput"} + if v.SpaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SpaceName")) + } + if v.ProjectName == nil { + invalidParams.Add(smithy.NewErrParamRequired("ProjectName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetSpaceInput(v *GetSpaceInput) error { if v == nil { return nil @@ -1144,3 +1408,36 @@ func validateOpUpdateDevEnvironmentInput(v *UpdateDevEnvironmentInput) error { return nil } } + +func validateOpUpdateProjectInput(v *UpdateProjectInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectInput"} + if v.SpaceName == nil { + invalidParams.Add(smithy.NewErrParamRequired("SpaceName")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUpdateSpaceInput(v *UpdateSpaceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateSpaceInput"} + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} diff --git a/service/connectcases/api_op_DeleteDomain.go b/service/connectcases/api_op_DeleteDomain.go index 20c50f3dff3..7f53e4aa4b3 100644 --- a/service/connectcases/api_op_DeleteDomain.go +++ b/service/connectcases/api_op_DeleteDomain.go @@ -10,7 +10,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Deletes a domain. +// Deletes a Cases domain. After deleting your domain you must disassociate the +// deleted domain from your Amazon Connect instance with another API call before +// being able to use Cases again with this Amazon Connect instance. See +// DeleteIntegrationAssociation (https://docs.aws.amazon.com/connect/latest/APIReference/API_DeleteIntegrationAssociation.html) +// . func (c *Client) DeleteDomain(ctx context.Context, params *DeleteDomainInput, optFns ...func(*Options)) (*DeleteDomainOutput, error) { if params == nil { params = &DeleteDomainInput{} diff --git a/service/connectcases/deserializers.go b/service/connectcases/deserializers.go index f76551ee0a2..95f06ebae5f 100644 --- a/service/connectcases/deserializers.go +++ b/service/connectcases/deserializers.go @@ -5440,6 +5440,37 @@ func awsRestjson1_deserializeDocumentDomainSummaryList(v *[]types.DomainSummary, return nil } +func awsRestjson1_deserializeDocumentEmptyFieldValue(v **types.EmptyFieldValue, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.EmptyFieldValue + if *v == nil { + sv = &types.EmptyFieldValue{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsRestjson1_deserializeDocumentEventBridgeConfiguration(v **types.EventBridgeConfiguration, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -6219,6 +6250,16 @@ loop: uv = &types.FieldValueUnionMemberDoubleValue{Value: mv} break loop + case "emptyValue": + var mv types.EmptyFieldValue + destAddr := &mv + if err := awsRestjson1_deserializeDocumentEmptyFieldValue(&destAddr, value); err != nil { + return err + } + mv = *destAddr + uv = &types.FieldValueUnionMemberEmptyValue{Value: mv} + break loop + case "stringValue": var mv string if value != nil { diff --git a/service/connectcases/serializers.go b/service/connectcases/serializers.go index 10fa5a77d29..187347fc233 100644 --- a/service/connectcases/serializers.go +++ b/service/connectcases/serializers.go @@ -2541,6 +2541,12 @@ func awsRestjson1_serializeDocumentCaseFilter(v types.CaseFilter, value smithyjs return err } + case *types.CaseFilterMemberOrAll: + av := object.Key("orAll") + if err := awsRestjson1_serializeDocumentCaseFilterList(uv.Value, av); err != nil { + return err + } + default: return fmt.Errorf("attempted to serialize unknown member type %T for union %T", uv, v) @@ -2630,6 +2636,13 @@ func awsRestjson1_serializeDocumentContactFilter(v *types.ContactFilter, value s return nil } +func awsRestjson1_serializeDocumentEmptyFieldValue(v *types.EmptyFieldValue, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + return nil +} + func awsRestjson1_serializeDocumentEventBridgeConfiguration(v *types.EventBridgeConfiguration, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -2880,6 +2893,12 @@ func awsRestjson1_serializeDocumentFieldValueUnion(v types.FieldValueUnion, valu } + case *types.FieldValueUnionMemberEmptyValue: + av := object.Key("emptyValue") + if err := awsRestjson1_serializeDocumentEmptyFieldValue(&uv.Value, av); err != nil { + return err + } + case *types.FieldValueUnionMemberStringValue: av := object.Key("stringValue") av.String(uv.Value) diff --git a/service/connectcases/types/types.go b/service/connectcases/types/types.go index 16f475b8ea2..878a5128cc1 100644 --- a/service/connectcases/types/types.go +++ b/service/connectcases/types/types.go @@ -38,6 +38,7 @@ type CaseEventIncludedData struct { // CaseFilterMemberAndAll // CaseFilterMemberField // CaseFilterMemberNot +// CaseFilterMemberOrAll type CaseFilter interface { isCaseFilter() } @@ -69,6 +70,15 @@ type CaseFilterMemberNot struct { func (*CaseFilterMemberNot) isCaseFilter() {} +// Provides "or all" filtering. +type CaseFilterMemberOrAll struct { + Value []CaseFilter + + noSmithyDocumentSerde +} + +func (*CaseFilterMemberOrAll) isCaseFilter() {} + // Case summary information. type CaseSummary struct { @@ -172,6 +182,13 @@ type DomainSummary struct { noSmithyDocumentSerde } +// An empty value. You cannot set EmptyFieldValue on a field that is required on a +// case template. This structure will never have any data members. It signifies an +// empty value on a case field. +type EmptyFieldValue struct { + noSmithyDocumentSerde +} + // Configuration to enable EventBridge case event delivery and determine what data // is delivered. type EventBridgeConfiguration struct { @@ -420,6 +437,7 @@ type FieldValue struct { // // FieldValueUnionMemberBooleanValue // FieldValueUnionMemberDoubleValue +// FieldValueUnionMemberEmptyValue // FieldValueUnionMemberStringValue type FieldValueUnion interface { isFieldValueUnion() @@ -445,6 +463,15 @@ type FieldValueUnionMemberDoubleValue struct { func (*FieldValueUnionMemberDoubleValue) isFieldValueUnion() {} +// An empty value. +type FieldValueUnionMemberEmptyValue struct { + Value EmptyFieldValue + + noSmithyDocumentSerde +} + +func (*FieldValueUnionMemberEmptyValue) isFieldValueUnion() {} + // String value type. type FieldValueUnionMemberStringValue struct { Value string diff --git a/service/connectcases/types/types_exported_test.go b/service/connectcases/types/types_exported_test.go index 352d597913a..13cc167a0d5 100644 --- a/service/connectcases/types/types_exported_test.go +++ b/service/connectcases/types/types_exported_test.go @@ -20,6 +20,9 @@ func ExampleCaseFilter_outputUsage() { case *types.CaseFilterMemberNot: _ = v.Value // Value is types.CaseFilter + case *types.CaseFilterMemberOrAll: + _ = v.Value // Value is []types.CaseFilter + case *types.UnknownUnionMember: fmt.Println("unknown tag:", v.Tag) @@ -76,6 +79,9 @@ func ExampleFieldValueUnion_outputUsage() { case *types.FieldValueUnionMemberDoubleValue: _ = v.Value // Value is float64 + case *types.FieldValueUnionMemberEmptyValue: + _ = v.Value // Value is types.EmptyFieldValue + case *types.FieldValueUnionMemberStringValue: _ = v.Value // Value is string @@ -88,6 +94,7 @@ func ExampleFieldValueUnion_outputUsage() { } } +var _ *types.EmptyFieldValue var _ *string var _ *bool var _ *float64 diff --git a/service/connectcases/validators.go b/service/connectcases/validators.go index ff58c3ef36c..637e63bfdfb 100644 --- a/service/connectcases/validators.go +++ b/service/connectcases/validators.go @@ -785,6 +785,11 @@ func validateCaseFilter(v types.CaseFilter) error { invalidParams.AddNested("[not]", err.(smithy.InvalidParamsError)) } + case *types.CaseFilterMemberOrAll: + if err := validateCaseFilterList(uv.Value); err != nil { + invalidParams.AddNested("[orAll]", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams diff --git a/service/lexmodelsv2/api_op_ListIntentStageMetrics.go b/service/lexmodelsv2/api_op_ListIntentStageMetrics.go index 9689919fc59..08ae9de1c01 100644 --- a/service/lexmodelsv2/api_op_ListIntentStageMetrics.go +++ b/service/lexmodelsv2/api_op_ListIntentStageMetrics.go @@ -13,8 +13,8 @@ import ( "time" ) -// Retrieves summary metrics for the intent stages in your bot. The following -// fields are required: +// Retrieves summary metrics for the stages within intents in your bot. The +// following fields are required: // - metrics – A list of AnalyticsIntentStageMetric (https://docs.aws.amazon.com/lexv2/latest/APIReference/API_AnalyticsIntentStageMetric.html) // objects. In each object, use the name field to specify the metric to // calculate, the statistic field to specify whether to calculate the Sum , diff --git a/service/lexmodelsv2/api_op_ListUtteranceAnalyticsData.go b/service/lexmodelsv2/api_op_ListUtteranceAnalyticsData.go index 0e490f86fe8..ff9a3920f21 100644 --- a/service/lexmodelsv2/api_op_ListUtteranceAnalyticsData.go +++ b/service/lexmodelsv2/api_op_ListUtteranceAnalyticsData.go @@ -13,10 +13,16 @@ import ( "time" ) -// Retrieves a list of metadata for individual user utterances to your bot. The -// startDateTime and endDateTime fields are required. These fields define a time -// range for which you want to retrieve results. Of the optional fields, you can -// organize the results in the following ways: +// To use this API operation, your IAM role must have permissions to perform the +// ListAggregatedUtterances (https://docs.aws.amazon.com/lexv2/latest/APIReference/API_ListAggregatedUtterances.html) +// operation, which provides access to utterance-related analytics. See Viewing +// utterance statistics (https://docs.aws.amazon.com/lexv2/latest/dg/monitoring-utterances.html) +// for the IAM policy to apply to the IAM role. Retrieves a list of metadata for +// individual user utterances to your bot. The following fields are required: +// - startDateTime and endDateTime – Define a time range for which you want to +// retrieve results. +// +// Of the optional fields, you can organize the results in the following ways: // - Use the filters field to filter the results and the sortBy field to specify // the values by which to sort the results. // - Use the maxResults field to limit the number of results to return in a diff --git a/service/lexmodelsv2/api_op_ListUtteranceMetrics.go b/service/lexmodelsv2/api_op_ListUtteranceMetrics.go index cd2e6705b27..9bc95bcc2d0 100644 --- a/service/lexmodelsv2/api_op_ListUtteranceMetrics.go +++ b/service/lexmodelsv2/api_op_ListUtteranceMetrics.go @@ -13,8 +13,12 @@ import ( "time" ) -// Retrieves summary metrics for the utterances in your bot. The following fields -// are required: +// To use this API operation, your IAM role must have permissions to perform the +// ListAggregatedUtterances (https://docs.aws.amazon.com/lexv2/latest/APIReference/API_ListAggregatedUtterances.html) +// operation, which provides access to utterance-related analytics. See Viewing +// utterance statistics (https://docs.aws.amazon.com/lexv2/latest/dg/monitoring-utterances.html) +// for the IAM policy to apply to the IAM role. Retrieves summary metrics for the +// utterances in your bot. The following fields are required: // - metrics – A list of AnalyticsUtteranceMetric (https://docs.aws.amazon.com/lexv2/latest/APIReference/API_AnalyticsUtteranceMetric.html) // objects. In each object, use the name field to specify the metric to // calculate, the statistic field to specify whether to calculate the Sum , diff --git a/service/lexmodelsv2/deserializers.go b/service/lexmodelsv2/deserializers.go index bb97be831dd..5fe2aa41b02 100644 --- a/service/lexmodelsv2/deserializers.go +++ b/service/lexmodelsv2/deserializers.go @@ -28611,9 +28611,9 @@ func awsRestjson1_deserializeDocumentSessionSpecification(v **types.SessionSpeci if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BotChannelType to be of type string, got %T instead", value) + return fmt.Errorf("expected AnalyticsChannel to be of type string, got %T instead", value) } - sv.Channel = types.BotChannelType(jtv) + sv.Channel = ptr.String(jtv) } case "conversationDurationSeconds": @@ -32725,9 +32725,9 @@ func awsRestjson1_deserializeDocumentUtteranceSpecification(v **types.UtteranceS if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected BotChannelType to be of type string, got %T instead", value) + return fmt.Errorf("expected AnalyticsChannel to be of type string, got %T instead", value) } - sv.Channel = types.BotChannelType(jtv) + sv.Channel = ptr.String(jtv) } case "conversationEndTime": diff --git a/service/lexmodelsv2/types/enums.go b/service/lexmodelsv2/types/enums.go index f15800ccc67..e3f378f8ee2 100644 --- a/service/lexmodelsv2/types/enums.go +++ b/service/lexmodelsv2/types/enums.go @@ -632,26 +632,6 @@ func (BotAliasStatus) Values() []BotAliasStatus { } } -type BotChannelType string - -// Enum values for BotChannelType -const ( - BotChannelTypeFacebook BotChannelType = "Facebook" - BotChannelTypeSlack BotChannelType = "Slack" - BotChannelTypeTwilioSms BotChannelType = "TwilioSms" -) - -// Values returns all known values for BotChannelType. 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 (BotChannelType) Values() []BotChannelType { - return []BotChannelType{ - "Facebook", - "Slack", - "TwilioSms", - } -} - type BotFilterName string // Enum values for BotFilterName diff --git a/service/lexmodelsv2/types/types.go b/service/lexmodelsv2/types/types.go index 3a817eb50c2..e960e0c84dc 100644 --- a/service/lexmodelsv2/types/types.go +++ b/service/lexmodelsv2/types/types.go @@ -932,7 +932,7 @@ type AnalyticsUtteranceMetricResult struct { // - Count – The number of utterances. // - Missed – The number of utterances that Amazon Lex failed to recognize. // - Detected – The number of utterances that Amazon Lex managed to detect. - // - UtteranceTimeStamp – The date and time of the utterance. + // - UtteranceTimestamp – The date and time of the utterance. Name AnalyticsUtteranceMetricName // The summary statistic that you requested to calculate. @@ -3543,7 +3543,7 @@ type SessionSpecification struct { BotVersion *string // The channel that is integrated with the bot that the session was held with. - Channel BotChannelType + Channel *string // The duration of the conversation in seconds. A conversation is defined as a // unique combination of a sessionId and an originatingRequestId . @@ -4728,7 +4728,7 @@ type UtteranceDataSortBy struct { // The measure by which to sort the utterance analytics data. // - Count – The number of utterances. - // - UtteranceTimeStamp – The date and time of the utterance. + // - UtteranceTimestamp – The date and time of the utterance. // // This member is required. Name AnalyticsUtteranceSortByName @@ -4813,7 +4813,7 @@ type UtteranceSpecification struct { BotVersion *string // The channel that is integrated with the bot that the utterance was made to. - Channel BotChannelType + Channel *string // The date and time when the conversation in which the utterance took place // ended. A conversation is defined as a unique combination of a sessionId and an diff --git a/service/route53resolver/api_op_CreateOutpostResolver.go b/service/route53resolver/api_op_CreateOutpostResolver.go new file mode 100644 index 00000000000..b9782ae85b7 --- /dev/null +++ b/service/route53resolver/api_op_CreateOutpostResolver.go @@ -0,0 +1,152 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53resolver + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53resolver/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Creates an Route 53 Resolver on an Outpost. +func (c *Client) CreateOutpostResolver(ctx context.Context, params *CreateOutpostResolverInput, optFns ...func(*Options)) (*CreateOutpostResolverOutput, error) { + if params == nil { + params = &CreateOutpostResolverInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "CreateOutpostResolver", params, optFns, c.addOperationCreateOutpostResolverMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*CreateOutpostResolverOutput) + out.ResultMetadata = metadata + return out, nil +} + +type CreateOutpostResolverInput struct { + + // A unique string that identifies the request and that allows failed requests to + // be retried without the risk of running the operation twice. CreatorRequestId + // can be any unique string, for example, a date/time stamp. + // + // This member is required. + CreatorRequestId *string + + // A friendly name that lets you easily find a configuration in the Resolver + // dashboard in the Route 53 console. + // + // This member is required. + Name *string + + // The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must + // also specify a value for the PreferredInstanceType . + // + // This member is required. + OutpostArn *string + + // The Amazon EC2 instance type. If you specify this, you must also specify a + // value for the OutpostArn . + // + // This member is required. + PreferredInstanceType *string + + // Number of Amazon EC2 instances for the Resolver on Outpost. The default and + // minimal value is 4. + InstanceCount *int32 + + // A string that helps identify the Route 53 Resolvers on Outpost. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type CreateOutpostResolverOutput struct { + + // Information about the CreateOutpostResolver request, including the status of + // the request. + OutpostResolver *types.OutpostResolver + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationCreateOutpostResolverMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateOutpostResolver{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateOutpostResolver{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpCreateOutpostResolverValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateOutpostResolver(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opCreateOutpostResolver(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53resolver", + OperationName: "CreateOutpostResolver", + } +} diff --git a/service/route53resolver/api_op_CreateResolverEndpoint.go b/service/route53resolver/api_op_CreateResolverEndpoint.go index 2f4ca80537c..3cc55cf11d0 100644 --- a/service/route53resolver/api_op_CreateResolverEndpoint.go +++ b/service/route53resolver/api_op_CreateResolverEndpoint.go @@ -71,7 +71,15 @@ type CreateResolverEndpointInput struct { // dashboard in the Route 53 console. Name *string - // For the endpoint type you can choose either IPv4, IPv6. or dual-stack. A + // The Amazon Resource Name (ARN) of the Outpost. If you specify this, you must + // also specify a value for the PreferredInstanceType . + OutpostArn *string + + // The instance type. If you specify this, you must also specify a value for the + // OutpostArn . + PreferredInstanceType *string + + // For the endpoint type you can choose either IPv4, IPv6, or dual-stack. A // dual-stack endpoint means that it will resolve via both IPv4 and IPv6. This // endpoint type is applied to all IP addresses. ResolverEndpointType types.ResolverEndpointType diff --git a/service/route53resolver/api_op_CreateResolverRule.go b/service/route53resolver/api_op_CreateResolverRule.go index a4215626819..e64efc15c72 100644 --- a/service/route53resolver/api_op_CreateResolverRule.go +++ b/service/route53resolver/api_op_CreateResolverRule.go @@ -69,9 +69,10 @@ type CreateResolverRuleInput struct { // A list of the tag keys and values that you want to associate with the endpoint. Tags []types.Tag - // The IPs that you want Resolver to forward DNS queries to. You can specify only - // IPv4 addresses. Separate IP addresses with a space. TargetIps is available only - // when the value of Rule type is FORWARD . + // The IPs that you want Resolver to forward DNS queries to. You can specify + // either Ipv4 or Ipv6 addresses but not both in the same rule. Separate IP + // addresses with a space. TargetIps is available only when the value of Rule type + // is FORWARD . TargetIps []types.TargetAddress noSmithyDocumentSerde diff --git a/service/route53resolver/api_op_DeleteOutpostResolver.go b/service/route53resolver/api_op_DeleteOutpostResolver.go new file mode 100644 index 00000000000..793329c207c --- /dev/null +++ b/service/route53resolver/api_op_DeleteOutpostResolver.go @@ -0,0 +1,125 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53resolver + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53resolver/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Deletes a Resolver on the Outpost. +func (c *Client) DeleteOutpostResolver(ctx context.Context, params *DeleteOutpostResolverInput, optFns ...func(*Options)) (*DeleteOutpostResolverOutput, error) { + if params == nil { + params = &DeleteOutpostResolverInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "DeleteOutpostResolver", params, optFns, c.addOperationDeleteOutpostResolverMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*DeleteOutpostResolverOutput) + out.ResultMetadata = metadata + return out, nil +} + +type DeleteOutpostResolverInput struct { + + // A unique string that identifies the Resolver on the Outpost. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type DeleteOutpostResolverOutput struct { + + // Information about the DeleteOutpostResolver request, including the status of + // the request. + OutpostResolver *types.OutpostResolver + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationDeleteOutpostResolverMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteOutpostResolver{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteOutpostResolver{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpDeleteOutpostResolverValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteOutpostResolver(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opDeleteOutpostResolver(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53resolver", + OperationName: "DeleteOutpostResolver", + } +} diff --git a/service/route53resolver/api_op_GetOutpostResolver.go b/service/route53resolver/api_op_GetOutpostResolver.go new file mode 100644 index 00000000000..5b2769dac7f --- /dev/null +++ b/service/route53resolver/api_op_GetOutpostResolver.go @@ -0,0 +1,126 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53resolver + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53resolver/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Gets information about a specified Resolver on the Outpost, such as its +// instance count and type, name, and the current status of the Resolver. +func (c *Client) GetOutpostResolver(ctx context.Context, params *GetOutpostResolverInput, optFns ...func(*Options)) (*GetOutpostResolverOutput, error) { + if params == nil { + params = &GetOutpostResolverInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "GetOutpostResolver", params, optFns, c.addOperationGetOutpostResolverMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*GetOutpostResolverOutput) + out.ResultMetadata = metadata + return out, nil +} + +type GetOutpostResolverInput struct { + + // The ID of the Resolver on the Outpost. + // + // This member is required. + Id *string + + noSmithyDocumentSerde +} + +type GetOutpostResolverOutput struct { + + // Information about the GetOutpostResolver request, including the status of the + // request. + OutpostResolver *types.OutpostResolver + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationGetOutpostResolverMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpGetOutpostResolver{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpGetOutpostResolver{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpGetOutpostResolverValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opGetOutpostResolver(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opGetOutpostResolver(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53resolver", + OperationName: "GetOutpostResolver", + } +} diff --git a/service/route53resolver/api_op_ListOutpostResolvers.go b/service/route53resolver/api_op_ListOutpostResolvers.go new file mode 100644 index 00000000000..3ff6112230c --- /dev/null +++ b/service/route53resolver/api_op_ListOutpostResolvers.go @@ -0,0 +1,228 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53resolver + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53resolver/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Lists all the Resolvers on Outposts that were created using the current Amazon +// Web Services account. +func (c *Client) ListOutpostResolvers(ctx context.Context, params *ListOutpostResolversInput, optFns ...func(*Options)) (*ListOutpostResolversOutput, error) { + if params == nil { + params = &ListOutpostResolversInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListOutpostResolvers", params, optFns, c.addOperationListOutpostResolversMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListOutpostResolversOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListOutpostResolversInput struct { + + // The maximum number of Resolvers on the Outpost that you want to return in the + // response to a ListOutpostResolver request. If you don't specify a value for + // MaxResults , the request returns up to 100 Resolvers. + MaxResults *int32 + + // For the first ListOutpostResolver request, omit this value. + NextToken *string + + // The Amazon Resource Name (ARN) of the Outpost. + OutpostArn *string + + noSmithyDocumentSerde +} + +type ListOutpostResolversOutput struct { + + // If more than MaxResults Resolvers match the specified criteria, you can submit + // another ListOutpostResolver request to get the next group of results. In the + // next request, specify the value of NextToken from the previous response. + NextToken *string + + // The Resolvers on Outposts that were created by using the current Amazon Web + // Services account, and that match the specified filters, if any. + OutpostResolvers []types.OutpostResolver + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListOutpostResolversMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListOutpostResolvers{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListOutpostResolvers{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListOutpostResolvers(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +// ListOutpostResolversAPIClient is a client that implements the +// ListOutpostResolvers operation. +type ListOutpostResolversAPIClient interface { + ListOutpostResolvers(context.Context, *ListOutpostResolversInput, ...func(*Options)) (*ListOutpostResolversOutput, error) +} + +var _ ListOutpostResolversAPIClient = (*Client)(nil) + +// ListOutpostResolversPaginatorOptions is the paginator options for +// ListOutpostResolvers +type ListOutpostResolversPaginatorOptions struct { + // The maximum number of Resolvers on the Outpost that you want to return in the + // response to a ListOutpostResolver request. If you don't specify a value for + // MaxResults , the request returns up to 100 Resolvers. + 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 +} + +// ListOutpostResolversPaginator is a paginator for ListOutpostResolvers +type ListOutpostResolversPaginator struct { + options ListOutpostResolversPaginatorOptions + client ListOutpostResolversAPIClient + params *ListOutpostResolversInput + nextToken *string + firstPage bool +} + +// NewListOutpostResolversPaginator returns a new ListOutpostResolversPaginator +func NewListOutpostResolversPaginator(client ListOutpostResolversAPIClient, params *ListOutpostResolversInput, optFns ...func(*ListOutpostResolversPaginatorOptions)) *ListOutpostResolversPaginator { + if params == nil { + params = &ListOutpostResolversInput{} + } + + options := ListOutpostResolversPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListOutpostResolversPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListOutpostResolversPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListOutpostResolvers page. +func (p *ListOutpostResolversPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListOutpostResolversOutput, 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 + + result, err := p.client.ListOutpostResolvers(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListOutpostResolvers(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53resolver", + OperationName: "ListOutpostResolvers", + } +} diff --git a/service/route53resolver/api_op_PutResolverQueryLogConfigPolicy.go b/service/route53resolver/api_op_PutResolverQueryLogConfigPolicy.go index 0e263f89d15..fce32e62c4d 100644 --- a/service/route53resolver/api_op_PutResolverQueryLogConfigPolicy.go +++ b/service/route53resolver/api_op_PutResolverQueryLogConfigPolicy.go @@ -42,7 +42,6 @@ type PutResolverQueryLogConfigPolicyInput struct { // specify the following operations in the Actions section of the statement: // - route53resolver:AssociateResolverQueryLogConfig // - route53resolver:DisassociateResolverQueryLogConfig - // - route53resolver:ListResolverQueryLogConfigAssociations // - route53resolver:ListResolverQueryLogConfigs // In the Resource section of the statement, you specify the ARNs for the query // logging configurations that you want to share with the account that you diff --git a/service/route53resolver/api_op_UpdateOutpostResolver.go b/service/route53resolver/api_op_UpdateOutpostResolver.go new file mode 100644 index 00000000000..971caec9ed1 --- /dev/null +++ b/service/route53resolver/api_op_UpdateOutpostResolver.go @@ -0,0 +1,134 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package route53resolver + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/route53resolver/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// You can use UpdateOutpostResolver to update the instance count, type, or name +// of a Resolver on an Outpost. +func (c *Client) UpdateOutpostResolver(ctx context.Context, params *UpdateOutpostResolverInput, optFns ...func(*Options)) (*UpdateOutpostResolverOutput, error) { + if params == nil { + params = &UpdateOutpostResolverInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UpdateOutpostResolver", params, optFns, c.addOperationUpdateOutpostResolverMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UpdateOutpostResolverOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UpdateOutpostResolverInput struct { + + // A unique string that identifies Resolver on an Outpost. + // + // This member is required. + Id *string + + // The Amazon EC2 instance count for a Resolver on the Outpost. + InstanceCount *int32 + + // Name of the Resolver on the Outpost. + Name *string + + // Amazon EC2 instance type. + PreferredInstanceType *string + + noSmithyDocumentSerde +} + +type UpdateOutpostResolverOutput struct { + + // The response to an UpdateOutpostResolver request. + OutpostResolver *types.OutpostResolver + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUpdateOutpostResolverMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateOutpostResolver{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateOutpostResolver{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpUpdateOutpostResolverValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateOutpostResolver(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opUpdateOutpostResolver(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "route53resolver", + OperationName: "UpdateOutpostResolver", + } +} diff --git a/service/route53resolver/api_op_UpdateResolverEndpoint.go b/service/route53resolver/api_op_UpdateResolverEndpoint.go index b0c75463b70..9c25e26a516 100644 --- a/service/route53resolver/api_op_UpdateResolverEndpoint.go +++ b/service/route53resolver/api_op_UpdateResolverEndpoint.go @@ -40,10 +40,12 @@ type UpdateResolverEndpointInput struct { Name *string // Specifies the endpoint type for what type of IP address the endpoint uses to - // forward DNS queries. + // forward DNS queries. Updating to IPV6 type isn't currently supported. ResolverEndpointType types.ResolverEndpointType - // Updates the Resolver endpoint type to IpV4, Ipv6, or dual-stack. + // Specifies the IPv6 address when you update the Resolver endpoint from IPv4 to + // dual-stack. If you don't specify an IPv6 address, one will be automatically + // chosen from your subnet. UpdateIpAddresses []types.UpdateIpAddress noSmithyDocumentSerde diff --git a/service/route53resolver/deserializers.go b/service/route53resolver/deserializers.go index b720a3c0fc0..6fbb8f4cbf8 100644 --- a/service/route53resolver/deserializers.go +++ b/service/route53resolver/deserializers.go @@ -912,6 +912,132 @@ func awsAwsjson11_deserializeOpErrorCreateFirewallRuleGroup(response *smithyhttp } } +type awsAwsjson11_deserializeOpCreateOutpostResolver struct { +} + +func (*awsAwsjson11_deserializeOpCreateOutpostResolver) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpCreateOutpostResolver) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorCreateOutpostResolver(response, &metadata) + } + output := &CreateOutpostResolverOutput{} + 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 = awsAwsjson11_deserializeOpDocumentCreateOutpostResolverOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorCreateOutpostResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServiceErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpCreateResolverEndpoint struct { } @@ -1674,6 +1800,132 @@ func awsAwsjson11_deserializeOpErrorDeleteFirewallRuleGroup(response *smithyhttp } } +type awsAwsjson11_deserializeOpDeleteOutpostResolver struct { +} + +func (*awsAwsjson11_deserializeOpDeleteOutpostResolver) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpDeleteOutpostResolver) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorDeleteOutpostResolver(response, &metadata) + } + output := &DeleteOutpostResolverOutput{} + 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 = awsAwsjson11_deserializeOpDocumentDeleteOutpostResolverOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorDeleteOutpostResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("InternalServiceErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpDeleteResolverEndpoint struct { } @@ -2928,9 +3180,129 @@ func (m *awsAwsjson11_deserializeOpGetFirewallRuleGroupAssociation) HandleDeseri } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupAssociation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupAssociation(response, &metadata) + } + output := &GetFirewallRuleGroupAssociationOutput{} + 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 = awsAwsjson11_deserializeOpDocumentGetFirewallRuleGroupAssociationOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServiceErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy struct { +} + +func (*awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupPolicy(response, &metadata) } - output := &GetFirewallRuleGroupAssociationOutput{} + output := &GetFirewallRuleGroupPolicyOutput{} out.Result = output var buff [1024]byte @@ -2950,7 +3322,7 @@ func (m *awsAwsjson11_deserializeOpGetFirewallRuleGroupAssociation) HandleDeseri return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetFirewallRuleGroupAssociationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetFirewallRuleGroupPolicyOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -2964,7 +3336,7 @@ func (m *awsAwsjson11_deserializeOpGetFirewallRuleGroupAssociation) HandleDeseri return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -3017,6 +3389,9 @@ func awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupAssociation(response *sm case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + default: genericError := &smithy.GenericAPIError{ Code: errorCode, @@ -3027,14 +3402,14 @@ func awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupAssociation(response *sm } } -type awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy struct { +type awsAwsjson11_deserializeOpGetOutpostResolver struct { } -func (*awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy) ID() string { +func (*awsAwsjson11_deserializeOpGetOutpostResolver) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpGetOutpostResolver) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -3048,9 +3423,9 @@ func (m *awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy) HandleDeserialize } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupPolicy(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorGetOutpostResolver(response, &metadata) } - output := &GetFirewallRuleGroupPolicyOutput{} + output := &GetOutpostResolverOutput{} out.Result = output var buff [1024]byte @@ -3070,7 +3445,7 @@ func (m *awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy) HandleDeserialize return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentGetFirewallRuleGroupPolicyOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentGetOutpostResolverOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -3084,7 +3459,7 @@ func (m *awsAwsjson11_deserializeOpGetFirewallRuleGroupPolicy) HandleDeserialize return out, metadata, err } -func awsAwsjson11_deserializeOpErrorGetFirewallRuleGroupPolicy(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorGetOutpostResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -5112,6 +5487,129 @@ func awsAwsjson11_deserializeOpErrorListFirewallRules(response *smithyhttp.Respo } } +type awsAwsjson11_deserializeOpListOutpostResolvers struct { +} + +func (*awsAwsjson11_deserializeOpListOutpostResolvers) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListOutpostResolvers) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorListOutpostResolvers(response, &metadata) + } + output := &ListOutpostResolversOutput{} + 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 = awsAwsjson11_deserializeOpDocumentListOutpostResolversOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListOutpostResolvers(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServiceErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpListResolverConfigs struct { } @@ -6868,7 +7366,130 @@ func (*awsAwsjson11_deserializeOpUpdateFirewallConfig) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateFirewallConfig) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateFirewallConfig) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorUpdateFirewallConfig(response, &metadata) + } + output := &UpdateFirewallConfigOutput{} + 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 = awsAwsjson11_deserializeOpDocumentUpdateFirewallConfigOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorUpdateFirewallConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("InternalServiceErrorException", errorCode): + return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) + + case strings.EqualFold("ResourceNotFoundException", errorCode): + return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + + case strings.EqualFold("ThrottlingException", errorCode): + return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) + + case strings.EqualFold("ValidationException", errorCode): + return awsAwsjson11_deserializeErrorValidationException(response, errorBody) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsAwsjson11_deserializeOpUpdateFirewallDomains struct { +} + +func (*awsAwsjson11_deserializeOpUpdateFirewallDomains) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpUpdateFirewallDomains) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -6882,9 +7503,9 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallConfig) HandleDeserialize(ctx c } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateFirewallConfig(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateFirewallDomains(response, &metadata) } - output := &UpdateFirewallConfigOutput{} + output := &UpdateFirewallDomainsOutput{} out.Result = output var buff [1024]byte @@ -6904,7 +7525,7 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallConfig) HandleDeserialize(ctx c return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateFirewallConfigOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateFirewallDomainsOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -6918,7 +7539,7 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallConfig) HandleDeserialize(ctx c return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateFirewallConfig(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateFirewallDomains(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -6962,9 +7583,15 @@ func awsAwsjson11_deserializeOpErrorUpdateFirewallConfig(response *smithyhttp.Re case strings.EqualFold("AccessDeniedException", errorCode): return awsAwsjson11_deserializeErrorAccessDeniedException(response, errorBody) + case strings.EqualFold("ConflictException", errorCode): + return awsAwsjson11_deserializeErrorConflictException(response, errorBody) + case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) + case strings.EqualFold("LimitExceededException", errorCode): + return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) + case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -6984,14 +7611,14 @@ func awsAwsjson11_deserializeOpErrorUpdateFirewallConfig(response *smithyhttp.Re } } -type awsAwsjson11_deserializeOpUpdateFirewallDomains struct { +type awsAwsjson11_deserializeOpUpdateFirewallRule struct { } -func (*awsAwsjson11_deserializeOpUpdateFirewallDomains) ID() string { +func (*awsAwsjson11_deserializeOpUpdateFirewallRule) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateFirewallDomains) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateFirewallRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7005,9 +7632,9 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallDomains) HandleDeserialize(ctx } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateFirewallDomains(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateFirewallRule(response, &metadata) } - output := &UpdateFirewallDomainsOutput{} + output := &UpdateFirewallRuleOutput{} out.Result = output var buff [1024]byte @@ -7027,7 +7654,7 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallDomains) HandleDeserialize(ctx return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateFirewallDomainsOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateFirewallRuleOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7041,7 +7668,7 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallDomains) HandleDeserialize(ctx return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateFirewallDomains(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateFirewallRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7091,9 +7718,6 @@ func awsAwsjson11_deserializeOpErrorUpdateFirewallDomains(response *smithyhttp.R case strings.EqualFold("InternalServiceErrorException", errorCode): return awsAwsjson11_deserializeErrorInternalServiceErrorException(response, errorBody) - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) @@ -7113,14 +7737,14 @@ func awsAwsjson11_deserializeOpErrorUpdateFirewallDomains(response *smithyhttp.R } } -type awsAwsjson11_deserializeOpUpdateFirewallRule struct { +type awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation struct { } -func (*awsAwsjson11_deserializeOpUpdateFirewallRule) ID() string { +func (*awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateFirewallRule) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7134,9 +7758,9 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallRule) HandleDeserialize(ctx con } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateFirewallRule(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateFirewallRuleGroupAssociation(response, &metadata) } - output := &UpdateFirewallRuleOutput{} + output := &UpdateFirewallRuleGroupAssociationOutput{} out.Result = output var buff [1024]byte @@ -7156,7 +7780,7 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallRule) HandleDeserialize(ctx con return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateFirewallRuleOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateFirewallRuleGroupAssociationOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7170,7 +7794,7 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallRule) HandleDeserialize(ctx con return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateFirewallRule(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateFirewallRuleGroupAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7239,14 +7863,14 @@ func awsAwsjson11_deserializeOpErrorUpdateFirewallRule(response *smithyhttp.Resp } } -type awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation struct { +type awsAwsjson11_deserializeOpUpdateOutpostResolver struct { } -func (*awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation) ID() string { +func (*awsAwsjson11_deserializeOpUpdateOutpostResolver) ID() string { return "OperationDeserializer" } -func (m *awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( +func (m *awsAwsjson11_deserializeOpUpdateOutpostResolver) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( out middleware.DeserializeOutput, metadata middleware.Metadata, err error, ) { out, metadata, err = next.HandleDeserialize(ctx, in) @@ -7260,9 +7884,9 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation) HandleDes } if response.StatusCode < 200 || response.StatusCode >= 300 { - return out, metadata, awsAwsjson11_deserializeOpErrorUpdateFirewallRuleGroupAssociation(response, &metadata) + return out, metadata, awsAwsjson11_deserializeOpErrorUpdateOutpostResolver(response, &metadata) } - output := &UpdateFirewallRuleGroupAssociationOutput{} + output := &UpdateOutpostResolverOutput{} out.Result = output var buff [1024]byte @@ -7282,7 +7906,7 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation) HandleDes return out, metadata, err } - err = awsAwsjson11_deserializeOpDocumentUpdateFirewallRuleGroupAssociationOutput(&output, shape) + err = awsAwsjson11_deserializeOpDocumentUpdateOutpostResolverOutput(&output, shape) if err != nil { var snapshot bytes.Buffer io.Copy(&snapshot, ringBuffer) @@ -7296,7 +7920,7 @@ func (m *awsAwsjson11_deserializeOpUpdateFirewallRuleGroupAssociation) HandleDes return out, metadata, err } -func awsAwsjson11_deserializeOpErrorUpdateFirewallRuleGroupAssociation(response *smithyhttp.Response, metadata *middleware.Metadata) error { +func awsAwsjson11_deserializeOpErrorUpdateOutpostResolver(response *smithyhttp.Response, metadata *middleware.Metadata) error { var errorBuffer bytes.Buffer if _, err := io.Copy(&errorBuffer, response.Body); err != nil { return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} @@ -7349,6 +7973,9 @@ func awsAwsjson11_deserializeOpErrorUpdateFirewallRuleGroupAssociation(response case strings.EqualFold("ResourceNotFoundException", errorCode): return awsAwsjson11_deserializeErrorResourceNotFoundException(response, errorBody) + case strings.EqualFold("ServiceQuotaExceededException", errorCode): + return awsAwsjson11_deserializeErrorServiceQuotaExceededException(response, errorBody) + case strings.EqualFold("ThrottlingException", errorCode): return awsAwsjson11_deserializeErrorThrottlingException(response, errorBody) @@ -8333,6 +8960,41 @@ func awsAwsjson11_deserializeErrorResourceUnavailableException(response *smithyh return output } +func awsAwsjson11_deserializeErrorServiceQuotaExceededException(response *smithyhttp.Response, errorBody *bytes.Reader) error { + 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 + } + + output := &types.ServiceQuotaExceededException{} + err := awsAwsjson11_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 awsAwsjson11_deserializeErrorThrottlingException(response *smithyhttp.Response, errorBody *bytes.Reader) error { var buff [1024]byte ringBuffer := smithyio.NewRingBuffer(buff[:]) @@ -9878,13 +10540,196 @@ func awsAwsjson11_deserializeDocumentIpAddressResponse(v **types.IpAddressRespon sv.StatusMessage = ptr.String(jtv) } - case "SubnetId": + case "SubnetId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value) + } + sv.SubnetId = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.LimitExceededException + if *v == nil { + sv = &types.LimitExceededException{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Message": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + case "ResourceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected String to be of type string, got %T instead", value) + } + sv.ResourceType = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentOutpostResolver(v **types.OutpostResolver, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.OutpostResolver + if *v == nil { + sv = &types.OutpostResolver{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "Arn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Arn to be of type string, got %T instead", value) + } + sv.Arn = ptr.String(jtv) + } + + case "CreationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Rfc3339TimeString to be of type string, got %T instead", value) + } + sv.CreationTime = ptr.String(jtv) + } + + case "CreatorRequestId": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected CreatorRequestId to be of type string, got %T instead", value) + } + sv.CreatorRequestId = ptr.String(jtv) + } + + case "Id": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceId to be of type string, got %T instead", value) + } + sv.Id = ptr.String(jtv) + } + + case "InstanceCount": + if value != nil { + jtv, ok := value.(json.Number) + if !ok { + return fmt.Errorf("expected InstanceCount to be json.Number, got %T instead", value) + } + i64, err := jtv.Int64() + if err != nil { + return err + } + sv.InstanceCount = ptr.Int32(int32(i64)) + } + + case "ModificationTime": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected Rfc3339TimeString to be of type string, got %T instead", value) + } + sv.ModificationTime = ptr.String(jtv) + } + + case "Name": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostResolverName to be of type string, got %T instead", value) + } + sv.Name = ptr.String(jtv) + } + + case "OutpostArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostArn to be of type string, got %T instead", value) + } + sv.OutpostArn = ptr.String(jtv) + } + + case "PreferredInstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostInstanceType to be of type string, got %T instead", value) + } + sv.PreferredInstanceType = ptr.String(jtv) + } + + case "Status": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostResolverStatus to be of type string, got %T instead", value) + } + sv.Status = types.OutpostResolverStatus(jtv) + } + + case "StatusMessage": if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected SubnetId to be of type string, got %T instead", value) + return fmt.Errorf("expected OutpostResolverStatusMessage to be of type string, got %T instead", value) } - sv.SubnetId = ptr.String(jtv) + sv.StatusMessage = ptr.String(jtv) } default: @@ -9896,7 +10741,7 @@ func awsAwsjson11_deserializeDocumentIpAddressResponse(v **types.IpAddressRespon return nil } -func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExceededException, value interface{}) error { +func awsAwsjson11_deserializeDocumentOutpostResolverList(v *[]types.OutpostResolver, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) } @@ -9904,44 +10749,29 @@ func awsAwsjson11_deserializeDocumentLimitExceededException(v **types.LimitExcee 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.LimitExceededException + var cv []types.OutpostResolver if *v == nil { - sv = &types.LimitExceededException{} + cv = []types.OutpostResolver{} } else { - sv = *v + cv = *v } - for key, value := range shape { - switch key { - case "Message": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - case "ResourceType": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected String to be of type string, got %T instead", value) - } - sv.ResourceType = ptr.String(jtv) - } - - default: - _, _ = key, value - + for _, value := range shape { + var col types.OutpostResolver + destAddr := &col + if err := awsAwsjson11_deserializeDocumentOutpostResolver(&destAddr, value); err != nil { + return err } + col = *destAddr + cv = append(cv, col) + } - *v = sv + *v = cv return nil } @@ -10254,6 +11084,24 @@ func awsAwsjson11_deserializeDocumentResolverEndpoint(v **types.ResolverEndpoint sv.Name = ptr.String(jtv) } + case "OutpostArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostArn to be of type string, got %T instead", value) + } + sv.OutpostArn = ptr.String(jtv) + } + + case "PreferredInstanceType": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected OutpostInstanceType to be of type string, got %T instead", value) + } + sv.PreferredInstanceType = ptr.String(jtv) + } + case "ResolverEndpointType": if value != nil { jtv, ok := value.(string) @@ -11154,6 +12002,46 @@ func awsAwsjson11_deserializeDocumentSecurityGroupIds(v *[]string, value interfa return nil } +func awsAwsjson11_deserializeDocumentServiceQuotaExceededException(v **types.ServiceQuotaExceededException, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ServiceQuotaExceededException + if *v == nil { + sv = &types.ServiceQuotaExceededException{} + } 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 ExceptionMessage to be of type string, got %T instead", value) + } + sv.Message = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentTag(v **types.Tag, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11705,6 +12593,42 @@ func awsAwsjson11_deserializeOpDocumentCreateFirewallRuleOutput(v **CreateFirewa return nil } +func awsAwsjson11_deserializeOpDocumentCreateOutpostResolverOutput(v **CreateOutpostResolverOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *CreateOutpostResolverOutput + if *v == nil { + sv = &CreateOutpostResolverOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutpostResolver": + if err := awsAwsjson11_deserializeDocumentOutpostResolver(&sv.OutpostResolver, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentCreateResolverEndpointOutput(v **CreateResolverEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -11921,6 +12845,42 @@ func awsAwsjson11_deserializeOpDocumentDeleteFirewallRuleOutput(v **DeleteFirewa return nil } +func awsAwsjson11_deserializeOpDocumentDeleteOutpostResolverOutput(v **DeleteOutpostResolverOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *DeleteOutpostResolverOutput + if *v == nil { + sv = &DeleteOutpostResolverOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutpostResolver": + if err := awsAwsjson11_deserializeDocumentOutpostResolver(&sv.OutpostResolver, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentDeleteResolverEndpointOutput(v **DeleteResolverEndpointOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -12357,6 +13317,42 @@ func awsAwsjson11_deserializeOpDocumentGetFirewallRuleGroupPolicyOutput(v **GetF return nil } +func awsAwsjson11_deserializeOpDocumentGetOutpostResolverOutput(v **GetOutpostResolverOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *GetOutpostResolverOutput + if *v == nil { + sv = &GetOutpostResolverOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutpostResolver": + if err := awsAwsjson11_deserializeDocumentOutpostResolver(&sv.OutpostResolver, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentGetResolverConfigOutput(v **GetResolverConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13026,6 +14022,51 @@ func awsAwsjson11_deserializeOpDocumentListFirewallRulesOutput(v **ListFirewallR return nil } +func awsAwsjson11_deserializeOpDocumentListOutpostResolversOutput(v **ListOutpostResolversOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListOutpostResolversOutput + if *v == nil { + sv = &ListOutpostResolversOutput{} + } 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 "OutpostResolvers": + if err := awsAwsjson11_deserializeDocumentOutpostResolverList(&sv.OutpostResolvers, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListResolverConfigsOutput(v **ListResolverConfigsOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -13892,6 +14933,42 @@ func awsAwsjson11_deserializeOpDocumentUpdateFirewallRuleOutput(v **UpdateFirewa return nil } +func awsAwsjson11_deserializeOpDocumentUpdateOutpostResolverOutput(v **UpdateOutpostResolverOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *UpdateOutpostResolverOutput + if *v == nil { + sv = &UpdateOutpostResolverOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "OutpostResolver": + if err := awsAwsjson11_deserializeDocumentOutpostResolver(&sv.OutpostResolver, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentUpdateResolverConfigOutput(v **UpdateResolverConfigOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/route53resolver/generated.json b/service/route53resolver/generated.json index 86320fc4910..ceff3964a14 100644 --- a/service/route53resolver/generated.json +++ b/service/route53resolver/generated.json @@ -15,12 +15,14 @@ "api_op_CreateFirewallDomainList.go", "api_op_CreateFirewallRule.go", "api_op_CreateFirewallRuleGroup.go", + "api_op_CreateOutpostResolver.go", "api_op_CreateResolverEndpoint.go", "api_op_CreateResolverQueryLogConfig.go", "api_op_CreateResolverRule.go", "api_op_DeleteFirewallDomainList.go", "api_op_DeleteFirewallRule.go", "api_op_DeleteFirewallRuleGroup.go", + "api_op_DeleteOutpostResolver.go", "api_op_DeleteResolverEndpoint.go", "api_op_DeleteResolverQueryLogConfig.go", "api_op_DeleteResolverRule.go", @@ -33,6 +35,7 @@ "api_op_GetFirewallRuleGroup.go", "api_op_GetFirewallRuleGroupAssociation.go", "api_op_GetFirewallRuleGroupPolicy.go", + "api_op_GetOutpostResolver.go", "api_op_GetResolverConfig.go", "api_op_GetResolverDnssecConfig.go", "api_op_GetResolverEndpoint.go", @@ -49,6 +52,7 @@ "api_op_ListFirewallRuleGroupAssociations.go", "api_op_ListFirewallRuleGroups.go", "api_op_ListFirewallRules.go", + "api_op_ListOutpostResolvers.go", "api_op_ListResolverConfigs.go", "api_op_ListResolverDnssecConfigs.go", "api_op_ListResolverEndpointIpAddresses.go", @@ -67,6 +71,7 @@ "api_op_UpdateFirewallDomains.go", "api_op_UpdateFirewallRule.go", "api_op_UpdateFirewallRuleGroupAssociation.go", + "api_op_UpdateOutpostResolver.go", "api_op_UpdateResolverConfig.go", "api_op_UpdateResolverDnssecConfig.go", "api_op_UpdateResolverEndpoint.go", diff --git a/service/route53resolver/serializers.go b/service/route53resolver/serializers.go index e99ab9a6ab4..68167a294fa 100644 --- a/service/route53resolver/serializers.go +++ b/service/route53resolver/serializers.go @@ -400,6 +400,61 @@ func (m *awsAwsjson11_serializeOpCreateFirewallRuleGroup) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpCreateOutpostResolver struct { +} + +func (*awsAwsjson11_serializeOpCreateOutpostResolver) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpCreateOutpostResolver) 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.(*CreateOutpostResolverInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Route53Resolver.CreateOutpostResolver") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentCreateOutpostResolverInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpCreateResolverEndpoint struct { } @@ -730,6 +785,61 @@ func (m *awsAwsjson11_serializeOpDeleteFirewallRuleGroup) HandleSerialize(ctx co return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpDeleteOutpostResolver struct { +} + +func (*awsAwsjson11_serializeOpDeleteOutpostResolver) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpDeleteOutpostResolver) 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.(*DeleteOutpostResolverInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Route53Resolver.DeleteOutpostResolver") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentDeleteOutpostResolverInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpDeleteResolverEndpoint struct { } @@ -1390,6 +1500,61 @@ func (m *awsAwsjson11_serializeOpGetFirewallRuleGroupPolicy) HandleSerialize(ctx return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpGetOutpostResolver struct { +} + +func (*awsAwsjson11_serializeOpGetOutpostResolver) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpGetOutpostResolver) 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.(*GetOutpostResolverInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Route53Resolver.GetOutpostResolver") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentGetOutpostResolverInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpGetResolverConfig struct { } @@ -2270,6 +2435,61 @@ func (m *awsAwsjson11_serializeOpListFirewallRules) HandleSerialize(ctx context. return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListOutpostResolvers struct { +} + +func (*awsAwsjson11_serializeOpListOutpostResolvers) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListOutpostResolvers) 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.(*ListOutpostResolversInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Route53Resolver.ListOutpostResolvers") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListOutpostResolversInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListResolverConfigs struct { } @@ -3260,6 +3480,61 @@ func (m *awsAwsjson11_serializeOpUpdateFirewallRuleGroupAssociation) HandleSeria return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpUpdateOutpostResolver struct { +} + +func (*awsAwsjson11_serializeOpUpdateOutpostResolver) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpUpdateOutpostResolver) 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.(*UpdateOutpostResolverInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("Route53Resolver.UpdateOutpostResolver") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentUpdateOutpostResolverInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpUpdateResolverConfig struct { } @@ -3943,6 +4218,45 @@ func awsAwsjson11_serializeOpDocumentCreateFirewallRuleInput(v *CreateFirewallRu return nil } +func awsAwsjson11_serializeOpDocumentCreateOutpostResolverInput(v *CreateOutpostResolverInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CreatorRequestId != nil { + ok := object.Key("CreatorRequestId") + ok.String(*v.CreatorRequestId) + } + + if v.InstanceCount != nil { + ok := object.Key("InstanceCount") + ok.Integer(*v.InstanceCount) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.OutpostArn != nil { + ok := object.Key("OutpostArn") + ok.String(*v.OutpostArn) + } + + if v.PreferredInstanceType != nil { + ok := object.Key("PreferredInstanceType") + ok.String(*v.PreferredInstanceType) + } + + if v.Tags != nil { + ok := object.Key("Tags") + if err := awsAwsjson11_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeOpDocumentCreateResolverEndpointInput(v *CreateResolverEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3969,6 +4283,16 @@ func awsAwsjson11_serializeOpDocumentCreateResolverEndpointInput(v *CreateResolv ok.String(*v.Name) } + if v.OutpostArn != nil { + ok := object.Key("OutpostArn") + ok.String(*v.OutpostArn) + } + + if v.PreferredInstanceType != nil { + ok := object.Key("PreferredInstanceType") + ok.String(*v.PreferredInstanceType) + } + if len(v.ResolverEndpointType) > 0 { ok := object.Key("ResolverEndpointType") ok.String(string(v.ResolverEndpointType)) @@ -4107,6 +4431,18 @@ func awsAwsjson11_serializeOpDocumentDeleteFirewallRuleInput(v *DeleteFirewallRu return nil } +func awsAwsjson11_serializeOpDocumentDeleteOutpostResolverInput(v *DeleteOutpostResolverInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentDeleteResolverEndpointInput(v *DeleteResolverEndpointInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4268,6 +4604,18 @@ func awsAwsjson11_serializeOpDocumentGetFirewallRuleGroupPolicyInput(v *GetFirew return nil } +func awsAwsjson11_serializeOpDocumentGetOutpostResolverInput(v *GetOutpostResolverInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentGetResolverConfigInput(v *GetResolverConfigInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4540,6 +4888,28 @@ func awsAwsjson11_serializeOpDocumentListFirewallRulesInput(v *ListFirewallRules return nil } +func awsAwsjson11_serializeOpDocumentListOutpostResolversInput(v *ListOutpostResolversInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if v.OutpostArn != nil { + ok := object.Key("OutpostArn") + ok.String(*v.OutpostArn) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListResolverConfigsInput(v *ListResolverConfigsInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -4974,6 +5344,33 @@ func awsAwsjson11_serializeOpDocumentUpdateFirewallRuleInput(v *UpdateFirewallRu return nil } +func awsAwsjson11_serializeOpDocumentUpdateOutpostResolverInput(v *UpdateOutpostResolverInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Id != nil { + ok := object.Key("Id") + ok.String(*v.Id) + } + + if v.InstanceCount != nil { + ok := object.Key("InstanceCount") + ok.Integer(*v.InstanceCount) + } + + if v.Name != nil { + ok := object.Key("Name") + ok.String(*v.Name) + } + + if v.PreferredInstanceType != nil { + ok := object.Key("PreferredInstanceType") + ok.String(*v.PreferredInstanceType) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentUpdateResolverConfigInput(v *UpdateResolverConfigInput, value smithyjson.Value) error { object := value.Object() defer object.Close() diff --git a/service/route53resolver/types/enums.go b/service/route53resolver/types/enums.go index d01e25cf0e5..6840af9c396 100644 --- a/service/route53resolver/types/enums.go +++ b/service/route53resolver/types/enums.go @@ -216,6 +216,7 @@ const ( IpAddressStatusDeleting IpAddressStatus = "DELETING" IpAddressStatusDeleteFailedFasExpired IpAddressStatus = "DELETE_FAILED_FAS_EXPIRED" IpAddressStatusUpdating IpAddressStatus = "UPDATING" + IpAddressStatusUpdateFailed IpAddressStatus = "UPDATE_FAILED" ) // Values returns all known values for IpAddressStatus. Note that this can be @@ -234,6 +235,7 @@ func (IpAddressStatus) Values() []IpAddressStatus { "DELETING", "DELETE_FAILED_FAS_EXPIRED", "UPDATING", + "UPDATE_FAILED", } } @@ -255,6 +257,34 @@ func (MutationProtectionStatus) Values() []MutationProtectionStatus { } } +type OutpostResolverStatus string + +// Enum values for OutpostResolverStatus +const ( + OutpostResolverStatusCreating OutpostResolverStatus = "CREATING" + OutpostResolverStatusOperational OutpostResolverStatus = "OPERATIONAL" + OutpostResolverStatusUpdating OutpostResolverStatus = "UPDATING" + OutpostResolverStatusDeleting OutpostResolverStatus = "DELETING" + OutpostResolverStatusActionNeeded OutpostResolverStatus = "ACTION_NEEDED" + OutpostResolverStatusFailedCreation OutpostResolverStatus = "FAILED_CREATION" + OutpostResolverStatusFailedDeletion OutpostResolverStatus = "FAILED_DELETION" +) + +// Values returns all known values for OutpostResolverStatus. 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 (OutpostResolverStatus) Values() []OutpostResolverStatus { + return []OutpostResolverStatus{ + "CREATING", + "OPERATIONAL", + "UPDATING", + "DELETING", + "ACTION_NEEDED", + "FAILED_CREATION", + "FAILED_DELETION", + } +} + type ResolverAutodefinedReverseStatus string // Enum values for ResolverAutodefinedReverseStatus diff --git a/service/route53resolver/types/errors.go b/service/route53resolver/types/errors.go index 60ade633887..92a7d69295a 100644 --- a/service/route53resolver/types/errors.go +++ b/service/route53resolver/types/errors.go @@ -360,6 +360,32 @@ func (e *ResourceUnavailableException) ErrorCode() string { } func (e *ResourceUnavailableException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } +// Fulfilling the request would cause one or more quotas to be exceeded. +type ServiceQuotaExceededException struct { + Message *string + + ErrorCodeOverride *string + + noSmithyDocumentSerde +} + +func (e *ServiceQuotaExceededException) Error() string { + return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) +} +func (e *ServiceQuotaExceededException) ErrorMessage() string { + if e.Message == nil { + return "" + } + return *e.Message +} +func (e *ServiceQuotaExceededException) ErrorCode() string { + if e == nil || e.ErrorCodeOverride == nil { + return "ServiceQuotaExceededException" + } + return *e.ErrorCodeOverride +} +func (e *ServiceQuotaExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } + // The request was throttled. Try again in a few minutes. type ThrottlingException struct { Message *string diff --git a/service/route53resolver/types/types.go b/service/route53resolver/types/types.go index d9c775e0b95..6c5d7f49d43 100644 --- a/service/route53resolver/types/types.go +++ b/service/route53resolver/types/types.go @@ -511,6 +511,49 @@ type IpAddressUpdate struct { noSmithyDocumentSerde } +// A complex type that contains settings for an existing Resolver on an Outpost. +type OutpostResolver struct { + + // The ARN (Amazon Resource Name) for the Resolver on an Outpost. + Arn *string + + // The date and time that the Outpost Resolver was created, in Unix time format + // and Coordinated Universal Time (UTC). + CreationTime *string + + // A unique string that identifies the request that created the Resolver endpoint. + // The CreatorRequestId allows failed requests to be retried without the risk of + // running the operation twice. + CreatorRequestId *string + + // The ID of the Resolver on Outpost. + Id *string + + // Amazon EC2 instance count for the Resolver on the Outpost. + InstanceCount *int32 + + // The date and time that the Outpost Resolver was modified, in Unix time format + // and Coordinated Universal Time (UTC). + ModificationTime *string + + // Name of the Resolver. + Name *string + + // The ARN (Amazon Resource Name) for the Outpost. + OutpostArn *string + + // The Amazon EC2 instance type. + PreferredInstanceType *string + + // Status of the Resolver. + Status OutpostResolverStatus + + // A detailed description of the Resolver. + StatusMessage *string + + noSmithyDocumentSerde +} + // A complex type that contains information about a Resolver configuration for a // VPC. type ResolverConfig struct { @@ -609,6 +652,12 @@ type ResolverEndpoint struct { // request. Name *string + // The ARN (Amazon Resource Name) for the Outpost. + OutpostArn *string + + // The Amazon EC2 instance type. + PreferredInstanceType *string + // The Resolver endpoint IP address type. ResolverEndpointType ResolverEndpointType @@ -829,7 +878,7 @@ type ResolverRule struct { // An array that contains the IP addresses and ports that an outbound endpoint // forwards DNS queries to. Typically, these are the IP addresses of DNS resolvers - // on your network. Specify IPv4 addresses. IPv6 is not supported. + // on your network. TargetIps []TargetAddress noSmithyDocumentSerde diff --git a/service/route53resolver/validators.go b/service/route53resolver/validators.go index d85c0479d63..7c3893fad48 100644 --- a/service/route53resolver/validators.go +++ b/service/route53resolver/validators.go @@ -150,6 +150,26 @@ func (m *validateOpCreateFirewallRule) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpCreateOutpostResolver struct { +} + +func (*validateOpCreateOutpostResolver) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpCreateOutpostResolver) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*CreateOutpostResolverInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpCreateOutpostResolverInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpCreateResolverEndpoint struct { } @@ -270,6 +290,26 @@ func (m *validateOpDeleteFirewallRule) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpDeleteOutpostResolver struct { +} + +func (*validateOpDeleteOutpostResolver) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpDeleteOutpostResolver) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*DeleteOutpostResolverInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpDeleteOutpostResolverInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpDeleteResolverEndpoint struct { } @@ -510,6 +550,26 @@ func (m *validateOpGetFirewallRuleGroupPolicy) HandleInitialize(ctx context.Cont return next.HandleInitialize(ctx, in) } +type validateOpGetOutpostResolver struct { +} + +func (*validateOpGetOutpostResolver) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpGetOutpostResolver) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*GetOutpostResolverInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpGetOutpostResolverInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpGetResolverConfig struct { } @@ -970,6 +1030,26 @@ func (m *validateOpUpdateFirewallRule) HandleInitialize(ctx context.Context, in return next.HandleInitialize(ctx, in) } +type validateOpUpdateOutpostResolver struct { +} + +func (*validateOpUpdateOutpostResolver) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUpdateOutpostResolver) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UpdateOutpostResolverInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUpdateOutpostResolverInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateResolverConfig struct { } @@ -1078,6 +1158,10 @@ func addOpCreateFirewallRuleValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpCreateFirewallRule{}, middleware.After) } +func addOpCreateOutpostResolverValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpCreateOutpostResolver{}, middleware.After) +} + func addOpCreateResolverEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpCreateResolverEndpoint{}, middleware.After) } @@ -1102,6 +1186,10 @@ func addOpDeleteFirewallRuleValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpDeleteFirewallRule{}, middleware.After) } +func addOpDeleteOutpostResolverValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpDeleteOutpostResolver{}, middleware.After) +} + func addOpDeleteResolverEndpointValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpDeleteResolverEndpoint{}, middleware.After) } @@ -1150,6 +1238,10 @@ func addOpGetFirewallRuleGroupPolicyValidationMiddleware(stack *middleware.Stack return stack.Initialize.Add(&validateOpGetFirewallRuleGroupPolicy{}, middleware.After) } +func addOpGetOutpostResolverValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpGetOutpostResolver{}, middleware.After) +} + func addOpGetResolverConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetResolverConfig{}, middleware.After) } @@ -1242,6 +1334,10 @@ func addOpUpdateFirewallRuleValidationMiddleware(stack *middleware.Stack) error return stack.Initialize.Add(&validateOpUpdateFirewallRule{}, middleware.After) } +func addOpUpdateOutpostResolverValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUpdateOutpostResolver{}, middleware.After) +} + func addOpUpdateResolverConfigValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateResolverConfig{}, middleware.After) } @@ -1522,6 +1618,35 @@ func validateOpCreateFirewallRuleInput(v *CreateFirewallRuleInput) error { } } +func validateOpCreateOutpostResolverInput(v *CreateOutpostResolverInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "CreateOutpostResolverInput"} + if v.CreatorRequestId == nil { + invalidParams.Add(smithy.NewErrParamRequired("CreatorRequestId")) + } + if v.Name == nil { + invalidParams.Add(smithy.NewErrParamRequired("Name")) + } + if v.PreferredInstanceType == nil { + invalidParams.Add(smithy.NewErrParamRequired("PreferredInstanceType")) + } + if v.OutpostArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("OutpostArn")) + } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateResolverEndpointInput(v *CreateResolverEndpointInput) error { if v == nil { return nil @@ -1655,6 +1780,21 @@ func validateOpDeleteFirewallRuleInput(v *DeleteFirewallRuleInput) error { } } +func validateOpDeleteOutpostResolverInput(v *DeleteOutpostResolverInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "DeleteOutpostResolverInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpDeleteResolverEndpointInput(v *DeleteResolverEndpointInput) error { if v == nil { return nil @@ -1844,6 +1984,21 @@ func validateOpGetFirewallRuleGroupPolicyInput(v *GetFirewallRuleGroupPolicyInpu } } +func validateOpGetOutpostResolverInput(v *GetOutpostResolverInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "GetOutpostResolverInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpGetResolverConfigInput(v *GetResolverConfigInput) error { if v == nil { return nil @@ -2226,6 +2381,21 @@ func validateOpUpdateFirewallRuleInput(v *UpdateFirewallRuleInput) error { } } +func validateOpUpdateOutpostResolverInput(v *UpdateOutpostResolverInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UpdateOutpostResolverInput"} + if v.Id == nil { + invalidParams.Add(smithy.NewErrParamRequired("Id")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateResolverConfigInput(v *UpdateResolverConfigInput) error { if v == nil { return nil diff --git a/service/sagemaker/api_op_DescribeFeatureGroup.go b/service/sagemaker/api_op_DescribeFeatureGroup.go index 99a2ce989a7..5dbec1d54eb 100644 --- a/service/sagemaker/api_op_DescribeFeatureGroup.go +++ b/service/sagemaker/api_op_DescribeFeatureGroup.go @@ -32,7 +32,7 @@ func (c *Client) DescribeFeatureGroup(ctx context.Context, params *DescribeFeatu type DescribeFeatureGroupInput struct { - // The name of the FeatureGroup you want described. + // The name or Amazon Resource Name (ARN) of the FeatureGroup you want described. // // This member is required. FeatureGroupName *string diff --git a/service/sagemaker/api_op_DescribeFeatureMetadata.go b/service/sagemaker/api_op_DescribeFeatureMetadata.go index 604b4f8fdd5..753add831c3 100644 --- a/service/sagemaker/api_op_DescribeFeatureMetadata.go +++ b/service/sagemaker/api_op_DescribeFeatureMetadata.go @@ -30,7 +30,8 @@ func (c *Client) DescribeFeatureMetadata(ctx context.Context, params *DescribeFe type DescribeFeatureMetadataInput struct { - // The name of the feature group containing the feature. + // The name or Amazon Resource Name (ARN) of the feature group containing the + // feature. // // This member is required. FeatureGroupName *string diff --git a/service/sagemaker/api_op_ListResourceCatalogs.go b/service/sagemaker/api_op_ListResourceCatalogs.go new file mode 100644 index 00000000000..d78e44d9294 --- /dev/null +++ b/service/sagemaker/api_op_ListResourceCatalogs.go @@ -0,0 +1,237 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package sagemaker + +import ( + "context" + "fmt" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/sagemaker/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" + "time" +) + +// Lists Amazon SageMaker Catalogs based on given filters and orders. The maximum +// number of ResourceCatalog s viewable is 1000. +func (c *Client) ListResourceCatalogs(ctx context.Context, params *ListResourceCatalogsInput, optFns ...func(*Options)) (*ListResourceCatalogsOutput, error) { + if params == nil { + params = &ListResourceCatalogsInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListResourceCatalogs", params, optFns, c.addOperationListResourceCatalogsMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListResourceCatalogsOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListResourceCatalogsInput struct { + + // Use this parameter to search for ResourceCatalog s created after a specific date + // and time. + CreationTimeAfter *time.Time + + // Use this parameter to search for ResourceCatalog s created before a specific + // date and time. + CreationTimeBefore *time.Time + + // The maximum number of results returned by ListResourceCatalogs . + MaxResults *int32 + + // A string that partially matches one or more ResourceCatalog s names. Filters + // ResourceCatalog by name. + NameContains *string + + // A token to resume pagination of ListResourceCatalogs results. + NextToken *string + + // The value on which the resource catalog list is sorted. + SortBy types.ResourceCatalogSortBy + + // The order in which the resource catalogs are listed. + SortOrder types.ResourceCatalogSortOrder + + noSmithyDocumentSerde +} + +type ListResourceCatalogsOutput struct { + + // A token to resume pagination of ListResourceCatalogs results. + NextToken *string + + // A list of the requested ResourceCatalog s. + ResourceCatalogs []types.ResourceCatalog + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListResourceCatalogsMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsAwsjson11_serializeOpListResourceCatalogs{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListResourceCatalogs{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = stack.Initialize.Add(newServiceMetadataMiddleware_opListResourceCatalogs(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +// ListResourceCatalogsAPIClient is a client that implements the +// ListResourceCatalogs operation. +type ListResourceCatalogsAPIClient interface { + ListResourceCatalogs(context.Context, *ListResourceCatalogsInput, ...func(*Options)) (*ListResourceCatalogsOutput, error) +} + +var _ ListResourceCatalogsAPIClient = (*Client)(nil) + +// ListResourceCatalogsPaginatorOptions is the paginator options for +// ListResourceCatalogs +type ListResourceCatalogsPaginatorOptions struct { + // The maximum number of results returned by ListResourceCatalogs . + 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 +} + +// ListResourceCatalogsPaginator is a paginator for ListResourceCatalogs +type ListResourceCatalogsPaginator struct { + options ListResourceCatalogsPaginatorOptions + client ListResourceCatalogsAPIClient + params *ListResourceCatalogsInput + nextToken *string + firstPage bool +} + +// NewListResourceCatalogsPaginator returns a new ListResourceCatalogsPaginator +func NewListResourceCatalogsPaginator(client ListResourceCatalogsAPIClient, params *ListResourceCatalogsInput, optFns ...func(*ListResourceCatalogsPaginatorOptions)) *ListResourceCatalogsPaginator { + if params == nil { + params = &ListResourceCatalogsInput{} + } + + options := ListResourceCatalogsPaginatorOptions{} + if params.MaxResults != nil { + options.Limit = *params.MaxResults + } + + for _, fn := range optFns { + fn(&options) + } + + return &ListResourceCatalogsPaginator{ + options: options, + client: client, + params: params, + firstPage: true, + nextToken: params.NextToken, + } +} + +// HasMorePages returns a boolean indicating whether more pages are available +func (p *ListResourceCatalogsPaginator) HasMorePages() bool { + return p.firstPage || (p.nextToken != nil && len(*p.nextToken) != 0) +} + +// NextPage retrieves the next ListResourceCatalogs page. +func (p *ListResourceCatalogsPaginator) NextPage(ctx context.Context, optFns ...func(*Options)) (*ListResourceCatalogsOutput, 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 + + result, err := p.client.ListResourceCatalogs(ctx, ¶ms, optFns...) + if err != nil { + return nil, err + } + p.firstPage = false + + prevToken := p.nextToken + p.nextToken = result.NextToken + + if p.options.StopOnDuplicateToken && + prevToken != nil && + p.nextToken != nil && + *prevToken == *p.nextToken { + p.nextToken = nil + } + + return result, nil +} + +func newServiceMetadataMiddleware_opListResourceCatalogs(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "sagemaker", + OperationName: "ListResourceCatalogs", + } +} diff --git a/service/sagemaker/api_op_Search.go b/service/sagemaker/api_op_Search.go index ddc57a27b06..df07b46f805 100644 --- a/service/sagemaker/api_op_Search.go +++ b/service/sagemaker/api_op_Search.go @@ -41,6 +41,16 @@ type SearchInput struct { // This member is required. Resource types.ResourceType + // A cross account filter option. When the value is "CrossAccount" the search + // results will only include resources made discoverable to you from other + // accounts. When the value is "SameAccount" or null the search results will only + // include resources from your account. Default is null . For more information on + // searching for resources made discoverable to your account, see Search + // discoverable resources (https://docs.aws.amazon.com/sagemaker/latest/dg/feature-store-cross-account-discoverability-use.html) + // in the SageMaker Developer Guide. The maximum number of ResourceCatalog s + // viewable is 1000. + CrossAccountFilterOption types.CrossAccountFilterOption + // The maximum number of results to return. MaxResults *int32 diff --git a/service/sagemaker/api_op_UpdateFeatureGroup.go b/service/sagemaker/api_op_UpdateFeatureGroup.go index 4ddabad3fb5..0c66f78dd37 100644 --- a/service/sagemaker/api_op_UpdateFeatureGroup.go +++ b/service/sagemaker/api_op_UpdateFeatureGroup.go @@ -11,7 +11,16 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Updates the feature group. +// Updates the feature group by either adding features or updating the online +// store configuration. Use one of the following request parameters at a time while +// using the UpdateFeatureGroup API. You can add features for your feature group +// using the FeatureAdditions request parameter. Features cannot be removed from a +// feature group. You can update the online store configuration by using the +// OnlineStoreConfig request parameter. If a TtlDuration is specified, the default +// TtlDuration applies for all records added to the feature group after the feature +// group is updated. If a record level TtlDuration exists from using the PutRecord +// API, the record level TtlDuration applies to that record instead of the default +// TtlDuration . func (c *Client) UpdateFeatureGroup(ctx context.Context, params *UpdateFeatureGroupInput, optFns ...func(*Options)) (*UpdateFeatureGroupOutput, error) { if params == nil { params = &UpdateFeatureGroupInput{} @@ -29,7 +38,8 @@ func (c *Client) UpdateFeatureGroup(ctx context.Context, params *UpdateFeatureGr type UpdateFeatureGroupInput struct { - // The name of the feature group that you're updating. + // The name or Amazon Resource Name (ARN) of the feature group that you're + // updating. // // This member is required. FeatureGroupName *string diff --git a/service/sagemaker/api_op_UpdateFeatureMetadata.go b/service/sagemaker/api_op_UpdateFeatureMetadata.go index 8cca2d5c6a5..2fa5dfcfd44 100644 --- a/service/sagemaker/api_op_UpdateFeatureMetadata.go +++ b/service/sagemaker/api_op_UpdateFeatureMetadata.go @@ -29,7 +29,8 @@ func (c *Client) UpdateFeatureMetadata(ctx context.Context, params *UpdateFeatur type UpdateFeatureMetadataInput struct { - // The name of the feature group containing the feature that you're updating. + // The name or Amazon Resource Name (ARN) of the feature group containing the + // feature that you're updating. // // This member is required. FeatureGroupName *string diff --git a/service/sagemaker/deserializers.go b/service/sagemaker/deserializers.go index 976e5457bc8..570f7498762 100644 --- a/service/sagemaker/deserializers.go +++ b/service/sagemaker/deserializers.go @@ -24642,6 +24642,114 @@ func awsAwsjson11_deserializeOpErrorListProjects(response *smithyhttp.Response, } } +type awsAwsjson11_deserializeOpListResourceCatalogs struct { +} + +func (*awsAwsjson11_deserializeOpListResourceCatalogs) ID() string { + return "OperationDeserializer" +} + +func (m *awsAwsjson11_deserializeOpListResourceCatalogs) HandleDeserialize(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, awsAwsjson11_deserializeOpErrorListResourceCatalogs(response, &metadata) + } + output := &ListResourceCatalogsOutput{} + 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 = awsAwsjson11_deserializeOpDocumentListResourceCatalogsOutput(&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 out, metadata, err + } + + return out, metadata, err +} + +func awsAwsjson11_deserializeOpErrorListResourceCatalogs(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.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 { + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsAwsjson11_deserializeOpListSpaces struct { } @@ -65350,6 +65458,114 @@ func awsAwsjson11_deserializeDocumentResolvedAttributes(v **types.ResolvedAttrib return nil } +func awsAwsjson11_deserializeDocumentResourceCatalog(v **types.ResourceCatalog, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ResourceCatalog + if *v == nil { + sv = &types.ResourceCatalog{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + 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 "Description": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceCatalogDescription to be of type string, got %T instead", value) + } + sv.Description = ptr.String(jtv) + } + + case "ResourceCatalogArn": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceCatalogArn to be of type string, got %T instead", value) + } + sv.ResourceCatalogArn = ptr.String(jtv) + } + + case "ResourceCatalogName": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ResourceCatalogName to be of type string, got %T instead", value) + } + sv.ResourceCatalogName = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsAwsjson11_deserializeDocumentResourceCatalogList(v *[]types.ResourceCatalog, 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.ResourceCatalog + if *v == nil { + cv = []types.ResourceCatalog{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ResourceCatalog + destAddr := &col + if err := awsAwsjson11_deserializeDocumentResourceCatalog(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsAwsjson11_deserializeDocumentResourceConfig(v **types.ResourceConfig, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -87098,6 +87314,51 @@ func awsAwsjson11_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput return nil } +func awsAwsjson11_deserializeOpDocumentListResourceCatalogsOutput(v **ListResourceCatalogsOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListResourceCatalogsOutput + if *v == nil { + sv = &ListResourceCatalogsOutput{} + } 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 "ResourceCatalogs": + if err := awsAwsjson11_deserializeDocumentResourceCatalogList(&sv.ResourceCatalogs, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeOpDocumentListSpacesOutput(v **ListSpacesOutput, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/sagemaker/generated.json b/service/sagemaker/generated.json index fa03807a848..b3fb26b2ed0 100644 --- a/service/sagemaker/generated.json +++ b/service/sagemaker/generated.json @@ -238,6 +238,7 @@ "api_op_ListPipelines.go", "api_op_ListProcessingJobs.go", "api_op_ListProjects.go", + "api_op_ListResourceCatalogs.go", "api_op_ListSpaces.go", "api_op_ListStageDevices.go", "api_op_ListStudioLifecycleConfigs.go", diff --git a/service/sagemaker/serializers.go b/service/sagemaker/serializers.go index 37a2a079c33..3b47fec24cf 100644 --- a/service/sagemaker/serializers.go +++ b/service/sagemaker/serializers.go @@ -12612,6 +12612,61 @@ func (m *awsAwsjson11_serializeOpListProjects) HandleSerialize(ctx context.Conte return next.HandleSerialize(ctx, in) } +type awsAwsjson11_serializeOpListResourceCatalogs struct { +} + +func (*awsAwsjson11_serializeOpListResourceCatalogs) ID() string { + return "OperationSerializer" +} + +func (m *awsAwsjson11_serializeOpListResourceCatalogs) 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.(*ListResourceCatalogsInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + operationPath := "/" + if len(request.Request.URL.Path) == 0 { + request.Request.URL.Path = operationPath + } else { + request.Request.URL.Path = path.Join(request.Request.URL.Path, operationPath) + if request.Request.URL.Path != "/" && operationPath[len(operationPath)-1] == '/' { + request.Request.URL.Path += "/" + } + } + request.Request.Method = "POST" + httpBindingEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + httpBindingEncoder.SetHeader("Content-Type").String("application/x-amz-json-1.1") + httpBindingEncoder.SetHeader("X-Amz-Target").String("SageMaker.ListResourceCatalogs") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsAwsjson11_serializeOpDocumentListResourceCatalogsInput(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 = httpBindingEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} + type awsAwsjson11_serializeOpListSpaces struct { } @@ -33241,6 +33296,48 @@ func awsAwsjson11_serializeOpDocumentListProjectsInput(v *ListProjectsInput, val return nil } +func awsAwsjson11_serializeOpDocumentListResourceCatalogsInput(v *ListResourceCatalogsInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.CreationTimeAfter != nil { + ok := object.Key("CreationTimeAfter") + ok.Double(smithytime.FormatEpochSeconds(*v.CreationTimeAfter)) + } + + if v.CreationTimeBefore != nil { + ok := object.Key("CreationTimeBefore") + ok.Double(smithytime.FormatEpochSeconds(*v.CreationTimeBefore)) + } + + if v.MaxResults != nil { + ok := object.Key("MaxResults") + ok.Integer(*v.MaxResults) + } + + if v.NameContains != nil { + ok := object.Key("NameContains") + ok.String(*v.NameContains) + } + + if v.NextToken != nil { + ok := object.Key("NextToken") + ok.String(*v.NextToken) + } + + if len(v.SortBy) > 0 { + ok := object.Key("SortBy") + ok.String(string(v.SortBy)) + } + + if len(v.SortOrder) > 0 { + ok := object.Key("SortOrder") + ok.String(string(v.SortOrder)) + } + + return nil +} + func awsAwsjson11_serializeOpDocumentListSpacesInput(v *ListSpacesInput, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -33915,6 +34012,11 @@ func awsAwsjson11_serializeOpDocumentSearchInput(v *SearchInput, value smithyjso object := value.Object() defer object.Close() + if len(v.CrossAccountFilterOption) > 0 { + ok := object.Key("CrossAccountFilterOption") + ok.String(string(v.CrossAccountFilterOption)) + } + if v.MaxResults != nil { ok := object.Key("MaxResults") ok.Integer(*v.MaxResults) diff --git a/service/sagemaker/types/enums.go b/service/sagemaker/types/enums.go index 74a952f0b07..17aaee8711d 100644 --- a/service/sagemaker/types/enums.go +++ b/service/sagemaker/types/enums.go @@ -1370,6 +1370,24 @@ func (ContentClassifier) Values() []ContentClassifier { } } +type CrossAccountFilterOption string + +// Enum values for CrossAccountFilterOption +const ( + CrossAccountFilterOptionSameAccount CrossAccountFilterOption = "SameAccount" + CrossAccountFilterOptionCrossAccount CrossAccountFilterOption = "CrossAccount" +) + +// Values returns all known values for CrossAccountFilterOption. 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 (CrossAccountFilterOption) Values() []CrossAccountFilterOption { + return []CrossAccountFilterOption{ + "SameAccount", + "CrossAccount", + } +} + type DataDistributionType string // Enum values for DataDistributionType @@ -4656,6 +4674,40 @@ func (RepositoryAccessMode) Values() []RepositoryAccessMode { } } +type ResourceCatalogSortBy string + +// Enum values for ResourceCatalogSortBy +const ( + ResourceCatalogSortByCreationTime ResourceCatalogSortBy = "CreationTime" +) + +// Values returns all known values for ResourceCatalogSortBy. 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 (ResourceCatalogSortBy) Values() []ResourceCatalogSortBy { + return []ResourceCatalogSortBy{ + "CreationTime", + } +} + +type ResourceCatalogSortOrder string + +// Enum values for ResourceCatalogSortOrder +const ( + ResourceCatalogSortOrderAscending ResourceCatalogSortOrder = "Ascending" + ResourceCatalogSortOrderDescending ResourceCatalogSortOrder = "Descending" +) + +// Values returns all known values for ResourceCatalogSortOrder. 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 (ResourceCatalogSortOrder) Values() []ResourceCatalogSortOrder { + return []ResourceCatalogSortOrder{ + "Ascending", + "Descending", + } +} + type ResourceType string // Enum values for ResourceType diff --git a/service/sagemaker/types/types.go b/service/sagemaker/types/types.go index 8cae5e0c903..9d643225f3b 100644 --- a/service/sagemaker/types/types.go +++ b/service/sagemaker/types/types.go @@ -4492,7 +4492,7 @@ type FeatureGroup struct { noSmithyDocumentSerde } -// The name, Arn, CreationTime , FeatureGroup values, LastUpdatedTime and +// The name, ARN, CreationTime , FeatureGroup values, LastUpdatedTime and // EnableOnlineStorage status of a FeatureGroup . type FeatureGroupSummary struct { @@ -11983,6 +11983,36 @@ type ResolvedAttributes struct { noSmithyDocumentSerde } +// A resource catalog containing all of the resources of a specific resource type +// within a resource owner account. For an example on sharing the Amazon SageMaker +// Feature Store DefaultFeatureGroupCatalog , see Share Amazon SageMaker Catalog +// resource type (https://docs.aws.amazon.com/sagemaker/latest/APIReference/feature-store-cross-account-discoverability-share-sagemaker-catalog.html) +// in the Amazon SageMaker Developer Guide. +type ResourceCatalog struct { + + // The time the ResourceCatalog was created. + // + // This member is required. + CreationTime *time.Time + + // A free form description of the ResourceCatalog . + // + // This member is required. + Description *string + + // The Amazon Resource Name (ARN) of the ResourceCatalog . + // + // This member is required. + ResourceCatalogArn *string + + // The name of the ResourceCatalog . + // + // This member is required. + ResourceCatalogName *string + + noSmithyDocumentSerde +} + // Describes the resources, including machine learning (ML) compute instances and // ML storage volumes, to use for model training. type ResourceConfig struct { diff --git a/service/sagemakerfeaturestoreruntime/api_op_BatchGetRecord.go b/service/sagemakerfeaturestoreruntime/api_op_BatchGetRecord.go index 252b9769bf9..932d40b2077 100644 --- a/service/sagemakerfeaturestoreruntime/api_op_BatchGetRecord.go +++ b/service/sagemakerfeaturestoreruntime/api_op_BatchGetRecord.go @@ -29,8 +29,9 @@ func (c *Client) BatchGetRecord(ctx context.Context, params *BatchGetRecordInput type BatchGetRecordInput struct { - // A list of FeatureGroup names, with their corresponding RecordIdentifier value, - // and Feature name that have been requested to be retrieved in batch. + // A list containing the name or Amazon Resource Name (ARN) of the FeatureGroup , + // the list of names of Feature s to be retrieved, and the corresponding + // RecordIdentifier values as strings. // // This member is required. Identifiers []types.BatchGetRecordIdentifier diff --git a/service/sagemakerfeaturestoreruntime/api_op_DeleteRecord.go b/service/sagemakerfeaturestoreruntime/api_op_DeleteRecord.go index 60e66b313bd..c8aeefe7e92 100644 --- a/service/sagemakerfeaturestoreruntime/api_op_DeleteRecord.go +++ b/service/sagemakerfeaturestoreruntime/api_op_DeleteRecord.go @@ -49,7 +49,8 @@ type DeleteRecordInput struct { // This member is required. EventTime *string - // The name of the feature group to delete the record from. + // The name or Amazon Resource Name (ARN) of the feature group to delete the + // record from. // // This member is required. FeatureGroupName *string diff --git a/service/sagemakerfeaturestoreruntime/api_op_GetRecord.go b/service/sagemakerfeaturestoreruntime/api_op_GetRecord.go index 450e3aebb19..37a56f91c35 100644 --- a/service/sagemakerfeaturestoreruntime/api_op_GetRecord.go +++ b/service/sagemakerfeaturestoreruntime/api_op_GetRecord.go @@ -31,7 +31,8 @@ func (c *Client) GetRecord(ctx context.Context, params *GetRecordInput, optFns . type GetRecordInput struct { - // The name of the feature group from which you want to retrieve a record. + // The name or Amazon Resource Name (ARN) of the feature group from which you want + // to retrieve a record. // // This member is required. FeatureGroupName *string @@ -42,9 +43,9 @@ type GetRecordInput struct { // This member is required. RecordIdentifierValueAsString *string - // Parameter to request ExpiresAt in response. If Enabled , BatchGetRecord will - // return the value of ExpiresAt , if it is not null. If Disabled and null, - // BatchGetRecord will return null. + // Parameter to request ExpiresAt in response. If Enabled , GetRecord will return + // the value of ExpiresAt , if it is not null. If Disabled and null, GetRecord + // will return null. ExpirationTimeResponse types.ExpirationTimeResponse // List of names of Features to be retrieved. If not specified, the latest value diff --git a/service/sagemakerfeaturestoreruntime/api_op_PutRecord.go b/service/sagemakerfeaturestoreruntime/api_op_PutRecord.go index 63b477cd1fe..5a28d88e0e0 100644 --- a/service/sagemakerfeaturestoreruntime/api_op_PutRecord.go +++ b/service/sagemakerfeaturestoreruntime/api_op_PutRecord.go @@ -11,11 +11,18 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Used for data ingestion into the FeatureStore . The PutRecord API writes to -// both the OnlineStore and OfflineStore . If the record is the latest record for -// the recordIdentifier , the record is written to both the OnlineStore and -// OfflineStore . If the record is a historic record, it is written only to the -// OfflineStore . +// The PutRecord API is used to ingest a list of Records into your feature group. +// If a new record’s EventTime is greater, the new record is written to both the +// OnlineStore and OfflineStore . Otherwise, the record is a historic record and it +// is written only to the OfflineStore . You can specify the ingestion to be +// applied to the OnlineStore , OfflineStore , or both by using the TargetStores +// request parameter. You can set the ingested record to expire at a given time to +// live (TTL) duration after the record’s event time, ExpiresAt = EventTime + +// TtlDuration , by specifying the TtlDuration parameter. A record level +// TtlDuration is set when specifying the TtlDuration parameter using the PutRecord +// API call. If the input TtlDuration is null or unspecified, TtlDuration is set +// to the default feature group level TtlDuration . A record level TtlDuration +// supersedes the group level TtlDuration . func (c *Client) PutRecord(ctx context.Context, params *PutRecordInput, optFns ...func(*Options)) (*PutRecordOutput, error) { if params == nil { params = &PutRecordInput{} @@ -33,7 +40,8 @@ func (c *Client) PutRecord(ctx context.Context, params *PutRecordInput, optFns . type PutRecordInput struct { - // The name of the feature group that you want to insert the record into. + // The name or Amazon Resource Name (ARN) of the feature group that you want to + // insert the record into. // // This member is required. FeatureGroupName *string diff --git a/service/sagemakerfeaturestoreruntime/deserializers.go b/service/sagemakerfeaturestoreruntime/deserializers.go index d408ed7dd1c..61197012d33 100644 --- a/service/sagemakerfeaturestoreruntime/deserializers.go +++ b/service/sagemakerfeaturestoreruntime/deserializers.go @@ -896,7 +896,7 @@ func awsRestjson1_deserializeDocumentBatchGetRecordIdentifier(v **types.BatchGet if value != nil { jtv, ok := value.(string) if !ok { - return fmt.Errorf("expected FeatureGroupName to be of type string, got %T instead", value) + return fmt.Errorf("expected FeatureGroupNameOrArn to be of type string, got %T instead", value) } sv.FeatureGroupName = ptr.String(jtv) } diff --git a/service/sagemakerfeaturestoreruntime/types/types.go b/service/sagemakerfeaturestoreruntime/types/types.go index e126d484b4a..0e58e04b119 100644 --- a/service/sagemakerfeaturestoreruntime/types/types.go +++ b/service/sagemakerfeaturestoreruntime/types/types.go @@ -40,7 +40,8 @@ type BatchGetRecordError struct { // batch. type BatchGetRecordIdentifier struct { - // A FeatureGroupName containing Records you are retrieving in a batch. + // The name or Amazon Resource Name (ARN) of the FeatureGroup containing the + // records you are retrieving in a batch. // // This member is required. FeatureGroupName *string @@ -57,7 +58,7 @@ type BatchGetRecordIdentifier struct { noSmithyDocumentSerde } -// The output of Records that have been retrieved in a batch. +// The output of records that have been retrieved in a batch. type BatchGetRecordResultDetail struct { // The FeatureGroupName containing Records you retrieved in a batch. diff --git a/service/securitylake/api_op_CreateAwsLogSource.go b/service/securitylake/api_op_CreateAwsLogSource.go index e4c45d817aa..bac0097bcde 100644 --- a/service/securitylake/api_op_CreateAwsLogSource.go +++ b/service/securitylake/api_op_CreateAwsLogSource.go @@ -16,7 +16,7 @@ import ( // Regions, based on the parameters you specify. You can choose any source type in // any Region for either accounts that are part of a trusted organization or // standalone accounts. Once you add an Amazon Web Service as a source, Security -// Lake starts collecting logs and events from it, You can use this API only to +// Lake starts collecting logs and events from it. You can use this API only to // enable natively supported Amazon Web Services as a source. Use // CreateCustomLogSource to enable data collection from a custom source. func (c *Client) CreateAwsLogSource(ctx context.Context, params *CreateAwsLogSourceInput, optFns ...func(*Options)) (*CreateAwsLogSourceOutput, error) { diff --git a/service/securitylake/api_op_CreateDataLake.go b/service/securitylake/api_op_CreateDataLake.go index 0f9e03b5b32..06501c371fa 100644 --- a/service/securitylake/api_op_CreateDataLake.go +++ b/service/securitylake/api_op_CreateDataLake.go @@ -13,19 +13,19 @@ import ( // Initializes an Amazon Security Lake instance with the provided (or default) // configuration. You can enable Security Lake in Amazon Web Services Regions with -// customized settings before enabling log collection in Regions. By default, the -// CreateDataLake Security Lake in all Regions. To specify particular Regions, -// configure these Regions using the configurations parameter. If you have already -// enabled Security Lake in a Region when you call this command, the command will -// update the Region if you provide new configuration parameters. If you have not -// already enabled Security Lake in the Region when you call this API, it will set -// up the data lake in the Region with the specified configurations. When you -// enable Security Lake, it starts ingesting security data after the -// CreateAwsLogSource call. This includes ingesting security data from sources, -// storing data, and making data accessible to subscribers. Security Lake also -// enables all the existing settings and resources that it stores or maintains for -// your Amazon Web Services account in the current Region, including security log -// and event data. For more information, see the Amazon Security Lake User Guide (https://docs.aws.amazon.com/security-lake/latest/userguide/what-is-security-lake.html) +// customized settings before enabling log collection in Regions. To specify +// particular Regions, configure these Regions using the configurations parameter. +// If you have already enabled Security Lake in a Region when you call this +// command, the command will update the Region if you provide new configuration +// parameters. If you have not already enabled Security Lake in the Region when you +// call this API, it will set up the data lake in the Region with the specified +// configurations. When you enable Security Lake, it starts ingesting security data +// after the CreateAwsLogSource call. This includes ingesting security data from +// sources, storing data, and making data accessible to subscribers. Security Lake +// also enables all the existing settings and resources that it stores or maintains +// for your Amazon Web Services account in the current Region, including security +// log and event data. For more information, see the Amazon Security Lake User +// Guide (https://docs.aws.amazon.com/security-lake/latest/userguide/what-is-security-lake.html) // . func (c *Client) CreateDataLake(ctx context.Context, params *CreateDataLakeInput, optFns ...func(*Options)) (*CreateDataLakeOutput, error) { if params == nil { @@ -56,6 +56,11 @@ type CreateDataLakeInput struct { // This member is required. MetaStoreManagerRoleArn *string + // An array of objects, one for each tag to associate with the data lake + // configuration. For each tag, you must specify both a tag key and a tag value. A + // tag value cannot be null, but it can be an empty string. + Tags []types.Tag + noSmithyDocumentSerde } diff --git a/service/securitylake/api_op_CreateSubscriber.go b/service/securitylake/api_op_CreateSubscriber.go index 6899b56fb1c..aa810447e69 100644 --- a/service/securitylake/api_op_CreateSubscriber.go +++ b/service/securitylake/api_op_CreateSubscriber.go @@ -54,6 +54,11 @@ type CreateSubscriberInput struct { // The description for your subscriber account in Security Lake. SubscriberDescription *string + // An array of objects, one for each tag to associate with the subscriber. For + // each tag, you must specify both a tag key and a tag value. A tag value cannot be + // null, but it can be an empty string. + Tags []types.Tag + noSmithyDocumentSerde } diff --git a/service/securitylake/api_op_DeleteDataLakeOrganizationConfiguration.go b/service/securitylake/api_op_DeleteDataLakeOrganizationConfiguration.go index 10b5b2edf05..54a9e9cb4e2 100644 --- a/service/securitylake/api_op_DeleteDataLakeOrganizationConfiguration.go +++ b/service/securitylake/api_op_DeleteDataLakeOrganizationConfiguration.go @@ -11,11 +11,11 @@ import ( smithyhttp "github.com/aws/smithy-go/transport/http" ) -// Removes automatic the enablement of configuration settings for new member -// accounts (but retains the settings for the delegated administrator) from Amazon -// Security Lake. You must run this API using the credentials of the delegated -// administrator. When you run this API, new member accounts that are added after -// the organization enables Security Lake won't contribute to the data lake. +// Turns off automatic enablement of Amazon Security Lake for member accounts that +// are added to an organization in Organizations. Only the delegated Security Lake +// administrator for an organization can perform this operation. If the delegated +// Security Lake administrator performs this operation, new member accounts won't +// automatically contribute data to the data lake. func (c *Client) DeleteDataLakeOrganizationConfiguration(ctx context.Context, params *DeleteDataLakeOrganizationConfigurationInput, optFns ...func(*Options)) (*DeleteDataLakeOrganizationConfigurationOutput, error) { if params == nil { params = &DeleteDataLakeOrganizationConfigurationInput{} @@ -33,8 +33,8 @@ func (c *Client) DeleteDataLakeOrganizationConfiguration(ctx context.Context, pa type DeleteDataLakeOrganizationConfigurationInput struct { - // Removes the automatic enablement of configuration settings for new member - // accounts in Security Lake. + // Turns off automatic enablement of Security Lake for member accounts that are + // added to an organization. // // This member is required. AutoEnableNewAccount []types.DataLakeAutoEnableNewAccountConfiguration diff --git a/service/securitylake/api_op_ListDataLakes.go b/service/securitylake/api_op_ListDataLakes.go index 92d91b5c0bc..1117fe2e70e 100644 --- a/service/securitylake/api_op_ListDataLakes.go +++ b/service/securitylake/api_op_ListDataLakes.go @@ -12,8 +12,8 @@ import ( ) // Retrieves the Amazon Security Lake configuration object for the specified -// Amazon Web Services account ID. You can use the ListDataLakes API to know -// whether Security Lake is enabled for any region. +// Amazon Web Services Regions. You can use this operation to determine whether +// Security Lake is enabled for a Region. func (c *Client) ListDataLakes(ctx context.Context, params *ListDataLakesInput, optFns ...func(*Options)) (*ListDataLakesOutput, error) { if params == nil { params = &ListDataLakesInput{} diff --git a/service/securitylake/api_op_ListTagsForResource.go b/service/securitylake/api_op_ListTagsForResource.go new file mode 100644 index 00000000000..8a85ac1d402 --- /dev/null +++ b/service/securitylake/api_op_ListTagsForResource.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package securitylake + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/securitylake/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Retrieves the tags (keys and values) that are associated with an Amazon +// Security Lake resource: a subscriber, or the data lake configuration for your +// Amazon Web Services account in a particular Amazon Web Services Region. +func (c *Client) ListTagsForResource(ctx context.Context, params *ListTagsForResourceInput, optFns ...func(*Options)) (*ListTagsForResourceOutput, error) { + if params == nil { + params = &ListTagsForResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "ListTagsForResource", params, optFns, c.addOperationListTagsForResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*ListTagsForResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type ListTagsForResourceInput struct { + + // The Amazon Resource Name (ARN) of the Amazon Security Lake resource to retrieve + // the tags for. + // + // This member is required. + ResourceArn *string + + noSmithyDocumentSerde +} + +type ListTagsForResourceOutput struct { + + // An array of objects, one for each tag (key and value) that’s associated with + // the Amazon Security Lake resource. + Tags []types.Tag + + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationListTagsForResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpListTagsForResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpListTagsForResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForResource(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opListTagsForResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "securitylake", + OperationName: "ListTagsForResource", + } +} diff --git a/service/securitylake/api_op_TagResource.go b/service/securitylake/api_op_TagResource.go new file mode 100644 index 00000000000..2b0c21d02dc --- /dev/null +++ b/service/securitylake/api_op_TagResource.go @@ -0,0 +1,137 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package securitylake + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/aws-sdk-go-v2/service/securitylake/types" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Adds or updates one or more tags that are associated with an Amazon Security +// Lake resource: a subscriber, or the data lake configuration for your Amazon Web +// Services account in a particular Amazon Web Services Region. A tag is a label +// that you can define and associate with Amazon Web Services resources. Each tag +// consists of a required tag key and an associated tag value. A tag key is a +// general label that acts as a category for a more specific tag value. A tag value +// acts as a descriptor for a tag key. Tags can help you identify, categorize, and +// manage resources in different ways, such as by owner, environment, or other +// criteria. For more information, see Tagging Amazon Security Lake resources (https://docs.aws.amazon.com/security-lake/latest/userguide/tagging-resources.html) +// in the Amazon Security Lake User Guide. +func (c *Client) TagResource(ctx context.Context, params *TagResourceInput, optFns ...func(*Options)) (*TagResourceOutput, error) { + if params == nil { + params = &TagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "TagResource", params, optFns, c.addOperationTagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*TagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type TagResourceInput struct { + + // The Amazon Resource Name (ARN) of the Amazon Security Lake resource to add or + // update the tags for. + // + // This member is required. + ResourceArn *string + + // An array of objects, one for each tag (key and value) to associate with the + // Amazon Security Lake resource. For each tag, you must specify both a tag key and + // a tag value. A tag value cannot be null, but it can be an empty string. + // + // This member is required. + Tags []types.Tag + + noSmithyDocumentSerde +} + +type TagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationTagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpTagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpTagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opTagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "securitylake", + OperationName: "TagResource", + } +} diff --git a/service/securitylake/api_op_UntagResource.go b/service/securitylake/api_op_UntagResource.go new file mode 100644 index 00000000000..11aae47eadd --- /dev/null +++ b/service/securitylake/api_op_UntagResource.go @@ -0,0 +1,128 @@ +// Code generated by smithy-go-codegen DO NOT EDIT. + +package securitylake + +import ( + "context" + awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" + "github.com/aws/aws-sdk-go-v2/aws/signer/v4" + "github.com/aws/smithy-go/middleware" + smithyhttp "github.com/aws/smithy-go/transport/http" +) + +// Removes one or more tags (keys and values) from an Amazon Security Lake +// resource: a subscriber, or the data lake configuration for your Amazon Web +// Services account in a particular Amazon Web Services Region. +func (c *Client) UntagResource(ctx context.Context, params *UntagResourceInput, optFns ...func(*Options)) (*UntagResourceOutput, error) { + if params == nil { + params = &UntagResourceInput{} + } + + result, metadata, err := c.invokeOperation(ctx, "UntagResource", params, optFns, c.addOperationUntagResourceMiddlewares) + if err != nil { + return nil, err + } + + out := result.(*UntagResourceOutput) + out.ResultMetadata = metadata + return out, nil +} + +type UntagResourceInput struct { + + // The Amazon Resource Name (ARN) of the Amazon Security Lake resource to remove + // one or more tags from. + // + // This member is required. + ResourceArn *string + + // A list of one or more tag keys. For each value in the list, specify the tag key + // for a tag to remove from the Amazon Security Lake resource. + // + // This member is required. + TagKeys []string + + noSmithyDocumentSerde +} + +type UntagResourceOutput struct { + // Metadata pertaining to the operation's result. + ResultMetadata middleware.Metadata + + noSmithyDocumentSerde +} + +func (c *Client) addOperationUntagResourceMiddlewares(stack *middleware.Stack, options Options) (err error) { + err = stack.Serialize.Add(&awsRestjson1_serializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + err = stack.Deserialize.Add(&awsRestjson1_deserializeOpUntagResource{}, middleware.After) + if err != nil { + return err + } + if err = addSetLoggerMiddleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddClientRequestIDMiddleware(stack); err != nil { + return err + } + if err = smithyhttp.AddComputeContentLengthMiddleware(stack); err != nil { + return err + } + if err = addResolveEndpointMiddleware(stack, options); err != nil { + return err + } + if err = v4.AddComputePayloadSHA256Middleware(stack); err != nil { + return err + } + if err = addRetryMiddlewares(stack, options); err != nil { + return err + } + if err = addHTTPSignerV4Middleware(stack, options); err != nil { + return err + } + if err = awsmiddleware.AddRawResponseToMetadata(stack); err != nil { + return err + } + if err = awsmiddleware.AddRecordResponseTiming(stack); err != nil { + return err + } + if err = addClientUserAgent(stack, 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 = addOpUntagResourceValidationMiddleware(stack); err != nil { + return err + } + if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagResource(options.Region), middleware.Before); err != nil { + return err + } + if err = awsmiddleware.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 + } + return nil +} + +func newServiceMetadataMiddleware_opUntagResource(region string) *awsmiddleware.RegisterServiceMetadata { + return &awsmiddleware.RegisterServiceMetadata{ + Region: region, + ServiceID: ServiceID, + SigningName: "securitylake", + OperationName: "UntagResource", + } +} diff --git a/service/securitylake/deserializers.go b/service/securitylake/deserializers.go index ab2dc482c7d..5e78e875b0e 100644 --- a/service/securitylake/deserializers.go +++ b/service/securitylake/deserializers.go @@ -3245,6 +3245,168 @@ func awsRestjson1_deserializeOpDocumentListSubscribersOutput(v **ListSubscribers return nil } +type awsRestjson1_deserializeOpListTagsForResource struct { +} + +func (*awsRestjson1_deserializeOpListTagsForResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpListTagsForResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorListTagsForResource(response, &metadata) + } + output := &ListTagsForResourceOutput{} + out.Result = output + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(response.Body, ringBuffer) + + decoder := json.NewDecoder(body) + decoder.UseNumber() + var shape interface{} + if err := decoder.Decode(&shape); err != nil && err != io.EOF { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return out, metadata, err + } + + err = awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(&output, shape) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + return out, metadata, &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body with invalid JSON, %w", err), + Snapshot: snapshot.Bytes(), + } + } + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorListTagsForResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("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) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +func awsRestjson1_deserializeOpDocumentListTagsForResourceOutput(v **ListTagsForResourceOutput, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", v) + } + if value == nil { + return nil + } + + shape, ok := value.(map[string]interface{}) + if !ok { + return fmt.Errorf("unexpected JSON type %v", value) + } + + var sv *ListTagsForResourceOutput + if *v == nil { + sv = &ListTagsForResourceOutput{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "tags": + if err := awsRestjson1_deserializeDocumentTagList(&sv.Tags, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + type awsRestjson1_deserializeOpRegisterDataLakeDelegatedAdministrator struct { } @@ -3343,6 +3505,202 @@ func awsRestjson1_deserializeOpErrorRegisterDataLakeDelegatedAdministrator(respo } } +type awsRestjson1_deserializeOpTagResource struct { +} + +func (*awsRestjson1_deserializeOpTagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpTagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorTagResource(response, &metadata) + } + output := &TagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorTagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("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) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + +type awsRestjson1_deserializeOpUntagResource struct { +} + +func (*awsRestjson1_deserializeOpUntagResource) ID() string { + return "OperationDeserializer" +} + +func (m *awsRestjson1_deserializeOpUntagResource) HandleDeserialize(ctx context.Context, in middleware.DeserializeInput, next middleware.DeserializeHandler) ( + out middleware.DeserializeOutput, metadata middleware.Metadata, err error, +) { + out, metadata, err = next.HandleDeserialize(ctx, in) + if err != nil { + return out, metadata, err + } + + response, ok := out.RawResponse.(*smithyhttp.Response) + if !ok { + return out, metadata, &smithy.DeserializationError{Err: fmt.Errorf("unknown transport type %T", out.RawResponse)} + } + + if response.StatusCode < 200 || response.StatusCode >= 300 { + return out, metadata, awsRestjson1_deserializeOpErrorUntagResource(response, &metadata) + } + output := &UntagResourceOutput{} + out.Result = output + + return out, metadata, err +} + +func awsRestjson1_deserializeOpErrorUntagResource(response *smithyhttp.Response, metadata *middleware.Metadata) error { + var errorBuffer bytes.Buffer + if _, err := io.Copy(&errorBuffer, response.Body); err != nil { + return &smithy.DeserializationError{Err: fmt.Errorf("failed to copy error response body, %w", err)} + } + errorBody := bytes.NewReader(errorBuffer.Bytes()) + + errorCode := "UnknownError" + errorMessage := errorCode + + headerCode := response.Header.Get("X-Amzn-ErrorType") + if len(headerCode) != 0 { + errorCode = restjson.SanitizeErrorCode(headerCode) + } + + var buff [1024]byte + ringBuffer := smithyio.NewRingBuffer(buff[:]) + + body := io.TeeReader(errorBody, ringBuffer) + decoder := json.NewDecoder(body) + decoder.UseNumber() + jsonCode, message, err := restjson.GetErrorInfo(decoder) + if err != nil { + var snapshot bytes.Buffer + io.Copy(&snapshot, ringBuffer) + err = &smithy.DeserializationError{ + Err: fmt.Errorf("failed to decode response body, %w", err), + Snapshot: snapshot.Bytes(), + } + return err + } + + errorBody.Seek(0, io.SeekStart) + if len(headerCode) == 0 && len(jsonCode) != 0 { + errorCode = restjson.SanitizeErrorCode(jsonCode) + } + if len(message) != 0 { + errorMessage = message + } + + switch { + case strings.EqualFold("AccessDeniedException", errorCode): + return awsRestjson1_deserializeErrorAccessDeniedException(response, errorBody) + + case strings.EqualFold("BadRequestException", errorCode): + return awsRestjson1_deserializeErrorBadRequestException(response, errorBody) + + case strings.EqualFold("ConflictException", errorCode): + return awsRestjson1_deserializeErrorConflictException(response, errorBody) + + case strings.EqualFold("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) + + default: + genericError := &smithy.GenericAPIError{ + Code: errorCode, + Message: errorMessage, + } + return genericError + + } +} + type awsRestjson1_deserializeOpUpdateDataLake struct { } @@ -6061,6 +6419,89 @@ func awsRestjson1_deserializeDocumentSubscriberResourceList(v *[]types.Subscribe return nil } +func awsRestjson1_deserializeDocumentTag(v **types.Tag, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.Tag + if *v == nil { + sv = &types.Tag{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "key": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagKey to be of type string, got %T instead", value) + } + sv.Key = ptr.String(jtv) + } + + case "value": + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) + } + sv.Value = ptr.String(jtv) + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + +func awsRestjson1_deserializeDocumentTagList(v *[]types.Tag, 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.Tag + if *v == nil { + cv = []types.Tag{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.Tag + destAddr := &col + if err := awsRestjson1_deserializeDocumentTag(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + func awsRestjson1_deserializeDocumentThrottlingException(v **types.ThrottlingException, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) diff --git a/service/securitylake/generated.json b/service/securitylake/generated.json index ba91d22ff64..d28656f6ba3 100644 --- a/service/securitylake/generated.json +++ b/service/securitylake/generated.json @@ -31,7 +31,10 @@ "api_op_ListDataLakes.go", "api_op_ListLogSources.go", "api_op_ListSubscribers.go", + "api_op_ListTagsForResource.go", "api_op_RegisterDataLakeDelegatedAdministrator.go", + "api_op_TagResource.go", + "api_op_UntagResource.go", "api_op_UpdateDataLake.go", "api_op_UpdateDataLakeExceptionSubscription.go", "api_op_UpdateSubscriber.go", diff --git a/service/securitylake/serializers.go b/service/securitylake/serializers.go index 2fe146337a8..043565446ae 100644 --- a/service/securitylake/serializers.go +++ b/service/securitylake/serializers.go @@ -243,6 +243,13 @@ func awsRestjson1_serializeOpDocumentCreateDataLakeInput(v *CreateDataLakeInput, ok.String(*v.MetaStoreManagerRoleArn) } + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -485,6 +492,13 @@ func awsRestjson1_serializeOpDocumentCreateSubscriberInput(v *CreateSubscriberIn ok.String(*v.SubscriberName) } + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + return nil } @@ -1563,6 +1577,64 @@ func awsRestjson1_serializeOpHttpBindingsListSubscribersInput(v *ListSubscribers return nil } +type awsRestjson1_serializeOpListTagsForResource struct { +} + +func (*awsRestjson1_serializeOpListTagsForResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpListTagsForResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*ListTagsForResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "GET" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsListTagsForResourceInput(v *ListTagsForResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + type awsRestjson1_serializeOpRegisterDataLakeDelegatedAdministrator struct { } @@ -1631,6 +1703,153 @@ func awsRestjson1_serializeOpDocumentRegisterDataLakeDelegatedAdministratorInput return nil } +type awsRestjson1_serializeOpTagResource struct { +} + +func (*awsRestjson1_serializeOpTagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpTagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*TagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "POST" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsTagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + restEncoder.SetHeader("Content-Type").String("application/json") + + jsonEncoder := smithyjson.NewEncoder() + if err := awsRestjson1_serializeOpDocumentTagResourceInput(input, jsonEncoder.Value); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request, err = request.SetStream(bytes.NewReader(jsonEncoder.Bytes())); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsTagResourceInput(v *TagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + return nil +} + +func awsRestjson1_serializeOpDocumentTagResourceInput(v *TagResourceInput, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Tags != nil { + ok := object.Key("tags") + if err := awsRestjson1_serializeDocumentTagList(v.Tags, ok); err != nil { + return err + } + } + + return nil +} + +type awsRestjson1_serializeOpUntagResource struct { +} + +func (*awsRestjson1_serializeOpUntagResource) ID() string { + return "OperationSerializer" +} + +func (m *awsRestjson1_serializeOpUntagResource) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( + out middleware.SerializeOutput, metadata middleware.Metadata, err error, +) { + request, ok := in.Request.(*smithyhttp.Request) + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown transport type %T", in.Request)} + } + + input, ok := in.Parameters.(*UntagResourceInput) + _ = input + if !ok { + return out, metadata, &smithy.SerializationError{Err: fmt.Errorf("unknown input parameters type %T", in.Parameters)} + } + + opPath, opQuery := httpbinding.SplitURI("/v1/tags/{resourceArn}") + request.URL.Path = smithyhttp.JoinPath(request.URL.Path, opPath) + request.URL.RawQuery = smithyhttp.JoinRawQuery(request.URL.RawQuery, opQuery) + request.Method = "DELETE" + restEncoder, err := httpbinding.NewEncoder(request.URL.Path, request.URL.RawQuery, request.Header) + if err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if err := awsRestjson1_serializeOpHttpBindingsUntagResourceInput(input, restEncoder); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + + if request.Request, err = restEncoder.Encode(request.Request); err != nil { + return out, metadata, &smithy.SerializationError{Err: err} + } + in.Request = request + + return next.HandleSerialize(ctx, in) +} +func awsRestjson1_serializeOpHttpBindingsUntagResourceInput(v *UntagResourceInput, encoder *httpbinding.Encoder) error { + if v == nil { + return fmt.Errorf("unsupported serialization of nil %T", v) + } + + if v.ResourceArn == nil || len(*v.ResourceArn) == 0 { + return &smithy.SerializationError{Err: fmt.Errorf("input member resourceArn must not be empty")} + } + if v.ResourceArn != nil { + if err := encoder.SetURI("resourceArn").String(*v.ResourceArn); err != nil { + return err + } + } + + if v.TagKeys != nil { + for i := range v.TagKeys { + encoder.AddQuery("tagKeys").String(v.TagKeys[i]) + } + } + + return nil +} + type awsRestjson1_serializeOpUpdateDataLake struct { } @@ -2474,3 +2693,33 @@ func awsRestjson1_serializeDocumentSqsNotificationConfiguration(v *types.SqsNoti return nil } + +func awsRestjson1_serializeDocumentTag(v *types.Tag, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.Key != nil { + ok := object.Key("key") + ok.String(*v.Key) + } + + if v.Value != nil { + ok := object.Key("value") + ok.String(*v.Value) + } + + return nil +} + +func awsRestjson1_serializeDocumentTagList(v []types.Tag, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsRestjson1_serializeDocumentTag(&v[i], av); err != nil { + return err + } + } + return nil +} diff --git a/service/securitylake/types/types.go b/service/securitylake/types/types.go index 50b6bb66f52..82db86d5ca1 100644 --- a/service/securitylake/types/types.go +++ b/service/securitylake/types/types.go @@ -194,7 +194,7 @@ type DataLakeEncryptionConfiguration struct { noSmithyDocumentSerde } -// The details for a Security Lake exception +// The details for an Amazon Security Lake exception. type DataLakeException struct { // The underlying exception of a Security Lake exception. @@ -455,7 +455,7 @@ type LogSource struct { } // The supported source types from which logs and events are collected in Amazon -// Security Lake. For the list of supported Amazon Web Services, see the Amazon +// Security Lake. For a list of supported Amazon Web Services, see the Amazon // Security Lake User Guide (https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html) // . // @@ -468,7 +468,9 @@ type LogSourceResource interface { } // Amazon Security Lake supports log and event collection for natively supported -// Amazon Web Services. +// Amazon Web Services. For more information, see the Amazon Security Lake User +// Guide (https://docs.aws.amazon.com/security-lake/latest/userguide/internal-sources.html) +// . type LogSourceResourceMemberAwsLogSource struct { Value AwsLogSourceResource @@ -477,8 +479,9 @@ type LogSourceResourceMemberAwsLogSource struct { func (*LogSourceResourceMemberAwsLogSource) isLogSourceResource() {} -// Amazon Security Lake supports custom source types. For a detailed list, see the -// Amazon Security Lake User Guide. +// Amazon Security Lake supports custom source types. For more information, see +// the Amazon Security Lake User Guide (https://docs.aws.amazon.com/security-lake/latest/userguide/custom-sources.html) +// . type LogSourceResourceMemberCustomLogSource struct { Value CustomLogSourceResource @@ -529,7 +532,8 @@ type SubscriberResource struct { // Amazon Security Lake supports log and event collection for natively supported // Amazon Web Services. For more information, see the Amazon Security Lake User - // Guide. + // Guide (https://docs.aws.amazon.com/security-lake/latest/userguide/source-management.html) + // . // // This member is required. Sources []LogSourceResource @@ -595,6 +599,38 @@ type SubscriberResource struct { noSmithyDocumentSerde } +// A tag is a label that you can define and associate with Amazon Web Services +// resources, including certain types of Amazon Security Lake resources. Tags can +// help you identify, categorize, and manage resources in different ways, such as +// by owner, environment, or other criteria. You can associate tags with the +// following types of Security Lake resources: subscribers, and the data lake +// configuration for your Amazon Web Services account in individual Amazon Web +// Services Regions. A resource can have up to 50 tags. Each tag consists of a +// required tag key and an associated tag value. A tag key is a general label that +// acts as a category for a more specific tag value. Each tag key must be unique +// and it can have only one tag value. A tag value acts as a descriptor for a tag +// key. Tag keys and values are case sensitive. They can contain letters, numbers, +// spaces, or the following symbols: _ . : / = + @ - For more information, see +// Tagging Amazon Security Lake resources (https://docs.aws.amazon.com/security-lake/latest/userguide/tagging-resources.html) +// in the Amazon Security Lake User Guide. +type Tag struct { + + // The name of the tag. This is a general label that acts as a category for a more + // specific tag value ( value ). + // + // This member is required. + Key *string + + // The value that’s associated with the specified tag key ( key ). This value acts + // as a descriptor for the tag key. A tag value cannot be null, but it can be an + // empty string. + // + // This member is required. + Value *string + + noSmithyDocumentSerde +} + type noSmithyDocumentSerde = smithydocument.NoSerde // UnknownUnionMember is returned when a union member is returned over the wire, diff --git a/service/securitylake/validators.go b/service/securitylake/validators.go index c921a35d517..657745df335 100644 --- a/service/securitylake/validators.go +++ b/service/securitylake/validators.go @@ -290,6 +290,26 @@ func (m *validateOpGetSubscriber) HandleInitialize(ctx context.Context, in middl return next.HandleInitialize(ctx, in) } +type validateOpListTagsForResource struct { +} + +func (*validateOpListTagsForResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpListTagsForResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*ListTagsForResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpListTagsForResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpRegisterDataLakeDelegatedAdministrator struct { } @@ -310,6 +330,46 @@ func (m *validateOpRegisterDataLakeDelegatedAdministrator) HandleInitialize(ctx return next.HandleInitialize(ctx, in) } +type validateOpTagResource struct { +} + +func (*validateOpTagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpTagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*TagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpTagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + +type validateOpUntagResource struct { +} + +func (*validateOpUntagResource) ID() string { + return "OperationInputValidation" +} + +func (m *validateOpUntagResource) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( + out middleware.InitializeOutput, metadata middleware.Metadata, err error, +) { + input, ok := in.Parameters.(*UntagResourceInput) + if !ok { + return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) + } + if err := validateOpUntagResourceInput(input); err != nil { + return out, metadata, err + } + return next.HandleInitialize(ctx, in) +} + type validateOpUpdateDataLakeExceptionSubscription struct { } @@ -446,10 +506,22 @@ func addOpGetSubscriberValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpGetSubscriber{}, middleware.After) } +func addOpListTagsForResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpListTagsForResource{}, middleware.After) +} + func addOpRegisterDataLakeDelegatedAdministratorValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpRegisterDataLakeDelegatedAdministrator{}, middleware.After) } +func addOpTagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpTagResource{}, middleware.After) +} + +func addOpUntagResourceValidationMiddleware(stack *middleware.Stack) error { + return stack.Initialize.Add(&validateOpUntagResource{}, middleware.After) +} + func addOpUpdateDataLakeExceptionSubscriptionValidationMiddleware(stack *middleware.Stack) error { return stack.Initialize.Add(&validateOpUpdateDataLakeExceptionSubscription{}, middleware.After) } @@ -664,6 +736,41 @@ func validateNotificationConfiguration(v types.NotificationConfiguration) error } } +func validateTag(v *types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "Tag"} + if v.Key == nil { + invalidParams.Add(smithy.NewErrParamRequired("Key")) + } + if v.Value == nil { + invalidParams.Add(smithy.NewErrParamRequired("Value")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateTagList(v []types.Tag) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagList"} + for i := range v { + if err := validateTag(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpCreateAwsLogSourceInput(v *CreateAwsLogSourceInput) error { if v == nil { return nil @@ -736,6 +843,11 @@ func validateOpCreateDataLakeInput(v *CreateDataLakeInput) error { if v.MetaStoreManagerRoleArn == nil { invalidParams.Add(smithy.NewErrParamRequired("MetaStoreManagerRoleArn")) } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -780,6 +892,11 @@ func validateOpCreateSubscriberInput(v *CreateSubscriberInput) error { if v.Sources == nil { invalidParams.Add(smithy.NewErrParamRequired("Sources")) } + if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else { @@ -922,6 +1039,21 @@ func validateOpGetSubscriberInput(v *GetSubscriberInput) error { } } +func validateOpListTagsForResourceInput(v *ListTagsForResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ListTagsForResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpRegisterDataLakeDelegatedAdministratorInput(v *RegisterDataLakeDelegatedAdministratorInput) error { if v == nil { return nil @@ -937,6 +1069,46 @@ func validateOpRegisterDataLakeDelegatedAdministratorInput(v *RegisterDataLakeDe } } +func validateOpTagResourceInput(v *TagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "TagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.Tags == nil { + invalidParams.Add(smithy.NewErrParamRequired("Tags")) + } else if v.Tags != nil { + if err := validateTagList(v.Tags); err != nil { + invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateOpUntagResourceInput(v *UntagResourceInput) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "UntagResourceInput"} + if v.ResourceArn == nil { + invalidParams.Add(smithy.NewErrParamRequired("ResourceArn")) + } + if v.TagKeys == nil { + invalidParams.Add(smithy.NewErrParamRequired("TagKeys")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateOpUpdateDataLakeExceptionSubscriptionInput(v *UpdateDataLakeExceptionSubscriptionInput) error { if v == nil { return nil diff --git a/service/transcribe/api_op_StartTranscriptionJob.go b/service/transcribe/api_op_StartTranscriptionJob.go index eced6b151a0..633267543d1 100644 --- a/service/transcribe/api_op_StartTranscriptionJob.go +++ b/service/transcribe/api_op_StartTranscriptionJob.go @@ -264,6 +264,13 @@ type StartTranscriptionJobInput struct { // . Tags []types.Tag + // Enables toxic speech detection in your transcript. If you include + // ToxicityDetection in your request, you must also include ToxicityCategories . + // For information on the types of toxic speech Amazon Transcribe can detect, see + // Detecting toxic speech (https://docs.aws.amazon.com/transcribe/latest/dg/toxic-language.html) + // . + ToxicityDetection []types.ToxicityDetectionSettings + noSmithyDocumentSerde } diff --git a/service/transcribe/deserializers.go b/service/transcribe/deserializers.go index a54c6be88e3..70432329817 100644 --- a/service/transcribe/deserializers.go +++ b/service/transcribe/deserializers.go @@ -7601,6 +7601,112 @@ func awsAwsjson11_deserializeDocumentTagList(v *[]types.Tag, value interface{}) return nil } +func awsAwsjson11_deserializeDocumentToxicityCategories(v *[]types.ToxicityCategory, 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.ToxicityCategory + if *v == nil { + cv = []types.ToxicityCategory{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ToxicityCategory + if value != nil { + jtv, ok := value.(string) + if !ok { + return fmt.Errorf("expected ToxicityCategory to be of type string, got %T instead", value) + } + col = types.ToxicityCategory(jtv) + } + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentToxicityDetection(v *[]types.ToxicityDetectionSettings, 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.ToxicityDetectionSettings + if *v == nil { + cv = []types.ToxicityDetectionSettings{} + } else { + cv = *v + } + + for _, value := range shape { + var col types.ToxicityDetectionSettings + destAddr := &col + if err := awsAwsjson11_deserializeDocumentToxicityDetectionSettings(&destAddr, value); err != nil { + return err + } + col = *destAddr + cv = append(cv, col) + + } + *v = cv + return nil +} + +func awsAwsjson11_deserializeDocumentToxicityDetectionSettings(v **types.ToxicityDetectionSettings, value interface{}) error { + if v == nil { + return fmt.Errorf("unexpected nil of type %T", 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.ToxicityDetectionSettings + if *v == nil { + sv = &types.ToxicityDetectionSettings{} + } else { + sv = *v + } + + for key, value := range shape { + switch key { + case "ToxicityCategories": + if err := awsAwsjson11_deserializeDocumentToxicityCategories(&sv.ToxicityCategories, value); err != nil { + return err + } + + default: + _, _ = key, value + + } + } + *v = sv + return nil +} + func awsAwsjson11_deserializeDocumentTranscript(v **types.Transcript, value interface{}) error { if v == nil { return fmt.Errorf("unexpected nil of type %T", v) @@ -7935,6 +8041,11 @@ func awsAwsjson11_deserializeDocumentTranscriptionJob(v **types.TranscriptionJob return err } + case "ToxicityDetection": + if err := awsAwsjson11_deserializeDocumentToxicityDetection(&sv.ToxicityDetection, value); err != nil { + return err + } + case "Transcript": if err := awsAwsjson11_deserializeDocumentTranscript(&sv.Transcript, value); err != nil { return err @@ -8165,6 +8276,11 @@ func awsAwsjson11_deserializeDocumentTranscriptionJobSummary(v **types.Transcrip } } + case "ToxicityDetection": + if err := awsAwsjson11_deserializeDocumentToxicityDetection(&sv.ToxicityDetection, value); err != nil { + return err + } + case "TranscriptionJobName": if value != nil { jtv, ok := value.(string) diff --git a/service/transcribe/serializers.go b/service/transcribe/serializers.go index 8bcc43900f7..e636eec3e31 100644 --- a/service/transcribe/serializers.go +++ b/service/transcribe/serializers.go @@ -2797,6 +2797,44 @@ func awsAwsjson11_serializeDocumentTagList(v []types.Tag, value smithyjson.Value return nil } +func awsAwsjson11_serializeDocumentToxicityCategories(v []types.ToxicityCategory, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + av.String(string(v[i])) + } + return nil +} + +func awsAwsjson11_serializeDocumentToxicityDetection(v []types.ToxicityDetectionSettings, value smithyjson.Value) error { + array := value.Array() + defer array.Close() + + for i := range v { + av := array.Value() + if err := awsAwsjson11_serializeDocumentToxicityDetectionSettings(&v[i], av); err != nil { + return err + } + } + return nil +} + +func awsAwsjson11_serializeDocumentToxicityDetectionSettings(v *types.ToxicityDetectionSettings, value smithyjson.Value) error { + object := value.Object() + defer object.Close() + + if v.ToxicityCategories != nil { + ok := object.Key("ToxicityCategories") + if err := awsAwsjson11_serializeDocumentToxicityCategories(v.ToxicityCategories, ok); err != nil { + return err + } + } + + return nil +} + func awsAwsjson11_serializeDocumentTranscriptFilter(v *types.TranscriptFilter, value smithyjson.Value) error { object := value.Object() defer object.Close() @@ -3674,6 +3712,13 @@ func awsAwsjson11_serializeOpDocumentStartTranscriptionJobInput(v *StartTranscri } } + if v.ToxicityDetection != nil { + ok := object.Key("ToxicityDetection") + if err := awsAwsjson11_serializeDocumentToxicityDetection(v.ToxicityDetection, ok); err != nil { + return err + } + } + if v.TranscriptionJobName != nil { ok := object.Key("TranscriptionJobName") ok.String(*v.TranscriptionJobName) diff --git a/service/transcribe/types/enums.go b/service/transcribe/types/enums.go index 8c3beb63c4c..c6d4733e933 100644 --- a/service/transcribe/types/enums.go +++ b/service/transcribe/types/enums.go @@ -409,6 +409,22 @@ func (SubtitleFormat) Values() []SubtitleFormat { } } +type ToxicityCategory string + +// Enum values for ToxicityCategory +const ( + ToxicityCategoryAll ToxicityCategory = "ALL" +) + +// Values returns all known values for ToxicityCategory. 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 (ToxicityCategory) Values() []ToxicityCategory { + return []ToxicityCategory{ + "ALL", + } +} + type TranscriptFilterType string // Enum values for TranscriptFilterType diff --git a/service/transcribe/types/types.go b/service/transcribe/types/types.go index aa0e20a27e8..ddaa6ac25f0 100644 --- a/service/transcribe/types/types.go +++ b/service/transcribe/types/types.go @@ -1162,6 +1162,19 @@ type Tag struct { noSmithyDocumentSerde } +// Contains ToxicityCategories , which is a required parameter if you want to +// enable toxicity detection ( ToxicityDetection ) in your transcription request. +type ToxicityDetectionSettings struct { + + // If you include ToxicityDetection in your transcription request, you must also + // include ToxicityCategories . The only accepted value for this parameter is ALL . + // + // This member is required. + ToxicityCategories []ToxicityCategory + + noSmithyDocumentSerde +} + // Provides you with the Amazon S3 URI you can use to access your transcript. type Transcript struct { @@ -1358,6 +1371,10 @@ type TranscriptionJob struct { // transcription job. Tags []Tag + // Provides information about the toxicity detection settings applied to your + // transcription. + ToxicityDetection []ToxicityDetectionSettings + // Provides you with the Amazon S3 URI you can use to access your transcript. Transcript *Transcript @@ -1442,6 +1459,10 @@ type TranscriptionJobSummary struct { // processing at 12:32 PM UTC-7 on May 4, 2022. StartTime *time.Time + // Indicates whether toxicity detection was enabled for the specified + // transcription job. + ToxicityDetection []ToxicityDetectionSettings + // The name of the transcription job. Job names are case sensitive and must be // unique within an Amazon Web Services account. TranscriptionJobName *string diff --git a/service/transcribe/validators.go b/service/transcribe/validators.go index 450fadbfbc2..8318c701497 100644 --- a/service/transcribe/validators.go +++ b/service/transcribe/validators.go @@ -898,6 +898,38 @@ func validateTagList(v []types.Tag) error { } } +func validateToxicityDetection(v []types.ToxicityDetectionSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ToxicityDetection"} + for i := range v { + if err := validateToxicityDetectionSettings(&v[i]); err != nil { + invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) + } + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + +func validateToxicityDetectionSettings(v *types.ToxicityDetectionSettings) error { + if v == nil { + return nil + } + invalidParams := smithy.InvalidParamsError{Context: "ToxicityDetectionSettings"} + if v.ToxicityCategories == nil { + invalidParams.Add(smithy.NewErrParamRequired("ToxicityCategories")) + } + if invalidParams.Len() > 0 { + return invalidParams + } else { + return nil + } +} + func validateTranscriptFilter(v *types.TranscriptFilter) error { if v == nil { return nil @@ -1377,6 +1409,11 @@ func validateOpStartTranscriptionJobInput(v *StartTranscriptionJobInput) error { invalidParams.AddNested("Tags", err.(smithy.InvalidParamsError)) } } + if v.ToxicityDetection != nil { + if err := validateToxicityDetection(v.ToxicityDetection); err != nil { + invalidParams.AddNested("ToxicityDetection", err.(smithy.InvalidParamsError)) + } + } if invalidParams.Len() > 0 { return invalidParams } else {