From 33d4eabaa05d4729952c6b0989b9f132182475ad Mon Sep 17 00:00:00 2001 From: Eren Yeager <92114074+wty-Bryant@users.noreply.github.com> Date: Tue, 20 Aug 2024 16:47:34 -0400 Subject: [PATCH] Remove deprecated codestar service (#2754) * remove deprecated codestar service * add changelog * remove deprecated codestar integ tests --------- Co-authored-by: Tianyi Wang --- .../dad3ddc6fde1477babca16e7be7ffe46.json | 8 + codegen/sdk-codegen/aws-models/codestar.json | 3102 ----------- service/codestar/CHANGELOG.md | 434 -- service/codestar/LICENSE.txt | 202 - service/codestar/api_client.go | 627 --- service/codestar/api_client_test.go | 127 - .../codestar/api_op_AssociateTeamMember.go | 163 - service/codestar/api_op_CreateProject.go | 183 - service/codestar/api_op_CreateUserProfile.go | 183 - service/codestar/api_op_DeleteProject.go | 157 - service/codestar/api_op_DeleteUserProfile.go | 146 - service/codestar/api_op_DescribeProject.go | 169 - .../codestar/api_op_DescribeUserProfile.go | 175 - .../codestar/api_op_DisassociateTeamMember.go | 146 - service/codestar/api_op_ListProjects.go | 147 - service/codestar/api_op_ListResources.go | 153 - service/codestar/api_op_ListTagsForProject.go | 150 - service/codestar/api_op_ListTeamMembers.go | 155 - service/codestar/api_op_ListUserProfiles.go | 147 - service/codestar/api_op_TagProject.go | 146 - service/codestar/api_op_UntagProject.go | 142 - service/codestar/api_op_UpdateProject.go | 143 - service/codestar/api_op_UpdateTeamMember.go | 169 - service/codestar/api_op_UpdateUserProfile.go | 177 - service/codestar/auth.go | 284 - service/codestar/deserializers.go | 4549 ----------------- service/codestar/doc.go | 57 - service/codestar/endpoints.go | 531 -- service/codestar/endpoints_config_test.go | 139 - service/codestar/endpoints_test.go | 1264 ----- service/codestar/generated.json | 49 - service/codestar/go.mod | 16 - service/codestar/go.sum | 2 - service/codestar/go_module_metadata.go | 6 - .../codestar/internal/endpoints/endpoints.go | 337 -- .../internal/endpoints/endpoints_test.go | 11 - service/codestar/options.go | 227 - service/codestar/protocol_test.go | 3 - service/codestar/serializers.go | 1614 ------ .../api_op_AssociateTeamMember.go.snap | 36 - .../snapshot/api_op_CreateProject.go.snap | 36 - .../snapshot/api_op_CreateUserProfile.go.snap | 36 - .../snapshot/api_op_DeleteProject.go.snap | 36 - .../snapshot/api_op_DeleteUserProfile.go.snap | 36 - .../snapshot/api_op_DescribeProject.go.snap | 36 - .../api_op_DescribeUserProfile.go.snap | 36 - .../api_op_DisassociateTeamMember.go.snap | 36 - .../snapshot/api_op_ListProjects.go.snap | 35 - .../snapshot/api_op_ListResources.go.snap | 36 - .../api_op_ListTagsForProject.go.snap | 36 - .../snapshot/api_op_ListTeamMembers.go.snap | 36 - .../snapshot/api_op_ListUserProfiles.go.snap | 35 - .../snapshot/api_op_TagProject.go.snap | 36 - .../snapshot/api_op_UntagProject.go.snap | 36 - .../snapshot/api_op_UpdateProject.go.snap | 36 - .../snapshot/api_op_UpdateTeamMember.go.snap | 36 - .../snapshot/api_op_UpdateUserProfile.go.snap | 36 - service/codestar/snapshot_test.go | 494 -- service/codestar/types/errors.go | 355 -- service/codestar/types/types.go | 258 - service/codestar/validators.go | 825 --- .../integrationtest/codestar/smoke_test.go | 31 - 62 files changed, 8 insertions(+), 19041 deletions(-) create mode 100644 .changelog/dad3ddc6fde1477babca16e7be7ffe46.json delete mode 100644 codegen/sdk-codegen/aws-models/codestar.json delete mode 100644 service/codestar/CHANGELOG.md delete mode 100644 service/codestar/LICENSE.txt delete mode 100644 service/codestar/api_client.go delete mode 100644 service/codestar/api_client_test.go delete mode 100644 service/codestar/api_op_AssociateTeamMember.go delete mode 100644 service/codestar/api_op_CreateProject.go delete mode 100644 service/codestar/api_op_CreateUserProfile.go delete mode 100644 service/codestar/api_op_DeleteProject.go delete mode 100644 service/codestar/api_op_DeleteUserProfile.go delete mode 100644 service/codestar/api_op_DescribeProject.go delete mode 100644 service/codestar/api_op_DescribeUserProfile.go delete mode 100644 service/codestar/api_op_DisassociateTeamMember.go delete mode 100644 service/codestar/api_op_ListProjects.go delete mode 100644 service/codestar/api_op_ListResources.go delete mode 100644 service/codestar/api_op_ListTagsForProject.go delete mode 100644 service/codestar/api_op_ListTeamMembers.go delete mode 100644 service/codestar/api_op_ListUserProfiles.go delete mode 100644 service/codestar/api_op_TagProject.go delete mode 100644 service/codestar/api_op_UntagProject.go delete mode 100644 service/codestar/api_op_UpdateProject.go delete mode 100644 service/codestar/api_op_UpdateTeamMember.go delete mode 100644 service/codestar/api_op_UpdateUserProfile.go delete mode 100644 service/codestar/auth.go delete mode 100644 service/codestar/deserializers.go delete mode 100644 service/codestar/doc.go delete mode 100644 service/codestar/endpoints.go delete mode 100644 service/codestar/endpoints_config_test.go delete mode 100644 service/codestar/endpoints_test.go delete mode 100644 service/codestar/generated.json delete mode 100644 service/codestar/go.mod delete mode 100644 service/codestar/go.sum delete mode 100644 service/codestar/go_module_metadata.go delete mode 100644 service/codestar/internal/endpoints/endpoints.go delete mode 100644 service/codestar/internal/endpoints/endpoints_test.go delete mode 100644 service/codestar/options.go delete mode 100644 service/codestar/protocol_test.go delete mode 100644 service/codestar/serializers.go delete mode 100644 service/codestar/snapshot/api_op_AssociateTeamMember.go.snap delete mode 100644 service/codestar/snapshot/api_op_CreateProject.go.snap delete mode 100644 service/codestar/snapshot/api_op_CreateUserProfile.go.snap delete mode 100644 service/codestar/snapshot/api_op_DeleteProject.go.snap delete mode 100644 service/codestar/snapshot/api_op_DeleteUserProfile.go.snap delete mode 100644 service/codestar/snapshot/api_op_DescribeProject.go.snap delete mode 100644 service/codestar/snapshot/api_op_DescribeUserProfile.go.snap delete mode 100644 service/codestar/snapshot/api_op_DisassociateTeamMember.go.snap delete mode 100644 service/codestar/snapshot/api_op_ListProjects.go.snap delete mode 100644 service/codestar/snapshot/api_op_ListResources.go.snap delete mode 100644 service/codestar/snapshot/api_op_ListTagsForProject.go.snap delete mode 100644 service/codestar/snapshot/api_op_ListTeamMembers.go.snap delete mode 100644 service/codestar/snapshot/api_op_ListUserProfiles.go.snap delete mode 100644 service/codestar/snapshot/api_op_TagProject.go.snap delete mode 100644 service/codestar/snapshot/api_op_UntagProject.go.snap delete mode 100644 service/codestar/snapshot/api_op_UpdateProject.go.snap delete mode 100644 service/codestar/snapshot/api_op_UpdateTeamMember.go.snap delete mode 100644 service/codestar/snapshot/api_op_UpdateUserProfile.go.snap delete mode 100644 service/codestar/snapshot_test.go delete mode 100644 service/codestar/types/errors.go delete mode 100644 service/codestar/types/types.go delete mode 100644 service/codestar/validators.go delete mode 100644 service/internal/integrationtest/codestar/smoke_test.go diff --git a/.changelog/dad3ddc6fde1477babca16e7be7ffe46.json b/.changelog/dad3ddc6fde1477babca16e7be7ffe46.json new file mode 100644 index 00000000000..18b88bc4f8d --- /dev/null +++ b/.changelog/dad3ddc6fde1477babca16e7be7ffe46.json @@ -0,0 +1,8 @@ +{ + "id": "dad3ddc6-fde1-477b-abca-16e7be7ffe46", + "type": "feature", + "description": "Remove deprecated `codestar` service.", + "modules": [ + "." + ] +} \ No newline at end of file diff --git a/codegen/sdk-codegen/aws-models/codestar.json b/codegen/sdk-codegen/aws-models/codestar.json deleted file mode 100644 index ca9271136ac..00000000000 --- a/codegen/sdk-codegen/aws-models/codestar.json +++ /dev/null @@ -1,3102 +0,0 @@ -{ - "smithy": "2.0", - "metadata": { - "suppressions": [ - { - "id": "HttpMethodSemantics", - "namespace": "*" - }, - { - "id": "HttpResponseCodeSemantics", - "namespace": "*" - }, - { - "id": "PaginatedTrait", - "namespace": "*" - }, - { - "id": "HttpHeaderTrait", - "namespace": "*" - }, - { - "id": "HttpUriConflict", - "namespace": "*" - }, - { - "id": "Service", - "namespace": "*" - } - ] - }, - "shapes": { - "com.amazonaws.codestar#AssociateTeamMember": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#AssociateTeamMemberRequest" - }, - "output": { - "target": "com.amazonaws.codestar#AssociateTeamMemberResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.codestar#InvalidServiceRoleException" - }, - { - "target": "com.amazonaws.codestar#LimitExceededException" - }, - { - "target": "com.amazonaws.codestar#ProjectConfigurationException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#TeamMemberAlreadyAssociatedException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Adds an IAM user to the team for an AWS CodeStar project.

" - } - }, - "com.amazonaws.codestar#AssociateTeamMemberRequest": { - "type": "structure", - "members": { - "projectId": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project to which you will add the IAM user.

", - "smithy.api#required": {} - } - }, - "clientRequestToken": { - "target": "com.amazonaws.codestar#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

A user- or system-generated token that identifies the entity that requested the team\n member association to the project. This token can be used to repeat the request.

" - } - }, - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS CodeStar\n project.

", - "smithy.api#required": {} - } - }, - "projectRole": { - "target": "com.amazonaws.codestar#Role", - "traits": { - "smithy.api#documentation": "

The AWS CodeStar project role that will apply to this user. This role determines what actions\n a user can take in an AWS CodeStar project.

", - "smithy.api#required": {} - } - }, - "remoteAccessAllowed": { - "target": "com.amazonaws.codestar#RemoteAccessAllowed", - "traits": { - "smithy.api#default": null, - "smithy.api#documentation": "

Whether the team member is allowed to use an SSH public/private key pair to remotely\n access project resources, for example Amazon EC2 instances.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#AssociateTeamMemberResult": { - "type": "structure", - "members": { - "clientRequestToken": { - "target": "com.amazonaws.codestar#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

The user- or system-generated token from the initial request that can be used to repeat\n the request.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#BucketKey": { - "type": "string" - }, - "com.amazonaws.codestar#BucketName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 3, - "max": 63 - } - } - }, - "com.amazonaws.codestar#ClientRequestToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 256 - }, - "smithy.api#pattern": "^[\\w:/-]+$" - } - }, - "com.amazonaws.codestar#Code": { - "type": "structure", - "members": { - "source": { - "target": "com.amazonaws.codestar#CodeSource", - "traits": { - "smithy.api#documentation": "

The location where the source code files provided with the project request are\n stored. AWS CodeStar retrieves the files during project creation.

", - "smithy.api#required": {} - } - }, - "destination": { - "target": "com.amazonaws.codestar#CodeDestination", - "traits": { - "smithy.api#documentation": "

The repository to be created in AWS CodeStar. Valid values are AWS CodeCommit or GitHub. After AWS CodeStar provisions the new repository, the\n source code files provided with the project request are placed in the repository.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Location and destination information about the source code files provided with the\n project request. The source code is uploaded to the new project source repository after\n project creation.

" - } - }, - "com.amazonaws.codestar#CodeCommitCodeDestination": { - "type": "structure", - "members": { - "name": { - "target": "com.amazonaws.codestar#RepositoryName", - "traits": { - "smithy.api#documentation": "

The name of the AWS CodeCommit repository to be created in AWS CodeStar.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided\n with the project request will be uploaded after project creation.

" - } - }, - "com.amazonaws.codestar#CodeDestination": { - "type": "structure", - "members": { - "codeCommit": { - "target": "com.amazonaws.codestar#CodeCommitCodeDestination", - "traits": { - "smithy.api#documentation": "

Information about the AWS CodeCommit repository to be created in AWS CodeStar. This is where the source code files provided\n with the project request will be uploaded after project creation.

" - } - }, - "gitHub": { - "target": "com.amazonaws.codestar#GitHubCodeDestination", - "traits": { - "smithy.api#documentation": "

Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the\n project request will be uploaded after project creation.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

The repository to be created in AWS CodeStar. Valid values are AWS CodeCommit or GitHub. After AWS CodeStar provisions the new repository, the\n source code files provided with the project request are placed in the repository.

" - } - }, - "com.amazonaws.codestar#CodeSource": { - "type": "structure", - "members": { - "s3": { - "target": "com.amazonaws.codestar#S3Location", - "traits": { - "smithy.api#documentation": "

Information about the Amazon S3 location where the source code files provided with the\n project request are stored.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

The location where the source code files provided with the project request are\n stored. AWS CodeStar retrieves the files during project creation.

" - } - }, - "com.amazonaws.codestar#CodeStar_20170419": { - "type": "service", - "version": "2017-04-19", - "operations": [ - { - "target": "com.amazonaws.codestar#AssociateTeamMember" - }, - { - "target": "com.amazonaws.codestar#CreateProject" - }, - { - "target": "com.amazonaws.codestar#CreateUserProfile" - }, - { - "target": "com.amazonaws.codestar#DeleteProject" - }, - { - "target": "com.amazonaws.codestar#DeleteUserProfile" - }, - { - "target": "com.amazonaws.codestar#DescribeProject" - }, - { - "target": "com.amazonaws.codestar#DescribeUserProfile" - }, - { - "target": "com.amazonaws.codestar#DisassociateTeamMember" - }, - { - "target": "com.amazonaws.codestar#ListProjects" - }, - { - "target": "com.amazonaws.codestar#ListResources" - }, - { - "target": "com.amazonaws.codestar#ListTagsForProject" - }, - { - "target": "com.amazonaws.codestar#ListTeamMembers" - }, - { - "target": "com.amazonaws.codestar#ListUserProfiles" - }, - { - "target": "com.amazonaws.codestar#TagProject" - }, - { - "target": "com.amazonaws.codestar#UntagProject" - }, - { - "target": "com.amazonaws.codestar#UpdateProject" - }, - { - "target": "com.amazonaws.codestar#UpdateTeamMember" - }, - { - "target": "com.amazonaws.codestar#UpdateUserProfile" - } - ], - "traits": { - "aws.api#service": { - "sdkId": "CodeStar", - "arnNamespace": "codestar", - "cloudFormationName": "CodeStar", - "cloudTrailEventSource": "codestar.amazonaws.com", - "endpointPrefix": "codestar" - }, - "aws.auth#sigv4": { - "name": "codestar" - }, - "aws.protocols#awsJson1_1": {}, - "smithy.api#documentation": "AWS CodeStar\n

This is the API reference for AWS CodeStar. This reference provides descriptions of the\n operations and data types for the AWS CodeStar API along with usage examples.

\n

You can use the AWS CodeStar API to work with:

\n

Projects and their resources, by calling the following:

\n \n

Teams and team members, by calling the following:

\n \n

Users, by calling the following:

\n ", - "smithy.api#title": "AWS CodeStar", - "smithy.rules#endpointRuleSet": { - "version": "1.0", - "parameters": { - "Region": { - "builtIn": "AWS::Region", - "required": false, - "documentation": "The AWS region used to dispatch the request.", - "type": "String" - }, - "UseDualStack": { - "builtIn": "AWS::UseDualStack", - "required": true, - "default": false, - "documentation": "When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.", - "type": "Boolean" - }, - "UseFIPS": { - "builtIn": "AWS::UseFIPS", - "required": true, - "default": false, - "documentation": "When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.", - "type": "Boolean" - }, - "Endpoint": { - "builtIn": "SDK::Endpoint", - "required": false, - "documentation": "Override the endpoint used to send this request", - "type": "String" - } - }, - "rules": [ - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Endpoint" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "error": "Invalid Configuration: FIPS and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported", - "type": "error" - }, - { - "conditions": [], - "endpoint": { - "url": { - "ref": "Endpoint" - }, - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "isSet", - "argv": [ - { - "ref": "Region" - } - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "aws.partition", - "argv": [ - { - "ref": "Region" - } - ], - "assign": "PartitionResult" - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - }, - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - } - ] - }, - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codestar-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS and DualStack are enabled, but this partition does not support one or both", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseFIPS" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsFIPS" - ] - }, - true - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codestar-fips.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "FIPS is enabled but this partition does not support FIPS", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - { - "ref": "UseDualStack" - }, - true - ] - } - ], - "rules": [ - { - "conditions": [ - { - "fn": "booleanEquals", - "argv": [ - true, - { - "fn": "getAttr", - "argv": [ - { - "ref": "PartitionResult" - }, - "supportsDualStack" - ] - } - ] - } - ], - "rules": [ - { - "conditions": [], - "endpoint": { - "url": "https://codestar.{Region}.{PartitionResult#dualStackDnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "DualStack is enabled but this partition does not support DualStack", - "type": "error" - } - ], - "type": "tree" - }, - { - "conditions": [], - "endpoint": { - "url": "https://codestar.{Region}.{PartitionResult#dnsSuffix}", - "properties": {}, - "headers": {} - }, - "type": "endpoint" - } - ], - "type": "tree" - } - ], - "type": "tree" - }, - { - "conditions": [], - "error": "Invalid Configuration: Missing Region", - "type": "error" - } - ] - }, - "smithy.rules#endpointTests": { - "testCases": [ - { - "documentation": "For region ap-northeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.ap-northeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-northeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.ap-northeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-northeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.ap-southeast-1.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ap-southeast-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.ap-southeast-2.amazonaws.com" - } - }, - "params": { - "Region": "ap-southeast-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region ca-central-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.ca-central-1.amazonaws.com" - } - }, - "params": { - "Region": "ca-central-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-central-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.eu-central-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-central-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.eu-north-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.eu-west-1.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region eu-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.eu-west-2.amazonaws.com" - } - }, - "params": { - "Region": "eu-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-east-2.amazonaws.com" - } - }, - "params": { - "Region": "us-east-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-west-1.amazonaws.com" - } - }, - "params": { - "Region": "us-west-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-west-2 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-west-2.amazonaws.com" - } - }, - "params": { - "Region": "us-west-2", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://codestar-fips.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar-fips.us-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-east-1.api.aws" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://codestar-fips.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar-fips.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://codestar.cn-north-1.api.amazonwebservices.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region cn-north-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.cn-north-1.amazonaws.com.cn" - } - }, - "params": { - "Region": "cn-north-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://codestar-fips.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar-fips.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-gov-east-1.api.aws" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-gov-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-gov-east-1.amazonaws.com" - } - }, - "params": { - "Region": "us-gov-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar-fips.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-iso-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-iso-east-1.c2s.ic.gov" - } - }, - "params": { - "Region": "us-iso-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack enabled", - "expect": { - "error": "FIPS and DualStack are enabled, but this partition does not support one or both" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS enabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar-fips.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": true, - "UseDualStack": false - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack enabled", - "expect": { - "error": "DualStack is enabled but this partition does not support DualStack" - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": true - } - }, - { - "documentation": "For region us-isob-east-1 with FIPS disabled and DualStack disabled", - "expect": { - "endpoint": { - "url": "https://codestar.us-isob-east-1.sc2s.sgov.gov" - } - }, - "params": { - "Region": "us-isob-east-1", - "UseFIPS": false, - "UseDualStack": false - } - }, - { - "documentation": "For custom endpoint with region set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with region not set and fips disabled and dualstack disabled", - "expect": { - "endpoint": { - "url": "https://example.com" - } - }, - "params": { - "UseFIPS": false, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips enabled and dualstack disabled", - "expect": { - "error": "Invalid Configuration: FIPS and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": true, - "UseDualStack": false, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "For custom endpoint with fips disabled and dualstack enabled", - "expect": { - "error": "Invalid Configuration: Dualstack and custom endpoint are not supported" - }, - "params": { - "Region": "us-east-1", - "UseFIPS": false, - "UseDualStack": true, - "Endpoint": "https://example.com" - } - }, - { - "documentation": "Missing region", - "expect": { - "error": "Invalid Configuration: Missing Region" - } - } - ], - "version": "1.0" - } - } - }, - "com.amazonaws.codestar#ConcurrentModificationException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

Another modification is being made. That modification must complete before you can make\n your change.

", - "smithy.api#error": "server", - "smithy.api#httpError": 500 - } - }, - "com.amazonaws.codestar#CreateProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#CreateProjectRequest" - }, - "output": { - "target": "com.amazonaws.codestar#CreateProjectResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.codestar#InvalidServiceRoleException" - }, - { - "target": "com.amazonaws.codestar#LimitExceededException" - }, - { - "target": "com.amazonaws.codestar#ProjectAlreadyExistsException" - }, - { - "target": "com.amazonaws.codestar#ProjectConfigurationException" - }, - { - "target": "com.amazonaws.codestar#ProjectCreationFailedException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Creates a project, including project resources. This action creates a project based on\n a submitted project request. A set of source code files and a toolchain template file\n can be included with the project request. If these are not provided, an empty project is created.

" - } - }, - "com.amazonaws.codestar#CreateProjectRequest": { - "type": "structure", - "members": { - "name": { - "target": "com.amazonaws.codestar#ProjectName", - "traits": { - "smithy.api#documentation": "

The display name for the project to be created in AWS CodeStar.

", - "smithy.api#required": {} - } - }, - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project to be created in AWS CodeStar.

", - "smithy.api#required": {} - } - }, - "description": { - "target": "com.amazonaws.codestar#ProjectDescription", - "traits": { - "smithy.api#documentation": "

The description of the project, if any.

" - } - }, - "clientRequestToken": { - "target": "com.amazonaws.codestar#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

A user- or system-generated token that identifies the entity that requested project\n creation. This token can be used to repeat the request.

" - } - }, - "sourceCode": { - "target": "com.amazonaws.codestar#SourceCode", - "traits": { - "smithy.api#documentation": "

A list of the Code objects submitted with the project request. If this\n parameter is specified, the request must also include the toolchain parameter.

" - } - }, - "toolchain": { - "target": "com.amazonaws.codestar#Toolchain", - "traits": { - "smithy.api#documentation": "

The name of the toolchain template file submitted with the project request. If\n this parameter is specified, the request must also include the sourceCode parameter.

" - } - }, - "tags": { - "target": "com.amazonaws.codestar#Tags", - "traits": { - "smithy.api#documentation": "

The tags created for the project.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#CreateProjectResult": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project.

", - "smithy.api#required": {} - } - }, - "arn": { - "target": "com.amazonaws.codestar#ProjectArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the created project.

", - "smithy.api#required": {} - } - }, - "clientRequestToken": { - "target": "com.amazonaws.codestar#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

A user- or system-generated token that identifies the entity that requested project\n creation.

" - } - }, - "projectTemplateId": { - "target": "com.amazonaws.codestar#ProjectTemplateId", - "traits": { - "smithy.api#documentation": "

Reserved for future use.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#CreateUserProfile": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#CreateUserProfileRequest" - }, - "output": { - "target": "com.amazonaws.codestar#CreateUserProfileResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#UserProfileAlreadyExistsException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Creates a profile for a user that includes user preferences, such as the display name\n and email address assocciated with the user, in AWS CodeStar. The user profile is not\n project-specific. Information in the user profile is displayed wherever the user's information\n appears to other users in AWS CodeStar.

" - } - }, - "com.amazonaws.codestar#CreateUserProfileRequest": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user in IAM.

", - "smithy.api#required": {} - } - }, - "displayName": { - "target": "com.amazonaws.codestar#UserProfileDisplayName", - "traits": { - "smithy.api#documentation": "

The name that will be displayed as the friendly name for the user in AWS CodeStar.

", - "smithy.api#required": {} - } - }, - "emailAddress": { - "target": "com.amazonaws.codestar#Email", - "traits": { - "smithy.api#documentation": "

The email address that will be displayed as part of the user's profile in\n AWS CodeStar.

", - "smithy.api#required": {} - } - }, - "sshPublicKey": { - "target": "com.amazonaws.codestar#SshPublicKey", - "traits": { - "smithy.api#documentation": "

The SSH public key associated with the user in AWS CodeStar. If a project owner allows the\n user remote access to project resources, this public key will be used along with the user's\n private key for SSH access.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#CreateUserProfileResult": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user in IAM.

", - "smithy.api#required": {} - } - }, - "displayName": { - "target": "com.amazonaws.codestar#UserProfileDisplayName", - "traits": { - "smithy.api#documentation": "

The name that is displayed as the friendly name for the user in AWS CodeStar.

" - } - }, - "emailAddress": { - "target": "com.amazonaws.codestar#Email", - "traits": { - "smithy.api#documentation": "

The email address that is displayed as part of the user's profile in AWS CodeStar.

" - } - }, - "sshPublicKey": { - "target": "com.amazonaws.codestar#SshPublicKey", - "traits": { - "smithy.api#documentation": "

The SSH public key associated with the user in AWS CodeStar. This is the public portion of the\n public/private keypair the user can use to access project resources if a project owner allows\n the user remote access to those resources.

" - } - }, - "createdTimestamp": { - "target": "com.amazonaws.codestar#CreatedTimestamp", - "traits": { - "smithy.api#documentation": "

The date the user profile was created, in timestamp format.

" - } - }, - "lastModifiedTimestamp": { - "target": "com.amazonaws.codestar#LastModifiedTimestamp", - "traits": { - "smithy.api#documentation": "

The date the user profile was last modified, in timestamp format.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#CreatedTimestamp": { - "type": "timestamp" - }, - "com.amazonaws.codestar#DeleteProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#DeleteProjectRequest" - }, - "output": { - "target": "com.amazonaws.codestar#DeleteProjectResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.codestar#InvalidServiceRoleException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Deletes a project, including project resources. Does not delete users associated with\n the project, but does delete the IAM roles that allowed access to the project.

" - } - }, - "com.amazonaws.codestar#DeleteProjectRequest": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project to be deleted in AWS CodeStar.

", - "smithy.api#required": {} - } - }, - "clientRequestToken": { - "target": "com.amazonaws.codestar#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

A user- or system-generated token that identifies the entity that requested project\n deletion. This token can be used to repeat the request.

" - } - }, - "deleteStack": { - "target": "com.amazonaws.codestar#DeleteStack", - "traits": { - "smithy.api#default": false, - "smithy.api#documentation": "

Whether to send a delete request for the primary stack in AWS CloudFormation originally\n used to generate the project and its resources. This option will delete all AWS resources for\n the project (except for any buckets in Amazon S3) as well as deleting the project itself.\n Recommended for most use cases.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#DeleteProjectResult": { - "type": "structure", - "members": { - "stackId": { - "target": "com.amazonaws.codestar#StackId", - "traits": { - "smithy.api#documentation": "

The ID of the primary stack in AWS CloudFormation that will be deleted as part of\n deleting the project and its resources.

" - } - }, - "projectArn": { - "target": "com.amazonaws.codestar#ProjectArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the deleted project.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#DeleteStack": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } - }, - "com.amazonaws.codestar#DeleteUserProfile": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#DeleteUserProfileRequest" - }, - "output": { - "target": "com.amazonaws.codestar#DeleteUserProfileResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Deletes a user profile in AWS CodeStar, including all personal preference data associated with\n that profile, such as display name and email address. It does not delete the history of that\n user, for example the history of commits made by that user.

" - } - }, - "com.amazonaws.codestar#DeleteUserProfileRequest": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user to delete from AWS CodeStar.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#DeleteUserProfileResult": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user deleted from AWS CodeStar.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#DescribeProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#DescribeProjectRequest" - }, - "output": { - "target": "com.amazonaws.codestar#DescribeProjectResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.codestar#InvalidServiceRoleException" - }, - { - "target": "com.amazonaws.codestar#ProjectConfigurationException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Describes a project and its resources.

" - } - }, - "com.amazonaws.codestar#DescribeProjectRequest": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#DescribeProjectResult": { - "type": "structure", - "members": { - "name": { - "target": "com.amazonaws.codestar#ProjectName", - "traits": { - "smithy.api#documentation": "

The display name for the project.

" - } - }, - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project.

" - } - }, - "arn": { - "target": "com.amazonaws.codestar#ProjectArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) for the project.

" - } - }, - "description": { - "target": "com.amazonaws.codestar#ProjectDescription", - "traits": { - "smithy.api#documentation": "

The description of the project, if any.

" - } - }, - "clientRequestToken": { - "target": "com.amazonaws.codestar#ClientRequestToken", - "traits": { - "smithy.api#documentation": "

A user- or system-generated token that identifies the entity that requested project\n creation.

" - } - }, - "createdTimeStamp": { - "target": "com.amazonaws.codestar#CreatedTimestamp", - "traits": { - "smithy.api#documentation": "

The date and time the project was created, in timestamp format.

" - } - }, - "stackId": { - "target": "com.amazonaws.codestar#StackId", - "traits": { - "smithy.api#documentation": "

The ID of the primary stack in AWS CloudFormation used to generate resources for the\n project.

" - } - }, - "projectTemplateId": { - "target": "com.amazonaws.codestar#ProjectTemplateId", - "traits": { - "smithy.api#documentation": "

The ID for the AWS CodeStar project template used to create the project.

" - } - }, - "status": { - "target": "com.amazonaws.codestar#ProjectStatus", - "traits": { - "smithy.api#documentation": "

The project creation or deletion status.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#DescribeUserProfile": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#DescribeUserProfileRequest" - }, - "output": { - "target": "com.amazonaws.codestar#DescribeUserProfileResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#UserProfileNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Describes a user in AWS CodeStar and the user attributes across all projects.

" - } - }, - "com.amazonaws.codestar#DescribeUserProfileRequest": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#DescribeUserProfileResult": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user.

", - "smithy.api#required": {} - } - }, - "displayName": { - "target": "com.amazonaws.codestar#UserProfileDisplayName", - "traits": { - "smithy.api#documentation": "

The display name shown for the user in AWS CodeStar projects. For example, this could be set\n to both first and last name (\"Mary Major\") or a single name (\"Mary\"). The display name is also\n used to generate the initial icon associated with the user in AWS CodeStar projects. If spaces are\n included in the display name, the first character that appears after the space will be used as\n the second character in the user initial icon. The initial icon displays a maximum of two\n characters, so a display name with more than one space (for example \"Mary Jane Major\") would\n generate an initial icon using the first character and the first character after the space\n (\"MJ\", not \"MM\").

" - } - }, - "emailAddress": { - "target": "com.amazonaws.codestar#Email", - "traits": { - "smithy.api#documentation": "

The email address for the user. Optional.

" - } - }, - "sshPublicKey": { - "target": "com.amazonaws.codestar#SshPublicKey", - "traits": { - "smithy.api#documentation": "

The SSH public key associated with the user. This SSH public key is associated with the\n user profile, and can be used in conjunction with the associated private key for access to\n project resources, such as Amazon EC2 instances, if a project owner grants remote access to\n those resources.

" - } - }, - "createdTimestamp": { - "target": "com.amazonaws.codestar#CreatedTimestamp", - "traits": { - "smithy.api#documentation": "

The date and time when the user profile was created in AWS CodeStar, in timestamp\n format.

", - "smithy.api#required": {} - } - }, - "lastModifiedTimestamp": { - "target": "com.amazonaws.codestar#LastModifiedTimestamp", - "traits": { - "smithy.api#documentation": "

The date and time when the user profile was last modified, in timestamp\n format.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#DisassociateTeamMember": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#DisassociateTeamMemberRequest" - }, - "output": { - "target": "com.amazonaws.codestar#DisassociateTeamMemberResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.codestar#InvalidServiceRoleException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Removes a user from a project. Removing a user from a project also removes the IAM\n policies from that user that allowed access to the project and its resources. Disassociating a\n team member does not remove that user's profile from AWS CodeStar. It does not remove the user from\n IAM.

" - } - }, - "com.amazonaws.codestar#DisassociateTeamMemberRequest": { - "type": "structure", - "members": { - "projectId": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the AWS CodeStar project from which you want to remove a team member.

", - "smithy.api#required": {} - } - }, - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the IAM user or group whom you want to remove from\n the project.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#DisassociateTeamMemberResult": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#Email": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 3, - "max": 128 - }, - "smithy.api#pattern": "^[\\w-.+]+@[\\w-.+]+$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.codestar#GitHubCodeDestination": { - "type": "structure", - "members": { - "name": { - "target": "com.amazonaws.codestar#RepositoryName", - "traits": { - "smithy.api#documentation": "

Name of the GitHub repository to be created in AWS CodeStar.

", - "smithy.api#required": {} - } - }, - "description": { - "target": "com.amazonaws.codestar#RepositoryDescription", - "traits": { - "smithy.api#documentation": "

Description for the GitHub repository to be created in AWS CodeStar. This description displays in\n GitHub after the repository is created.

" - } - }, - "type": { - "target": "com.amazonaws.codestar#RepositoryType", - "traits": { - "smithy.api#documentation": "

The type of GitHub repository to be created in AWS CodeStar. Valid values are User or Organization.

", - "smithy.api#required": {} - } - }, - "owner": { - "target": "com.amazonaws.codestar#RepositoryOwner", - "traits": { - "smithy.api#documentation": "

The GitHub username for the owner of the GitHub repository to be created in AWS CodeStar. If this repository should\n be owned by a GitHub organization, provide its name.

", - "smithy.api#required": {} - } - }, - "privateRepository": { - "target": "com.amazonaws.codestar#RepositoryIsPrivate", - "traits": { - "smithy.api#default": false, - "smithy.api#documentation": "

Whether the GitHub repository is to be a private repository.

", - "smithy.api#required": {} - } - }, - "issuesEnabled": { - "target": "com.amazonaws.codestar#RepositoryEnableIssues", - "traits": { - "smithy.api#default": false, - "smithy.api#documentation": "

Whether to enable issues for the GitHub repository.

", - "smithy.api#required": {} - } - }, - "token": { - "target": "com.amazonaws.codestar#GitHubPersonalToken", - "traits": { - "smithy.api#documentation": "

The GitHub user's personal access token for the GitHub repository.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Information about the GitHub repository to be created in AWS CodeStar. This is where the source code files provided with the\n project request will be uploaded after project creation.

" - } - }, - "com.amazonaws.codestar#GitHubPersonalToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1 - }, - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.codestar#InvalidNextTokenException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

The next token is not valid.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.codestar#InvalidServiceRoleException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

The service role is not valid.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.codestar#LastModifiedTimestamp": { - "type": "timestamp" - }, - "com.amazonaws.codestar#LimitExceededException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

A resource limit has been exceeded.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.codestar#ListProjects": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#ListProjectsRequest" - }, - "output": { - "target": "com.amazonaws.codestar#ListProjectsResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#InvalidNextTokenException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists all projects in AWS CodeStar associated with your AWS account.

" - } - }, - "com.amazonaws.codestar#ListProjectsRequest": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

The continuation token to be used to return the next set of results, if the results\n cannot be returned in one response.

" - } - }, - "maxResults": { - "target": "com.amazonaws.codestar#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum amount of data that can be contained in a single set of results.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#ListProjectsResult": { - "type": "structure", - "members": { - "projects": { - "target": "com.amazonaws.codestar#ProjectsList", - "traits": { - "smithy.api#documentation": "

A list of projects.

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

The continuation token to use when requesting the next set of results, if there are\n more results to be returned.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#ListResources": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#ListResourcesRequest" - }, - "output": { - "target": "com.amazonaws.codestar#ListResourcesResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#InvalidNextTokenException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists resources associated with a project in AWS CodeStar.

" - } - }, - "com.amazonaws.codestar#ListResourcesRequest": { - "type": "structure", - "members": { - "projectId": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project.

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

The continuation token for the next set of results, if the results cannot be returned\n in one response.

" - } - }, - "maxResults": { - "target": "com.amazonaws.codestar#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum amount of data that can be contained in a single set of results.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#ListResourcesResult": { - "type": "structure", - "members": { - "resources": { - "target": "com.amazonaws.codestar#ResourcesResult", - "traits": { - "smithy.api#documentation": "

An array of resources associated with the project.

" - } - }, - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

The continuation token to use when requesting the next set of results, if there are\n more results to be returned.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#ListTagsForProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#ListTagsForProjectRequest" - }, - "output": { - "target": "com.amazonaws.codestar#ListTagsForProjectResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#InvalidNextTokenException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Gets the tags for a project.

" - } - }, - "com.amazonaws.codestar#ListTagsForProjectRequest": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project to get tags for.

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

Reserved for future use.

" - } - }, - "maxResults": { - "target": "com.amazonaws.codestar#MaxResults", - "traits": { - "smithy.api#documentation": "

Reserved for future use.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#ListTagsForProjectResult": { - "type": "structure", - "members": { - "tags": { - "target": "com.amazonaws.codestar#Tags", - "traits": { - "smithy.api#documentation": "

The tags for the project.

" - } - }, - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

Reserved for future use.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#ListTeamMembers": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#ListTeamMembersRequest" - }, - "output": { - "target": "com.amazonaws.codestar#ListTeamMembersResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#InvalidNextTokenException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists all team members associated with a project.

" - } - }, - "com.amazonaws.codestar#ListTeamMembersRequest": { - "type": "structure", - "members": { - "projectId": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project for which you want to list team members.

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

The continuation token for the next set of results, if the results cannot be returned\n in one response.

" - } - }, - "maxResults": { - "target": "com.amazonaws.codestar#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of team members you want returned in a response.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#ListTeamMembersResult": { - "type": "structure", - "members": { - "teamMembers": { - "target": "com.amazonaws.codestar#TeamMemberResult", - "traits": { - "smithy.api#documentation": "

A list of team member objects for the project.

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

The continuation token to use when requesting the next set of results, if there are\n more results to be returned.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#ListUserProfiles": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#ListUserProfilesRequest" - }, - "output": { - "target": "com.amazonaws.codestar#ListUserProfilesResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#InvalidNextTokenException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Lists all the user profiles configured for your AWS account in AWS CodeStar.

" - } - }, - "com.amazonaws.codestar#ListUserProfilesRequest": { - "type": "structure", - "members": { - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

The continuation token for the next set of results, if the results cannot be returned\n in one response.

" - } - }, - "maxResults": { - "target": "com.amazonaws.codestar#MaxResults", - "traits": { - "smithy.api#documentation": "

The maximum number of results to return in a response.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#ListUserProfilesResult": { - "type": "structure", - "members": { - "userProfiles": { - "target": "com.amazonaws.codestar#UserProfilesList", - "traits": { - "smithy.api#documentation": "

All the user profiles configured in AWS CodeStar for an AWS account.

", - "smithy.api#required": {} - } - }, - "nextToken": { - "target": "com.amazonaws.codestar#PaginationToken", - "traits": { - "smithy.api#documentation": "

The continuation token to use when requesting the next set of results, if there are\n more results to be returned.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#MaxResults": { - "type": "integer", - "traits": { - "smithy.api#range": { - "min": 1, - "max": 100 - } - } - }, - "com.amazonaws.codestar#Message": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1 - } - } - }, - "com.amazonaws.codestar#PaginationToken": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 512 - }, - "smithy.api#pattern": "^[\\w/+=]+$" - } - }, - "com.amazonaws.codestar#ProjectAlreadyExistsException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

An AWS CodeStar project with the same ID already exists in this region for the AWS account.\n AWS CodeStar project IDs must be unique within a region for the AWS account.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.codestar#ProjectArn": { - "type": "string", - "traits": { - "smithy.api#pattern": "^arn:aws[^:\\s]*:codestar:[^:\\s]+:[0-9]{12}:project\\/[a-z]([a-z0-9|-])+$" - } - }, - "com.amazonaws.codestar#ProjectConfigurationException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

Project configuration information is required but not specified.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.codestar#ProjectCreationFailedException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

The project creation request was valid, but a nonspecific exception or error occurred\n during project creation. The project could not be created in AWS CodeStar.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.codestar#ProjectDescription": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 1024 - }, - "smithy.api#pattern": "^$|^\\S(.*\\S)?$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.codestar#ProjectId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 2, - "max": 15 - }, - "smithy.api#pattern": "^[a-z][a-z0-9-]+$" - } - }, - "com.amazonaws.codestar#ProjectName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - }, - "smithy.api#pattern": "^\\S(.*\\S)?$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.codestar#ProjectNotFoundException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

The specified AWS CodeStar project was not found.

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.codestar#ProjectStatus": { - "type": "structure", - "members": { - "state": { - "target": "com.amazonaws.codestar#State", - "traits": { - "smithy.api#documentation": "

The phase of completion for a project creation or deletion.

", - "smithy.api#required": {} - } - }, - "reason": { - "target": "com.amazonaws.codestar#Reason", - "traits": { - "smithy.api#documentation": "

In the case of a project creation or deletion failure, a reason for the\n failure.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

An indication of whether a project creation or deletion is failed or\n successful.

" - } - }, - "com.amazonaws.codestar#ProjectSummary": { - "type": "structure", - "members": { - "projectId": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project.

" - } - }, - "projectArn": { - "target": "com.amazonaws.codestar#ProjectArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the project.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Information about the metadata for a project.

" - } - }, - "com.amazonaws.codestar#ProjectTemplateId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1 - }, - "smithy.api#pattern": "^arn:aws[^:\\s]{0,5}:codestar:[^:\\s]+::project-template(\\/(github|codecommit))?\\/[a-z0-9-]+$" - } - }, - "com.amazonaws.codestar#ProjectsList": { - "type": "list", - "member": { - "target": "com.amazonaws.codestar#ProjectSummary" - } - }, - "com.amazonaws.codestar#Reason": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 1024 - }, - "smithy.api#pattern": "^$|^\\S(.*\\S)?$" - } - }, - "com.amazonaws.codestar#RemoteAccessAllowed": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } - }, - "com.amazonaws.codestar#RepositoryDescription": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 1000 - }, - "smithy.api#pattern": "^\\S(.*\\S)?$" - } - }, - "com.amazonaws.codestar#RepositoryEnableIssues": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } - }, - "com.amazonaws.codestar#RepositoryIsPrivate": { - "type": "boolean", - "traits": { - "smithy.api#default": false - } - }, - "com.amazonaws.codestar#RepositoryName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - }, - "smithy.api#pattern": "^\\S[\\w.-]*$" - } - }, - "com.amazonaws.codestar#RepositoryOwner": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - }, - "smithy.api#pattern": "^\\S(.*\\S)?$" - } - }, - "com.amazonaws.codestar#RepositoryType": { - "type": "string", - "traits": { - "smithy.api#pattern": "^(user|organization|User|Organization)$" - } - }, - "com.amazonaws.codestar#Resource": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.codestar#ResourceId", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the resource.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

Information about a resource for a project.

" - } - }, - "com.amazonaws.codestar#ResourceId": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 11 - }, - "smithy.api#pattern": "^arn\\:aws\\:\\S.*\\:" - } - }, - "com.amazonaws.codestar#ResourcesResult": { - "type": "list", - "member": { - "target": "com.amazonaws.codestar#Resource" - } - }, - "com.amazonaws.codestar#Role": { - "type": "string", - "traits": { - "smithy.api#pattern": "^(Owner|Viewer|Contributor)$" - } - }, - "com.amazonaws.codestar#RoleArn": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 1224 - } - } - }, - "com.amazonaws.codestar#S3Location": { - "type": "structure", - "members": { - "bucketName": { - "target": "com.amazonaws.codestar#BucketName", - "traits": { - "smithy.api#documentation": "

The Amazon S3 bucket name where the source code files provided with the project\n request are stored.

" - } - }, - "bucketKey": { - "target": "com.amazonaws.codestar#BucketKey", - "traits": { - "smithy.api#documentation": "

The Amazon S3 object key where the source code files provided with the project\n request are stored.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

The Amazon S3 location where the source code files provided with the project\n request are stored.

" - } - }, - "com.amazonaws.codestar#SourceCode": { - "type": "list", - "member": { - "target": "com.amazonaws.codestar#Code" - } - }, - "com.amazonaws.codestar#SshPublicKey": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 16384 - }, - "smithy.api#pattern": "^[\\t\\r\\n\\u0020-\\u00FF]*$" - } - }, - "com.amazonaws.codestar#StackId": { - "type": "string", - "traits": { - "smithy.api#pattern": "^arn:aws[^:\\s]*:cloudformation:[^:\\s]+:[0-9]{12}:stack\\/[^:\\s]+\\/[^:\\s]+$" - } - }, - "com.amazonaws.codestar#State": { - "type": "string", - "traits": { - "smithy.api#pattern": "^(CreateInProgress|CreateComplete|CreateFailed|DeleteComplete|DeleteFailed|DeleteInProgress|UpdateComplete|UpdateInProgress|UpdateFailed|Unknown)$" - } - }, - "com.amazonaws.codestar#TagKey": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 128 - }, - "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" - } - }, - "com.amazonaws.codestar#TagKeys": { - "type": "list", - "member": { - "target": "com.amazonaws.codestar#TagKey" - } - }, - "com.amazonaws.codestar#TagProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#TagProjectRequest" - }, - "output": { - "target": "com.amazonaws.codestar#TagProjectResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.codestar#LimitExceededException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Adds tags to a project.

" - } - }, - "com.amazonaws.codestar#TagProjectRequest": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project you want to add a tag to.

", - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.codestar#Tags", - "traits": { - "smithy.api#documentation": "

The tags you want to add to the project.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#TagProjectResult": { - "type": "structure", - "members": { - "tags": { - "target": "com.amazonaws.codestar#Tags", - "traits": { - "smithy.api#documentation": "

The tags for the project.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#TagValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 0, - "max": 256 - }, - "smithy.api#pattern": "^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$" - } - }, - "com.amazonaws.codestar#Tags": { - "type": "map", - "key": { - "target": "com.amazonaws.codestar#TagKey" - }, - "value": { - "target": "com.amazonaws.codestar#TagValue" - } - }, - "com.amazonaws.codestar#TeamMember": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user in IAM.

", - "smithy.api#required": {} - } - }, - "projectRole": { - "target": "com.amazonaws.codestar#Role", - "traits": { - "smithy.api#documentation": "

The role assigned to the user in the project. Project roles have different levels of\n access. For more information, see Working with\n Teams in the AWS CodeStar User Guide.

", - "smithy.api#required": {} - } - }, - "remoteAccessAllowed": { - "target": "com.amazonaws.codestar#RemoteAccessAllowed", - "traits": { - "smithy.api#default": null, - "smithy.api#documentation": "

Whether the user is allowed to remotely access project resources using an SSH\n public/private key pair.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Information about a team member in a project.

" - } - }, - "com.amazonaws.codestar#TeamMemberAlreadyAssociatedException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

The team member is already associated with a role in this project.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.codestar#TeamMemberNotFoundException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

The specified team member was not found.

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.codestar#TeamMemberResult": { - "type": "list", - "member": { - "target": "com.amazonaws.codestar#TeamMember" - } - }, - "com.amazonaws.codestar#TemplateParameterKey": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 30 - }, - "smithy.api#pattern": "^\\S(.*\\S)?$" - } - }, - "com.amazonaws.codestar#TemplateParameterMap": { - "type": "map", - "key": { - "target": "com.amazonaws.codestar#TemplateParameterKey" - }, - "value": { - "target": "com.amazonaws.codestar#TemplateParameterValue" - }, - "traits": { - "smithy.api#length": { - "min": 0, - "max": 25 - } - } - }, - "com.amazonaws.codestar#TemplateParameterValue": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 100 - }, - "smithy.api#pattern": "^\\S(.*\\S)?$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.codestar#Toolchain": { - "type": "structure", - "members": { - "source": { - "target": "com.amazonaws.codestar#ToolchainSource", - "traits": { - "smithy.api#documentation": "

The Amazon S3 location where the toolchain template file provided with the\n project request is stored. AWS CodeStar retrieves the file during project creation.

", - "smithy.api#required": {} - } - }, - "roleArn": { - "target": "com.amazonaws.codestar#RoleArn", - "traits": { - "smithy.api#documentation": "

The service role ARN for AWS CodeStar to use for the toolchain template during stack\n provisioning.

" - } - }, - "stackParameters": { - "target": "com.amazonaws.codestar#TemplateParameterMap", - "traits": { - "smithy.api#documentation": "

The list of parameter overrides to be passed into the toolchain template during stack\n provisioning, if any.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

The toolchain template file provided with the project request. AWS CodeStar uses\n the template to provision the toolchain stack in AWS CloudFormation.

" - } - }, - "com.amazonaws.codestar#ToolchainSource": { - "type": "structure", - "members": { - "s3": { - "target": "com.amazonaws.codestar#S3Location", - "traits": { - "smithy.api#documentation": "

The Amazon S3 bucket where the toolchain template file provided with the project\n request is stored.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#documentation": "

The Amazon S3 location where the toolchain template file provided with the\n project request is stored. AWS CodeStar retrieves the file during project creation.

" - } - }, - "com.amazonaws.codestar#UntagProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#UntagProjectRequest" - }, - "output": { - "target": "com.amazonaws.codestar#UntagProjectResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.codestar#LimitExceededException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Removes tags from a project.

" - } - }, - "com.amazonaws.codestar#UntagProjectRequest": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project to remove tags from.

", - "smithy.api#required": {} - } - }, - "tags": { - "target": "com.amazonaws.codestar#TagKeys", - "traits": { - "smithy.api#documentation": "

The tags to remove from the project.

", - "smithy.api#required": {} - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#UntagProjectResult": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#UpdateProject": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#UpdateProjectRequest" - }, - "output": { - "target": "com.amazonaws.codestar#UpdateProjectResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Updates a project in AWS CodeStar.

" - } - }, - "com.amazonaws.codestar#UpdateProjectRequest": { - "type": "structure", - "members": { - "id": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project you want to update.

", - "smithy.api#required": {} - } - }, - "name": { - "target": "com.amazonaws.codestar#ProjectName", - "traits": { - "smithy.api#documentation": "

The name of the project you want to update.

" - } - }, - "description": { - "target": "com.amazonaws.codestar#ProjectDescription", - "traits": { - "smithy.api#documentation": "

The description of the project, if any.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#UpdateProjectResult": { - "type": "structure", - "members": {}, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#UpdateTeamMember": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#UpdateTeamMemberRequest" - }, - "output": { - "target": "com.amazonaws.codestar#UpdateTeamMemberResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#ConcurrentModificationException" - }, - { - "target": "com.amazonaws.codestar#InvalidServiceRoleException" - }, - { - "target": "com.amazonaws.codestar#LimitExceededException" - }, - { - "target": "com.amazonaws.codestar#ProjectConfigurationException" - }, - { - "target": "com.amazonaws.codestar#ProjectNotFoundException" - }, - { - "target": "com.amazonaws.codestar#TeamMemberNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Updates a team member's attributes in an AWS CodeStar project. For example, you can change a\n team member's role in the project, or change whether they have remote access to project\n resources.

" - } - }, - "com.amazonaws.codestar#UpdateTeamMemberRequest": { - "type": "structure", - "members": { - "projectId": { - "target": "com.amazonaws.codestar#ProjectId", - "traits": { - "smithy.api#documentation": "

The ID of the project.

", - "smithy.api#required": {} - } - }, - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user for whom you want to change team membership\n attributes.

", - "smithy.api#required": {} - } - }, - "projectRole": { - "target": "com.amazonaws.codestar#Role", - "traits": { - "smithy.api#documentation": "

The role assigned to the user in the project. Project roles have different levels of\n access. For more information, see Working with\n Teams in the AWS CodeStar User Guide.

" - } - }, - "remoteAccessAllowed": { - "target": "com.amazonaws.codestar#RemoteAccessAllowed", - "traits": { - "smithy.api#default": null, - "smithy.api#documentation": "

Whether a team member is allowed to remotely access project resources using the SSH\n public key associated with the user's profile. Even if this is set to True, the user must\n associate a public key with their profile before the user can access resources.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#UpdateTeamMemberResult": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user whose team membership attributes were\n updated.

" - } - }, - "projectRole": { - "target": "com.amazonaws.codestar#Role", - "traits": { - "smithy.api#documentation": "

The project role granted to the user.

" - } - }, - "remoteAccessAllowed": { - "target": "com.amazonaws.codestar#RemoteAccessAllowed", - "traits": { - "smithy.api#default": null, - "smithy.api#documentation": "

Whether a team member is allowed to remotely access project resources using the SSH\n public key associated with the user's profile.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#UpdateUserProfile": { - "type": "operation", - "input": { - "target": "com.amazonaws.codestar#UpdateUserProfileRequest" - }, - "output": { - "target": "com.amazonaws.codestar#UpdateUserProfileResult" - }, - "errors": [ - { - "target": "com.amazonaws.codestar#UserProfileNotFoundException" - }, - { - "target": "com.amazonaws.codestar#ValidationException" - } - ], - "traits": { - "smithy.api#documentation": "

Updates a user's profile in AWS CodeStar. The user profile is not project-specific.\n Information in the user profile is displayed wherever the user's information appears to other\n users in AWS CodeStar.

" - } - }, - "com.amazonaws.codestar#UpdateUserProfileRequest": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The name that will be displayed as the friendly name for the user in AWS\n CodeStar.

", - "smithy.api#required": {} - } - }, - "displayName": { - "target": "com.amazonaws.codestar#UserProfileDisplayName", - "traits": { - "smithy.api#documentation": "

The name that is displayed as the friendly name for the user in AWS CodeStar.

" - } - }, - "emailAddress": { - "target": "com.amazonaws.codestar#Email", - "traits": { - "smithy.api#documentation": "

The email address that is displayed as part of the user's profile in AWS\n CodeStar.

" - } - }, - "sshPublicKey": { - "target": "com.amazonaws.codestar#SshPublicKey", - "traits": { - "smithy.api#documentation": "

The SSH public key associated with the user in AWS CodeStar. If a project owner allows the\n user remote access to project resources, this public key will be used along with the user's\n private key for SSH access.

" - } - } - }, - "traits": { - "smithy.api#input": {} - } - }, - "com.amazonaws.codestar#UpdateUserProfileResult": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user in IAM.

", - "smithy.api#required": {} - } - }, - "displayName": { - "target": "com.amazonaws.codestar#UserProfileDisplayName", - "traits": { - "smithy.api#documentation": "

The name that is displayed as the friendly name for the user in AWS CodeStar.

" - } - }, - "emailAddress": { - "target": "com.amazonaws.codestar#Email", - "traits": { - "smithy.api#documentation": "

The email address that is displayed as part of the user's profile in AWS\n CodeStar.

" - } - }, - "sshPublicKey": { - "target": "com.amazonaws.codestar#SshPublicKey", - "traits": { - "smithy.api#documentation": "

The SSH public key associated with the user in AWS CodeStar. This is the public portion of the\n public/private keypair the user can use to access project resources if a project owner allows\n the user remote access to those resources.

" - } - }, - "createdTimestamp": { - "target": "com.amazonaws.codestar#CreatedTimestamp", - "traits": { - "smithy.api#documentation": "

The date the user profile was created, in timestamp format.

" - } - }, - "lastModifiedTimestamp": { - "target": "com.amazonaws.codestar#LastModifiedTimestamp", - "traits": { - "smithy.api#documentation": "

The date the user profile was last modified, in timestamp format.

" - } - } - }, - "traits": { - "smithy.api#output": {} - } - }, - "com.amazonaws.codestar#UserArn": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 32, - "max": 95 - }, - "smithy.api#pattern": "^arn:aws:iam::\\d{12}:user(?:(\\u002F)|(\\u002F[\\u0021-\\u007E]+\\u002F))[\\w+=,.@-]+$" - } - }, - "com.amazonaws.codestar#UserProfileAlreadyExistsException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

A user profile with that name already exists in this region for the AWS account. AWS\n CodeStar user profile names must be unique within a region for the AWS account.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - }, - "com.amazonaws.codestar#UserProfileDisplayName": { - "type": "string", - "traits": { - "smithy.api#length": { - "min": 1, - "max": 64 - }, - "smithy.api#pattern": "^\\S(.*\\S)?$", - "smithy.api#sensitive": {} - } - }, - "com.amazonaws.codestar#UserProfileNotFoundException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

The user profile was not found.

", - "smithy.api#error": "client", - "smithy.api#httpError": 404 - } - }, - "com.amazonaws.codestar#UserProfileSummary": { - "type": "structure", - "members": { - "userArn": { - "target": "com.amazonaws.codestar#UserArn", - "traits": { - "smithy.api#documentation": "

The Amazon Resource Name (ARN) of the user in IAM.

" - } - }, - "displayName": { - "target": "com.amazonaws.codestar#UserProfileDisplayName", - "traits": { - "smithy.api#documentation": "

The display name of a user in AWS CodeStar. For example, this could be set to both first and\n last name (\"Mary Major\") or a single name (\"Mary\"). The display name is also used to generate\n the initial icon associated with the user in AWS CodeStar projects. If spaces are included in the\n display name, the first character that appears after the space will be used as the second\n character in the user initial icon. The initial icon displays a maximum of two characters, so\n a display name with more than one space (for example \"Mary Jane Major\") would generate an\n initial icon using the first character and the first character after the space (\"MJ\", not\n \"MM\").

" - } - }, - "emailAddress": { - "target": "com.amazonaws.codestar#Email", - "traits": { - "smithy.api#documentation": "

The email address associated with the user.

" - } - }, - "sshPublicKey": { - "target": "com.amazonaws.codestar#SshPublicKey", - "traits": { - "smithy.api#documentation": "

The SSH public key associated with the user in AWS CodeStar. If a project owner allows the\n user remote access to project resources, this public key will be used along with the user's\n private key for SSH access.

" - } - } - }, - "traits": { - "smithy.api#documentation": "

Information about a user's profile in AWS CodeStar.

" - } - }, - "com.amazonaws.codestar#UserProfilesList": { - "type": "list", - "member": { - "target": "com.amazonaws.codestar#UserProfileSummary" - } - }, - "com.amazonaws.codestar#ValidationException": { - "type": "structure", - "members": { - "message": { - "target": "com.amazonaws.codestar#Message" - } - }, - "traits": { - "smithy.api#documentation": "

The specified input is either not valid, or it could not be validated.

", - "smithy.api#error": "client", - "smithy.api#httpError": 400 - } - } - } -} diff --git a/service/codestar/CHANGELOG.md b/service/codestar/CHANGELOG.md deleted file mode 100644 index 4fff14feb48..00000000000 --- a/service/codestar/CHANGELOG.md +++ /dev/null @@ -1,434 +0,0 @@ -# v1.23.4 (2024-08-15) - -* **Dependency Update**: Bump minimum Go version to 1.21. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.3 (2024-07-10.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.2 (2024-07-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.1 (2024-06-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.23.0 (2024-06-26) - -* **Feature**: Support list-of-string endpoint parameter. - -# v1.22.1 (2024-06-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.22.0 (2024-06-18) - -* **Feature**: Track usage of various AWS SDK features in user-agent string. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.11 (2024-06-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.10 (2024-06-07) - -* **Bug Fix**: Add clock skew correction on all service clients -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.9 (2024-06-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.8 (2024-05-23) - -* No change notes available for this release. - -# v1.21.7 (2024-05-16) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.6 (2024-05-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.5 (2024-05-08) - -* **Bug Fix**: GoDoc improvement - -# v1.21.4 (2024-03-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.3 (2024-03-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.2 (2024-03-07) - -* **Bug Fix**: Remove dependency on go-cmp. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.1 (2024-02-23) - -* **Bug Fix**: Move all common, SDK-side middleware stack ops into the service client module to prevent cross-module compatibility issues in the future. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.21.0 (2024-02-22) - -* **Feature**: Add middleware stack snapshot tests. - -# v1.20.3 (2024-02-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.20.2 (2024-02-20) - -* **Bug Fix**: When sourcing values for a service's `EndpointParameters`, the lack of a configured region (i.e. `options.Region == ""`) will now translate to a `nil` value for `EndpointParameters.Region` instead of a pointer to the empty string `""`. This will result in a much more explicit error when calling an operation instead of an obscure hostname lookup failure. - -# v1.20.1 (2024-02-15) - -* **Bug Fix**: Correct failure to determine the error type in awsJson services that could occur when errors were modeled with a non-string `code` field. - -# v1.20.0 (2024-02-13) - -* **Feature**: Bump minimum Go version to 1.20 per our language support policy. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.6 (2024-01-04) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.5 (2023-12-08) - -* **Bug Fix**: Reinstate presence of default Retryer in functional options, but still respect max attempts set therein. - -# v1.19.4 (2023-12-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.3 (2023-12-06) - -* **Bug Fix**: Restore pre-refactor auth behavior where all operations could technically be performed anonymously. - -# v1.19.2 (2023-12-01) - -* **Bug Fix**: Correct wrapping of errors in authentication workflow. -* **Bug Fix**: Correctly recognize cache-wrapped instances of AnonymousCredentials at client construction. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.1 (2023-11-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.19.0 (2023-11-29) - -* **Feature**: Expose Options() accessor on service clients. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.5 (2023-11-28.2) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.4 (2023-11-28) - -* **Bug Fix**: Respect setting RetryMaxAttempts in functional options at client construction. - -# v1.18.3 (2023-11-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.2 (2023-11-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.1 (2023-11-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.18.0 (2023-11-01) - -* **Feature**: Adds support for configured endpoints via environment variables and the AWS shared configuration file. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.17.0 (2023-10-31) - -* **Feature**: **BREAKING CHANGE**: Bump minimum go version to 1.19 per the revised [go version support policy](https://aws.amazon.com/blogs/developer/aws-sdk-for-go-aligns-with-go-release-policy-on-supported-runtimes/). -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.16.0 (2023-10-24) - -* **Feature**: **BREAKFIX**: Correct nullability and default value representation of various input fields across a large number of services. Calling code that references one or more of the affected fields will need to update usage accordingly. See [2162](https://github.com/aws/aws-sdk-go-v2/issues/2162). - -# v1.15.2 (2023-10-12) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.1 (2023-10-06) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.15.0 (2023-09-18) - -* **Announcement**: [BREAKFIX] Change in MaxResults datatype from value to pointer type in cognito-sync service. -* **Feature**: Adds several endpoint ruleset changes across all models: smaller rulesets, removed non-unique regional endpoints, fixes FIPS and DualStack endpoints, and make region not required in SDK::Endpoint. Additional breakfix to cognito-sync field. - -# v1.14.5 (2023-08-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.4 (2023-08-18) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.3 (2023-08-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.2 (2023-08-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.14.1 (2023-08-01) - -* No change notes available for this release. - -# v1.14.0 (2023-07-31) - -* **Feature**: Adds support for smithy-modeled endpoint resolution. A new rules-based endpoint resolution will be added to the SDK which will supercede and deprecate existing endpoint resolution. Specifically, EndpointResolver will be deprecated while BaseEndpoint and EndpointResolverV2 will take its place. For more information, please see the Endpoints section in our Developer Guide. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.14 (2023-07-28) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.13 (2023-07-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.12 (2023-06-15) - -* No change notes available for this release. - -# v1.13.11 (2023-06-13) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.10 (2023-05-04) - -* No change notes available for this release. - -# v1.13.9 (2023-04-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.8 (2023-04-10) - -* No change notes available for this release. - -# v1.13.7 (2023-04-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.6 (2023-03-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.5 (2023-03-10) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.4 (2023-02-22) - -* **Bug Fix**: Prevent nil pointer dereference when retrieving error codes. - -# v1.13.3 (2023-02-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.2 (2023-02-15) - -* **Announcement**: When receiving an error response in restJson-based services, an incorrect error type may have been returned based on the content of the response. This has been fixed via PR #2012 tracked in issue #1910. -* **Bug Fix**: Correct error type parsing for restJson services. - -# v1.13.1 (2023-02-03) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.13.0 (2023-01-05) - -* **Feature**: Add `ErrorCodeOverride` field to all error structs (aws/smithy-go#401). - -# v1.12.5 (2022-12-15) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.4 (2022-12-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.3 (2022-10-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.2 (2022-10-21) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.1 (2022-09-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.12.0 (2022-09-14) - -* **Feature**: Fixed a bug in the API client generation which caused some operation parameters to be incorrectly generated as value types instead of pointer types. The service API always required these affected parameters to be nilable. This fixes the SDK client to match the expectations of the the service API. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.15 (2022-09-02) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.14 (2022-08-31) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.13 (2022-08-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.12 (2022-08-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.11 (2022-08-09) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.10 (2022-08-08) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.9 (2022-08-01) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.8 (2022-07-05) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.7 (2022-06-29) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.6 (2022-06-07) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.5 (2022-05-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.4 (2022-04-25) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.3 (2022-03-30) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.2 (2022-03-24) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.1 (2022-03-23) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.11.0 (2022-03-08) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.10.0 (2022-02-24) - -* **Feature**: API client updated -* **Feature**: Adds RetryMaxAttempts and RetryMod to API client Options. This allows the API clients' default Retryer to be configured from the shared configuration files or environment variables. Adding a new Retry mode of `Adaptive`. `Adaptive` retry mode is an experimental mode, adding client rate limiting when throttles reponses are received from an API. See [retry.AdaptiveMode](https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/aws/retry#AdaptiveMode) for more details, and configuration options. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.9.0 (2022-01-14) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.8.0 (2022-01-07) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.2 (2021-12-02) - -* **Bug Fix**: Fixes a bug that prevented aws.EndpointResolverWithOptions from being used by the service client. ([#1514](https://github.com/aws/aws-sdk-go-v2/pull/1514)) -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.1 (2021-11-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.7.0 (2021-11-12) - -* **Feature**: Service clients now support custom endpoints that have an initial URI path defined. - -# v1.6.0 (2021-11-06) - -* **Feature**: The SDK now supports configuration of FIPS and DualStack endpoints using environment variables, shared configuration, or programmatically. -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.5.0 (2021-10-21) - -* **Feature**: Updated to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.2 (2021-10-11) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.1 (2021-09-17) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.4.0 (2021-08-27) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.3 (2021-08-19) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.2 (2021-08-04) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version. -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.1 (2021-07-15) - -* **Dependency Update**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.3.0 (2021-06-25) - -* **Feature**: Updated `github.com/aws/smithy-go` to latest version -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.1 (2021-05-20) - -* **Dependency Update**: Updated to the latest SDK module versions - -# v1.2.0 (2021-05-14) - -* **Feature**: Constant has been added to modules to enable runtime version inspection for reporting. -* **Dependency Update**: Updated to the latest SDK module versions - diff --git a/service/codestar/LICENSE.txt b/service/codestar/LICENSE.txt deleted file mode 100644 index d6456956733..00000000000 --- a/service/codestar/LICENSE.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/service/codestar/api_client.go b/service/codestar/api_client.go deleted file mode 100644 index ab88edb69f0..00000000000 --- a/service/codestar/api_client.go +++ /dev/null @@ -1,627 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/aws-sdk-go-v2/aws/defaults" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/aws/retry" - "github.com/aws/aws-sdk-go-v2/aws/signer/v4" - awshttp "github.com/aws/aws-sdk-go-v2/aws/transport/http" - internalauth "github.com/aws/aws-sdk-go-v2/internal/auth" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - internalmiddleware "github.com/aws/aws-sdk-go-v2/internal/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - smithydocument "github.com/aws/smithy-go/document" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net" - "net/http" - "sync/atomic" - "time" -) - -const ServiceID = "CodeStar" -const ServiceAPIVersion = "2017-04-19" - -// Client provides the API client to make operations call for AWS CodeStar. -type Client struct { - options Options - - // Difference between the time reported by the server and the client - timeOffset *atomic.Int64 -} - -// New returns an initialized Client based on the functional options. Provide -// additional functional options to further configure the behavior of the client, -// such as changing the client's endpoint or adding custom middleware behavior. -func New(options Options, optFns ...func(*Options)) *Client { - options = options.Copy() - - resolveDefaultLogger(&options) - - setResolvedDefaultsMode(&options) - - resolveRetryer(&options) - - resolveHTTPClient(&options) - - resolveHTTPSignerV4(&options) - - resolveEndpointResolverV2(&options) - - resolveAuthSchemeResolver(&options) - - for _, fn := range optFns { - fn(&options) - } - - finalizeRetryMaxAttempts(&options) - - ignoreAnonymousAuth(&options) - - wrapWithAnonymousAuth(&options) - - resolveAuthSchemes(&options) - - client := &Client{ - options: options, - } - - initializeTimeOffsetResolver(client) - - return client -} - -// Options returns a copy of the client configuration. -// -// Callers SHOULD NOT perform mutations on any inner structures within client -// config. Config overrides should instead be made on a per-operation basis through -// functional options. -func (c *Client) Options() Options { - return c.options.Copy() -} - -func (c *Client) invokeOperation(ctx context.Context, opID string, params interface{}, optFns []func(*Options), stackFns ...func(*middleware.Stack, Options) error) (result interface{}, metadata middleware.Metadata, err error) { - ctx = middleware.ClearStackValues(ctx) - stack := middleware.NewStack(opID, smithyhttp.NewStackRequest) - options := c.options.Copy() - - for _, fn := range optFns { - fn(&options) - } - - finalizeOperationRetryMaxAttempts(&options, *c) - - finalizeClientEndpointResolverOptions(&options) - - for _, fn := range stackFns { - if err := fn(stack, options); err != nil { - return nil, metadata, err - } - } - - for _, fn := range options.APIOptions { - if err := fn(stack); err != nil { - return nil, metadata, err - } - } - - handler := middleware.DecorateHandler(smithyhttp.NewClientHandler(options.HTTPClient), stack) - result, metadata, err = handler.Handle(ctx, params) - if err != nil { - err = &smithy.OperationError{ - ServiceID: ServiceID, - OperationName: opID, - Err: err, - } - } - return result, metadata, err -} - -type operationInputKey struct{} - -func setOperationInput(ctx context.Context, input interface{}) context.Context { - return middleware.WithStackValue(ctx, operationInputKey{}, input) -} - -func getOperationInput(ctx context.Context) interface{} { - return middleware.GetStackValue(ctx, operationInputKey{}) -} - -type setOperationInputMiddleware struct { -} - -func (*setOperationInputMiddleware) ID() string { - return "setOperationInput" -} - -func (m *setOperationInputMiddleware) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - ctx = setOperationInput(ctx, in.Parameters) - return next.HandleSerialize(ctx, in) -} - -func addProtocolFinalizerMiddlewares(stack *middleware.Stack, options Options, operation string) error { - if err := stack.Finalize.Add(&resolveAuthSchemeMiddleware{operation: operation, options: options}, middleware.Before); err != nil { - return fmt.Errorf("add ResolveAuthScheme: %w", err) - } - if err := stack.Finalize.Insert(&getIdentityMiddleware{options: options}, "ResolveAuthScheme", middleware.After); err != nil { - return fmt.Errorf("add GetIdentity: %v", err) - } - if err := stack.Finalize.Insert(&resolveEndpointV2Middleware{options: options}, "GetIdentity", middleware.After); err != nil { - return fmt.Errorf("add ResolveEndpointV2: %v", err) - } - if err := stack.Finalize.Insert(&signRequestMiddleware{}, "ResolveEndpointV2", middleware.After); err != nil { - return fmt.Errorf("add Signing: %w", err) - } - return nil -} -func resolveAuthSchemeResolver(options *Options) { - if options.AuthSchemeResolver == nil { - options.AuthSchemeResolver = &defaultAuthSchemeResolver{} - } -} - -func resolveAuthSchemes(options *Options) { - if options.AuthSchemes == nil { - options.AuthSchemes = []smithyhttp.AuthScheme{ - internalauth.NewHTTPAuthScheme("aws.auth#sigv4", &internalauthsmithy.V4SignerAdapter{ - Signer: options.HTTPSignerV4, - Logger: options.Logger, - LogSigning: options.ClientLogMode.IsSigning(), - }), - } - } -} - -type noSmithyDocumentSerde = smithydocument.NoSerde - -type legacyEndpointContextSetter struct { - LegacyResolver EndpointResolver -} - -func (*legacyEndpointContextSetter) ID() string { - return "legacyEndpointContextSetter" -} - -func (m *legacyEndpointContextSetter) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - if m.LegacyResolver != nil { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, true) - } - - return next.HandleInitialize(ctx, in) - -} -func addlegacyEndpointContextSetter(stack *middleware.Stack, o Options) error { - return stack.Initialize.Add(&legacyEndpointContextSetter{ - LegacyResolver: o.EndpointResolver, - }, middleware.Before) -} - -func resolveDefaultLogger(o *Options) { - if o.Logger != nil { - return - } - o.Logger = logging.Nop{} -} - -func addSetLoggerMiddleware(stack *middleware.Stack, o Options) error { - return middleware.AddSetLoggerMiddleware(stack, o.Logger) -} - -func setResolvedDefaultsMode(o *Options) { - if len(o.resolvedDefaultsMode) > 0 { - return - } - - var mode aws.DefaultsMode - mode.SetFromString(string(o.DefaultsMode)) - - if mode == aws.DefaultsModeAuto { - mode = defaults.ResolveDefaultsModeAuto(o.Region, o.RuntimeEnvironment) - } - - o.resolvedDefaultsMode = mode -} - -// NewFromConfig returns a new client from the provided config. -func NewFromConfig(cfg aws.Config, optFns ...func(*Options)) *Client { - opts := Options{ - Region: cfg.Region, - DefaultsMode: cfg.DefaultsMode, - RuntimeEnvironment: cfg.RuntimeEnvironment, - HTTPClient: cfg.HTTPClient, - Credentials: cfg.Credentials, - APIOptions: cfg.APIOptions, - Logger: cfg.Logger, - ClientLogMode: cfg.ClientLogMode, - AppID: cfg.AppID, - AccountIDEndpointMode: cfg.AccountIDEndpointMode, - } - resolveAWSRetryerProvider(cfg, &opts) - resolveAWSRetryMaxAttempts(cfg, &opts) - resolveAWSRetryMode(cfg, &opts) - resolveAWSEndpointResolver(cfg, &opts) - resolveUseDualStackEndpoint(cfg, &opts) - resolveUseFIPSEndpoint(cfg, &opts) - resolveBaseEndpoint(cfg, &opts) - return New(opts, optFns...) -} - -func resolveHTTPClient(o *Options) { - var buildable *awshttp.BuildableClient - - if o.HTTPClient != nil { - var ok bool - buildable, ok = o.HTTPClient.(*awshttp.BuildableClient) - if !ok { - return - } - } else { - buildable = awshttp.NewBuildableClient() - } - - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - buildable = buildable.WithDialerOptions(func(dialer *net.Dialer) { - if dialerTimeout, ok := modeConfig.GetConnectTimeout(); ok { - dialer.Timeout = dialerTimeout - } - }) - - buildable = buildable.WithTransportOptions(func(transport *http.Transport) { - if tlsHandshakeTimeout, ok := modeConfig.GetTLSNegotiationTimeout(); ok { - transport.TLSHandshakeTimeout = tlsHandshakeTimeout - } - }) - } - - o.HTTPClient = buildable -} - -func resolveRetryer(o *Options) { - if o.Retryer != nil { - return - } - - if len(o.RetryMode) == 0 { - modeConfig, err := defaults.GetModeConfiguration(o.resolvedDefaultsMode) - if err == nil { - o.RetryMode = modeConfig.RetryMode - } - } - if len(o.RetryMode) == 0 { - o.RetryMode = aws.RetryModeStandard - } - - var standardOptions []func(*retry.StandardOptions) - if v := o.RetryMaxAttempts; v != 0 { - standardOptions = append(standardOptions, func(so *retry.StandardOptions) { - so.MaxAttempts = v - }) - } - - switch o.RetryMode { - case aws.RetryModeAdaptive: - var adaptiveOptions []func(*retry.AdaptiveModeOptions) - if len(standardOptions) != 0 { - adaptiveOptions = append(adaptiveOptions, func(ao *retry.AdaptiveModeOptions) { - ao.StandardOptions = append(ao.StandardOptions, standardOptions...) - }) - } - o.Retryer = retry.NewAdaptiveMode(adaptiveOptions...) - - default: - o.Retryer = retry.NewStandard(standardOptions...) - } -} - -func resolveAWSRetryerProvider(cfg aws.Config, o *Options) { - if cfg.Retryer == nil { - return - } - o.Retryer = cfg.Retryer() -} - -func resolveAWSRetryMode(cfg aws.Config, o *Options) { - if len(cfg.RetryMode) == 0 { - return - } - o.RetryMode = cfg.RetryMode -} -func resolveAWSRetryMaxAttempts(cfg aws.Config, o *Options) { - if cfg.RetryMaxAttempts == 0 { - return - } - o.RetryMaxAttempts = cfg.RetryMaxAttempts -} - -func finalizeRetryMaxAttempts(o *Options) { - if o.RetryMaxAttempts == 0 { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func finalizeOperationRetryMaxAttempts(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { - return - } - - o.Retryer = retry.AddWithMaxAttempts(o.Retryer, o.RetryMaxAttempts) -} - -func resolveAWSEndpointResolver(cfg aws.Config, o *Options) { - if cfg.EndpointResolver == nil && cfg.EndpointResolverWithOptions == nil { - return - } - o.EndpointResolver = withEndpointResolver(cfg.EndpointResolver, cfg.EndpointResolverWithOptions) -} - -func addClientUserAgent(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddSDKAgentKeyValue(awsmiddleware.APIMetadata, "codestar", goModuleVersion) - if len(options.AppID) > 0 { - ua.AddSDKAgentKey(awsmiddleware.ApplicationIdentifier, options.AppID) - } - - return nil -} - -func getOrAddRequestUserAgent(stack *middleware.Stack) (*awsmiddleware.RequestUserAgent, error) { - id := (*awsmiddleware.RequestUserAgent)(nil).ID() - mw, ok := stack.Build.Get(id) - if !ok { - mw = awsmiddleware.NewRequestUserAgent() - if err := stack.Build.Add(mw, middleware.After); err != nil { - return nil, err - } - } - - ua, ok := mw.(*awsmiddleware.RequestUserAgent) - if !ok { - return nil, fmt.Errorf("%T for %s middleware did not match expected type", mw, id) - } - - return ua, nil -} - -type HTTPSignerV4 interface { - SignHTTP(ctx context.Context, credentials aws.Credentials, r *http.Request, payloadHash string, service string, region string, signingTime time.Time, optFns ...func(*v4.SignerOptions)) error -} - -func resolveHTTPSignerV4(o *Options) { - if o.HTTPSignerV4 != nil { - return - } - o.HTTPSignerV4 = newDefaultV4Signer(*o) -} - -func newDefaultV4Signer(o Options) *v4.Signer { - return v4.NewSigner(func(so *v4.SignerOptions) { - so.Logger = o.Logger - so.LogSigning = o.ClientLogMode.IsSigning() - }) -} - -func addClientRequestID(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.ClientRequestID{}, middleware.After) -} - -func addComputeContentLength(stack *middleware.Stack) error { - return stack.Build.Add(&smithyhttp.ComputeContentLength{}, middleware.After) -} - -func addRawResponseToMetadata(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.AddRawResponse{}, middleware.Before) -} - -func addRecordResponseTiming(stack *middleware.Stack) error { - return stack.Deserialize.Add(&awsmiddleware.RecordResponseTiming{}, middleware.After) -} -func addStreamingEventsPayload(stack *middleware.Stack) error { - return stack.Finalize.Add(&v4.StreamingEventsPayload{}, middleware.Before) -} - -func addUnsignedPayload(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.UnsignedPayload{}, "ResolveEndpointV2", middleware.After) -} - -func addComputePayloadSHA256(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ComputePayloadSHA256{}, "ResolveEndpointV2", middleware.After) -} - -func addContentSHA256Header(stack *middleware.Stack) error { - return stack.Finalize.Insert(&v4.ContentSHA256Header{}, (*v4.ComputePayloadSHA256)(nil).ID(), middleware.After) -} - -func addIsWaiterUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureWaiter) - return nil - }) -} - -func addIsPaginatorUserAgent(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeaturePaginator) - return nil - }) -} - -func addRetry(stack *middleware.Stack, o Options) error { - attempt := retry.NewAttemptMiddleware(o.Retryer, smithyhttp.RequestCloner, func(m *retry.Attempt) { - m.LogAttempts = o.ClientLogMode.IsRetries() - }) - if err := stack.Finalize.Insert(attempt, "Signing", middleware.Before); err != nil { - return err - } - if err := stack.Finalize.Insert(&retry.MetricsHeader{}, attempt.ID(), middleware.After); err != nil { - return err - } - return nil -} - -// resolves dual-stack endpoint configuration -func resolveUseDualStackEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseDualStackEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseDualStackEndpoint = value - } - return nil -} - -// resolves FIPS endpoint configuration -func resolveUseFIPSEndpoint(cfg aws.Config, o *Options) error { - if len(cfg.ConfigSources) == 0 { - return nil - } - value, found, err := internalConfig.ResolveUseFIPSEndpoint(context.Background(), cfg.ConfigSources) - if err != nil { - return err - } - if found { - o.EndpointOptions.UseFIPSEndpoint = value - } - return nil -} - -func resolveAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) *string { - if mode == aws.AccountIDEndpointModeDisabled { - return nil - } - - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); ok && ca.Credentials.AccountID != "" { - return aws.String(ca.Credentials.AccountID) - } - - return nil -} - -func addTimeOffsetBuild(stack *middleware.Stack, c *Client) error { - mw := internalmiddleware.AddTimeOffsetMiddleware{Offset: c.timeOffset} - if err := stack.Build.Add(&mw, middleware.After); err != nil { - return err - } - return stack.Deserialize.Insert(&mw, "RecordResponseTiming", middleware.Before) -} -func initializeTimeOffsetResolver(c *Client) { - c.timeOffset = new(atomic.Int64) -} - -func checkAccountID(identity smithyauth.Identity, mode aws.AccountIDEndpointMode) error { - switch mode { - case aws.AccountIDEndpointModeUnset: - case aws.AccountIDEndpointModePreferred: - case aws.AccountIDEndpointModeDisabled: - case aws.AccountIDEndpointModeRequired: - if ca, ok := identity.(*internalauthsmithy.CredentialsAdapter); !ok { - return fmt.Errorf("accountID is required but not set") - } else if ca.Credentials.AccountID == "" { - return fmt.Errorf("accountID is required but not set") - } - // default check in case invalid mode is configured through request config - default: - return fmt.Errorf("invalid accountID endpoint mode %s, must be preferred/required/disabled", mode) - } - - return nil -} - -func addUserAgentRetryMode(stack *middleware.Stack, options Options) error { - ua, err := getOrAddRequestUserAgent(stack) - if err != nil { - return err - } - - switch options.Retryer.(type) { - case *retry.Standard: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeStandard) - case *retry.AdaptiveMode: - ua.AddUserAgentFeature(awsmiddleware.UserAgentFeatureRetryModeAdaptive) - } - return nil -} - -func addRecursionDetection(stack *middleware.Stack) error { - return stack.Build.Add(&awsmiddleware.RecursionDetection{}, middleware.After) -} - -func addRequestIDRetrieverMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awsmiddleware.RequestIDRetriever{}, "OperationDeserializer", middleware.Before) - -} - -func addResponseErrorMiddleware(stack *middleware.Stack) error { - return stack.Deserialize.Insert(&awshttp.ResponseErrorWrapper{}, "RequestIDRetriever", middleware.Before) - -} - -func addRequestResponseLogging(stack *middleware.Stack, o Options) error { - return stack.Deserialize.Add(&smithyhttp.RequestResponseLogger{ - LogRequest: o.ClientLogMode.IsRequest(), - LogRequestWithBody: o.ClientLogMode.IsRequestWithBody(), - LogResponse: o.ClientLogMode.IsResponse(), - LogResponseWithBody: o.ClientLogMode.IsResponseWithBody(), - }, middleware.After) -} - -type disableHTTPSMiddleware struct { - DisableHTTPS bool -} - -func (*disableHTTPSMiddleware) ID() string { - return "disableHTTPS" -} - -func (m *disableHTTPSMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.DisableHTTPS && !smithyhttp.GetHostnameImmutable(ctx) { - req.URL.Scheme = "http" - } - - return next.HandleFinalize(ctx, in) -} - -func addDisableHTTPSMiddleware(stack *middleware.Stack, o Options) error { - return stack.Finalize.Insert(&disableHTTPSMiddleware{ - DisableHTTPS: o.EndpointOptions.DisableHTTPS, - }, "ResolveEndpointV2", middleware.After) -} diff --git a/service/codestar/api_client_test.go b/service/codestar/api_client_test.go deleted file mode 100644 index 4cc64c925da..00000000000 --- a/service/codestar/api_client_test.go +++ /dev/null @@ -1,127 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io/ioutil" - "net/http" - "strings" - "testing" -) - -func TestClient_resolveRetryOptions(t *testing.T) { - nopClient := smithyhttp.ClientDoFunc(func(_ *http.Request) (*http.Response, error) { - return &http.Response{ - StatusCode: 200, - Header: http.Header{}, - Body: ioutil.NopCloser(strings.NewReader("")), - }, nil - }) - - cases := map[string]struct { - defaultsMode aws.DefaultsMode - retryer aws.Retryer - retryMaxAttempts int - opRetryMaxAttempts *int - retryMode aws.RetryMode - expectClientRetryMode aws.RetryMode - expectClientMaxAttempts int - expectOpMaxAttempts int - }{ - "defaults": { - defaultsMode: aws.DefaultsModeStandard, - expectClientRetryMode: aws.RetryModeStandard, - expectClientMaxAttempts: 3, - expectOpMaxAttempts: 3, - }, - "custom default retry": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - "custom op max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(2), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 2, - }, - "custom op no change max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(10), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - "custom op 0 max attempts": { - retryMode: aws.RetryModeAdaptive, - retryMaxAttempts: 10, - opRetryMaxAttempts: aws.Int(0), - expectClientRetryMode: aws.RetryModeAdaptive, - expectClientMaxAttempts: 10, - expectOpMaxAttempts: 10, - }, - } - - for name, c := range cases { - t.Run(name, func(t *testing.T) { - client := NewFromConfig(aws.Config{ - DefaultsMode: c.defaultsMode, - Retryer: func() func() aws.Retryer { - if c.retryer == nil { - return nil - } - - return func() aws.Retryer { return c.retryer } - }(), - HTTPClient: nopClient, - RetryMaxAttempts: c.retryMaxAttempts, - RetryMode: c.retryMode, - }, func(o *Options) { - if o.Retryer == nil { - t.Errorf("retryer must not be nil in functional options") - } - }) - - if e, a := c.expectClientRetryMode, client.options.RetryMode; e != a { - t.Errorf("expect %v retry mode, got %v", e, a) - } - if e, a := c.expectClientMaxAttempts, client.options.Retryer.MaxAttempts(); e != a { - t.Errorf("expect %v max attempts, got %v", e, a) - } - - _, _, err := client.invokeOperation(context.Background(), "mockOperation", struct{}{}, - []func(*Options){ - func(o *Options) { - if c.opRetryMaxAttempts == nil { - return - } - o.RetryMaxAttempts = *c.opRetryMaxAttempts - }, - }, - func(s *middleware.Stack, o Options) error { - s.Initialize.Clear() - s.Serialize.Clear() - s.Build.Clear() - s.Finalize.Clear() - s.Deserialize.Clear() - - if e, a := c.expectOpMaxAttempts, o.Retryer.MaxAttempts(); e != a { - t.Errorf("expect %v op max attempts, got %v", e, a) - } - return nil - }) - if err != nil { - t.Fatalf("expect no operation error, got %v", err) - } - }) - } -} diff --git a/service/codestar/api_op_AssociateTeamMember.go b/service/codestar/api_op_AssociateTeamMember.go deleted file mode 100644 index e9633df6c52..00000000000 --- a/service/codestar/api_op_AssociateTeamMember.go +++ /dev/null @@ -1,163 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds an IAM user to the team for an AWS CodeStar project. -func (c *Client) AssociateTeamMember(ctx context.Context, params *AssociateTeamMemberInput, optFns ...func(*Options)) (*AssociateTeamMemberOutput, error) { - if params == nil { - params = &AssociateTeamMemberInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "AssociateTeamMember", params, optFns, c.addOperationAssociateTeamMemberMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*AssociateTeamMemberOutput) - out.ResultMetadata = metadata - return out, nil -} - -type AssociateTeamMemberInput struct { - - // The ID of the project to which you will add the IAM user. - // - // This member is required. - ProjectId *string - - // The AWS CodeStar project role that will apply to this user. This role - // determines what actions a user can take in an AWS CodeStar project. - // - // This member is required. - ProjectRole *string - - // The Amazon Resource Name (ARN) for the IAM user you want to add to the AWS - // CodeStar project. - // - // This member is required. - UserArn *string - - // A user- or system-generated token that identifies the entity that requested the - // team member association to the project. This token can be used to repeat the - // request. - ClientRequestToken *string - - // Whether the team member is allowed to use an SSH public/private key pair to - // remotely access project resources, for example Amazon EC2 instances. - RemoteAccessAllowed *bool - - noSmithyDocumentSerde -} - -type AssociateTeamMemberOutput struct { - - // The user- or system-generated token from the initial request that can be used - // to repeat the request. - ClientRequestToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationAssociateTeamMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpAssociateTeamMember{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpAssociateTeamMember{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "AssociateTeamMember"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpAssociateTeamMemberValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opAssociateTeamMember(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opAssociateTeamMember(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "AssociateTeamMember", - } -} diff --git a/service/codestar/api_op_CreateProject.go b/service/codestar/api_op_CreateProject.go deleted file mode 100644 index 65167bcaf07..00000000000 --- a/service/codestar/api_op_CreateProject.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Creates a project, including project resources. This action creates a project -// based on a submitted project request. A set of source code files and a toolchain -// template file can be included with the project request. If these are not -// provided, an empty project is created. -func (c *Client) CreateProject(ctx context.Context, params *CreateProjectInput, optFns ...func(*Options)) (*CreateProjectOutput, error) { - if params == nil { - params = &CreateProjectInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateProject", params, optFns, c.addOperationCreateProjectMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateProjectOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateProjectInput struct { - - // The ID of the project to be created in AWS CodeStar. - // - // This member is required. - Id *string - - // The display name for the project to be created in AWS CodeStar. - // - // This member is required. - Name *string - - // A user- or system-generated token that identifies the entity that requested - // project creation. This token can be used to repeat the request. - ClientRequestToken *string - - // The description of the project, if any. - Description *string - - // A list of the Code objects submitted with the project request. If this - // parameter is specified, the request must also include the toolchain parameter. - SourceCode []types.Code - - // The tags created for the project. - Tags map[string]string - - // The name of the toolchain template file submitted with the project request. If - // this parameter is specified, the request must also include the sourceCode - // parameter. - Toolchain *types.Toolchain - - noSmithyDocumentSerde -} - -type CreateProjectOutput struct { - - // The Amazon Resource Name (ARN) of the created project. - // - // This member is required. - Arn *string - - // The ID of the project. - // - // This member is required. - Id *string - - // A user- or system-generated token that identifies the entity that requested - // project creation. - ClientRequestToken *string - - // Reserved for future use. - ProjectTemplateId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateProject{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateProject{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateProject"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateProjectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateProject(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateProject(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateProject", - } -} diff --git a/service/codestar/api_op_CreateUserProfile.go b/service/codestar/api_op_CreateUserProfile.go deleted file mode 100644 index 7aa5a1ee371..00000000000 --- a/service/codestar/api_op_CreateUserProfile.go +++ /dev/null @@ -1,183 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Creates a profile for a user that includes user preferences, such as the -// display name and email address assocciated with the user, in AWS CodeStar. The -// user profile is not project-specific. Information in the user profile is -// displayed wherever the user's information appears to other users in AWS -// CodeStar. -func (c *Client) CreateUserProfile(ctx context.Context, params *CreateUserProfileInput, optFns ...func(*Options)) (*CreateUserProfileOutput, error) { - if params == nil { - params = &CreateUserProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "CreateUserProfile", params, optFns, c.addOperationCreateUserProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*CreateUserProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type CreateUserProfileInput struct { - - // The name that will be displayed as the friendly name for the user in AWS - // CodeStar. - // - // This member is required. - DisplayName *string - - // The email address that will be displayed as part of the user's profile in AWS - // CodeStar. - // - // This member is required. - EmailAddress *string - - // The Amazon Resource Name (ARN) of the user in IAM. - // - // This member is required. - UserArn *string - - // The SSH public key associated with the user in AWS CodeStar. If a project owner - // allows the user remote access to project resources, this public key will be used - // along with the user's private key for SSH access. - SshPublicKey *string - - noSmithyDocumentSerde -} - -type CreateUserProfileOutput struct { - - // The Amazon Resource Name (ARN) of the user in IAM. - // - // This member is required. - UserArn *string - - // The date the user profile was created, in timestamp format. - CreatedTimestamp *time.Time - - // The name that is displayed as the friendly name for the user in AWS CodeStar. - DisplayName *string - - // The email address that is displayed as part of the user's profile in AWS - // CodeStar. - EmailAddress *string - - // The date the user profile was last modified, in timestamp format. - LastModifiedTimestamp *time.Time - - // The SSH public key associated with the user in AWS CodeStar. This is the public - // portion of the public/private keypair the user can use to access project - // resources if a project owner allows the user remote access to those resources. - SshPublicKey *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationCreateUserProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpCreateUserProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpCreateUserProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "CreateUserProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpCreateUserProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opCreateUserProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opCreateUserProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "CreateUserProfile", - } -} diff --git a/service/codestar/api_op_DeleteProject.go b/service/codestar/api_op_DeleteProject.go deleted file mode 100644 index f3df876d33c..00000000000 --- a/service/codestar/api_op_DeleteProject.go +++ /dev/null @@ -1,157 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a project, including project resources. Does not delete users -// associated with the project, but does delete the IAM roles that allowed access -// to the project. -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 ID of the project to be deleted in AWS CodeStar. - // - // This member is required. - Id *string - - // A user- or system-generated token that identifies the entity that requested - // project deletion. This token can be used to repeat the request. - ClientRequestToken *string - - // Whether to send a delete request for the primary stack in AWS CloudFormation - // originally used to generate the project and its resources. This option will - // delete all AWS resources for the project (except for any buckets in Amazon S3) - // as well as deleting the project itself. Recommended for most use cases. - DeleteStack bool - - noSmithyDocumentSerde -} - -type DeleteProjectOutput struct { - - // The Amazon Resource Name (ARN) of the deleted project. - ProjectArn *string - - // The ID of the primary stack in AWS CloudFormation that will be deleted as part - // of deleting the project and its resources. - StackId *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteProject{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteProject{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteProject"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteProjectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteProject(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteProject(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteProject", - } -} diff --git a/service/codestar/api_op_DeleteUserProfile.go b/service/codestar/api_op_DeleteUserProfile.go deleted file mode 100644 index a66c262a374..00000000000 --- a/service/codestar/api_op_DeleteUserProfile.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Deletes a user profile in AWS CodeStar, including all personal preference data -// associated with that profile, such as display name and email address. It does -// not delete the history of that user, for example the history of commits made by -// that user. -func (c *Client) DeleteUserProfile(ctx context.Context, params *DeleteUserProfileInput, optFns ...func(*Options)) (*DeleteUserProfileOutput, error) { - if params == nil { - params = &DeleteUserProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DeleteUserProfile", params, optFns, c.addOperationDeleteUserProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DeleteUserProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DeleteUserProfileInput struct { - - // The Amazon Resource Name (ARN) of the user to delete from AWS CodeStar. - // - // This member is required. - UserArn *string - - noSmithyDocumentSerde -} - -type DeleteUserProfileOutput struct { - - // The Amazon Resource Name (ARN) of the user deleted from AWS CodeStar. - // - // This member is required. - UserArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDeleteUserProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpDeleteUserProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDeleteUserProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DeleteUserProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDeleteUserProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDeleteUserProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDeleteUserProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DeleteUserProfile", - } -} diff --git a/service/codestar/api_op_DescribeProject.go b/service/codestar/api_op_DescribeProject.go deleted file mode 100644 index 8d4e40d5f2d..00000000000 --- a/service/codestar/api_op_DescribeProject.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Describes a project and its resources. -func (c *Client) DescribeProject(ctx context.Context, params *DescribeProjectInput, optFns ...func(*Options)) (*DescribeProjectOutput, error) { - if params == nil { - params = &DescribeProjectInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeProject", params, optFns, c.addOperationDescribeProjectMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeProjectOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeProjectInput struct { - - // The ID of the project. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -type DescribeProjectOutput struct { - - // The Amazon Resource Name (ARN) for the project. - Arn *string - - // A user- or system-generated token that identifies the entity that requested - // project creation. - ClientRequestToken *string - - // The date and time the project was created, in timestamp format. - CreatedTimeStamp *time.Time - - // The description of the project, if any. - Description *string - - // The ID of the project. - Id *string - - // The display name for the project. - Name *string - - // The ID for the AWS CodeStar project template used to create the project. - ProjectTemplateId *string - - // The ID of the primary stack in AWS CloudFormation used to generate resources - // for the project. - StackId *string - - // The project creation or deletion status. - Status *types.ProjectStatus - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeProject{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeProject{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeProject"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDescribeProjectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeProject(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeProject(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeProject", - } -} diff --git a/service/codestar/api_op_DescribeUserProfile.go b/service/codestar/api_op_DescribeUserProfile.go deleted file mode 100644 index 8e3733ee019..00000000000 --- a/service/codestar/api_op_DescribeUserProfile.go +++ /dev/null @@ -1,175 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Describes a user in AWS CodeStar and the user attributes across all projects. -func (c *Client) DescribeUserProfile(ctx context.Context, params *DescribeUserProfileInput, optFns ...func(*Options)) (*DescribeUserProfileOutput, error) { - if params == nil { - params = &DescribeUserProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DescribeUserProfile", params, optFns, c.addOperationDescribeUserProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DescribeUserProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DescribeUserProfileInput struct { - - // The Amazon Resource Name (ARN) of the user. - // - // This member is required. - UserArn *string - - noSmithyDocumentSerde -} - -type DescribeUserProfileOutput struct { - - // The date and time when the user profile was created in AWS CodeStar, in - // timestamp format. - // - // This member is required. - CreatedTimestamp *time.Time - - // The date and time when the user profile was last modified, in timestamp format. - // - // This member is required. - LastModifiedTimestamp *time.Time - - // The Amazon Resource Name (ARN) of the user. - // - // This member is required. - UserArn *string - - // The display name shown for the user in AWS CodeStar projects. For example, this - // could be set to both first and last name ("Mary Major") or a single name - // ("Mary"). The display name is also used to generate the initial icon associated - // with the user in AWS CodeStar projects. If spaces are included in the display - // name, the first character that appears after the space will be used as the - // second character in the user initial icon. The initial icon displays a maximum - // of two characters, so a display name with more than one space (for example "Mary - // Jane Major") would generate an initial icon using the first character and the - // first character after the space ("MJ", not "MM"). - DisplayName *string - - // The email address for the user. Optional. - EmailAddress *string - - // The SSH public key associated with the user. This SSH public key is associated - // with the user profile, and can be used in conjunction with the associated - // private key for access to project resources, such as Amazon EC2 instances, if a - // project owner grants remote access to those resources. - SshPublicKey *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDescribeUserProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpDescribeUserProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDescribeUserProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DescribeUserProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDescribeUserProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDescribeUserProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDescribeUserProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DescribeUserProfile", - } -} diff --git a/service/codestar/api_op_DisassociateTeamMember.go b/service/codestar/api_op_DisassociateTeamMember.go deleted file mode 100644 index dd417f06e83..00000000000 --- a/service/codestar/api_op_DisassociateTeamMember.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes a user from a project. Removing a user from a project also removes the -// IAM policies from that user that allowed access to the project and its -// resources. Disassociating a team member does not remove that user's profile from -// AWS CodeStar. It does not remove the user from IAM. -func (c *Client) DisassociateTeamMember(ctx context.Context, params *DisassociateTeamMemberInput, optFns ...func(*Options)) (*DisassociateTeamMemberOutput, error) { - if params == nil { - params = &DisassociateTeamMemberInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "DisassociateTeamMember", params, optFns, c.addOperationDisassociateTeamMemberMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*DisassociateTeamMemberOutput) - out.ResultMetadata = metadata - return out, nil -} - -type DisassociateTeamMemberInput struct { - - // The ID of the AWS CodeStar project from which you want to remove a team member. - // - // This member is required. - ProjectId *string - - // The Amazon Resource Name (ARN) of the IAM user or group whom you want to remove - // from the project. - // - // This member is required. - UserArn *string - - noSmithyDocumentSerde -} - -type DisassociateTeamMemberOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationDisassociateTeamMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpDisassociateTeamMember{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpDisassociateTeamMember{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "DisassociateTeamMember"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpDisassociateTeamMemberValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opDisassociateTeamMember(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opDisassociateTeamMember(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "DisassociateTeamMember", - } -} diff --git a/service/codestar/api_op_ListProjects.go b/service/codestar/api_op_ListProjects.go deleted file mode 100644 index 2fc7012467c..00000000000 --- a/service/codestar/api_op_ListProjects.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all projects in AWS CodeStar associated with your AWS account. -func (c *Client) ListProjects(ctx context.Context, params *ListProjectsInput, optFns ...func(*Options)) (*ListProjectsOutput, error) { - if params == nil { - params = &ListProjectsInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListProjects", params, optFns, c.addOperationListProjectsMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListProjectsOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListProjectsInput struct { - - // The maximum amount of data that can be contained in a single set of results. - MaxResults *int32 - - // The continuation token to be used to return the next set of results, if the - // results cannot be returned in one response. - NextToken *string - - noSmithyDocumentSerde -} - -type ListProjectsOutput struct { - - // A list of projects. - // - // This member is required. - Projects []types.ProjectSummary - - // The continuation token to use when requesting the next set of results, if there - // are more results to be returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListProjectsMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpListProjects{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListProjects{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListProjects"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListProjects(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListProjects(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListProjects", - } -} diff --git a/service/codestar/api_op_ListResources.go b/service/codestar/api_op_ListResources.go deleted file mode 100644 index 426f8ec24b0..00000000000 --- a/service/codestar/api_op_ListResources.go +++ /dev/null @@ -1,153 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists resources associated with a project in AWS CodeStar. -func (c *Client) ListResources(ctx context.Context, params *ListResourcesInput, optFns ...func(*Options)) (*ListResourcesOutput, error) { - if params == nil { - params = &ListResourcesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListResources", params, optFns, c.addOperationListResourcesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListResourcesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListResourcesInput struct { - - // The ID of the project. - // - // This member is required. - ProjectId *string - - // The maximum amount of data that can be contained in a single set of results. - MaxResults *int32 - - // The continuation token for the next set of results, if the results cannot be - // returned in one response. - NextToken *string - - noSmithyDocumentSerde -} - -type ListResourcesOutput struct { - - // The continuation token to use when requesting the next set of results, if there - // are more results to be returned. - NextToken *string - - // An array of resources associated with the project. - Resources []types.Resource - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListResourcesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpListResources{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListResources{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListResources"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListResourcesValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListResources(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListResources(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListResources", - } -} diff --git a/service/codestar/api_op_ListTagsForProject.go b/service/codestar/api_op_ListTagsForProject.go deleted file mode 100644 index edf0bdcf786..00000000000 --- a/service/codestar/api_op_ListTagsForProject.go +++ /dev/null @@ -1,150 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Gets the tags for a project. -func (c *Client) ListTagsForProject(ctx context.Context, params *ListTagsForProjectInput, optFns ...func(*Options)) (*ListTagsForProjectOutput, error) { - if params == nil { - params = &ListTagsForProjectInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTagsForProject", params, optFns, c.addOperationListTagsForProjectMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTagsForProjectOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListTagsForProjectInput struct { - - // The ID of the project to get tags for. - // - // This member is required. - Id *string - - // Reserved for future use. - MaxResults *int32 - - // Reserved for future use. - NextToken *string - - noSmithyDocumentSerde -} - -type ListTagsForProjectOutput struct { - - // Reserved for future use. - NextToken *string - - // The tags for the project. - Tags map[string]string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTagsForProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTagsForProject{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTagsForProject{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTagsForProject"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListTagsForProjectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTagsForProject(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTagsForProject(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTagsForProject", - } -} diff --git a/service/codestar/api_op_ListTeamMembers.go b/service/codestar/api_op_ListTeamMembers.go deleted file mode 100644 index 185ac8607c0..00000000000 --- a/service/codestar/api_op_ListTeamMembers.go +++ /dev/null @@ -1,155 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all team members associated with a project. -func (c *Client) ListTeamMembers(ctx context.Context, params *ListTeamMembersInput, optFns ...func(*Options)) (*ListTeamMembersOutput, error) { - if params == nil { - params = &ListTeamMembersInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListTeamMembers", params, optFns, c.addOperationListTeamMembersMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListTeamMembersOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListTeamMembersInput struct { - - // The ID of the project for which you want to list team members. - // - // This member is required. - ProjectId *string - - // The maximum number of team members you want returned in a response. - MaxResults *int32 - - // The continuation token for the next set of results, if the results cannot be - // returned in one response. - NextToken *string - - noSmithyDocumentSerde -} - -type ListTeamMembersOutput struct { - - // A list of team member objects for the project. - // - // This member is required. - TeamMembers []types.TeamMember - - // The continuation token to use when requesting the next set of results, if there - // are more results to be returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListTeamMembersMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpListTeamMembers{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListTeamMembers{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListTeamMembers"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpListTeamMembersValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListTeamMembers(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListTeamMembers(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListTeamMembers", - } -} diff --git a/service/codestar/api_op_ListUserProfiles.go b/service/codestar/api_op_ListUserProfiles.go deleted file mode 100644 index d23d5bb7c93..00000000000 --- a/service/codestar/api_op_ListUserProfiles.go +++ /dev/null @@ -1,147 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Lists all the user profiles configured for your AWS account in AWS CodeStar. -func (c *Client) ListUserProfiles(ctx context.Context, params *ListUserProfilesInput, optFns ...func(*Options)) (*ListUserProfilesOutput, error) { - if params == nil { - params = &ListUserProfilesInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "ListUserProfiles", params, optFns, c.addOperationListUserProfilesMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*ListUserProfilesOutput) - out.ResultMetadata = metadata - return out, nil -} - -type ListUserProfilesInput struct { - - // The maximum number of results to return in a response. - MaxResults *int32 - - // The continuation token for the next set of results, if the results cannot be - // returned in one response. - NextToken *string - - noSmithyDocumentSerde -} - -type ListUserProfilesOutput struct { - - // All the user profiles configured in AWS CodeStar for an AWS account. - // - // This member is required. - UserProfiles []types.UserProfileSummary - - // The continuation token to use when requesting the next set of results, if there - // are more results to be returned. - NextToken *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationListUserProfilesMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpListUserProfiles{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpListUserProfiles{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "ListUserProfiles"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opListUserProfiles(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opListUserProfiles(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "ListUserProfiles", - } -} diff --git a/service/codestar/api_op_TagProject.go b/service/codestar/api_op_TagProject.go deleted file mode 100644 index 607c7f27d94..00000000000 --- a/service/codestar/api_op_TagProject.go +++ /dev/null @@ -1,146 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Adds tags to a project. -func (c *Client) TagProject(ctx context.Context, params *TagProjectInput, optFns ...func(*Options)) (*TagProjectOutput, error) { - if params == nil { - params = &TagProjectInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "TagProject", params, optFns, c.addOperationTagProjectMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*TagProjectOutput) - out.ResultMetadata = metadata - return out, nil -} - -type TagProjectInput struct { - - // The ID of the project you want to add a tag to. - // - // This member is required. - Id *string - - // The tags you want to add to the project. - // - // This member is required. - Tags map[string]string - - noSmithyDocumentSerde -} - -type TagProjectOutput struct { - - // The tags for the project. - Tags map[string]string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationTagProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpTagProject{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpTagProject{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "TagProject"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpTagProjectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opTagProject(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opTagProject(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "TagProject", - } -} diff --git a/service/codestar/api_op_UntagProject.go b/service/codestar/api_op_UntagProject.go deleted file mode 100644 index d1b0e4b2a66..00000000000 --- a/service/codestar/api_op_UntagProject.go +++ /dev/null @@ -1,142 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Removes tags from a project. -func (c *Client) UntagProject(ctx context.Context, params *UntagProjectInput, optFns ...func(*Options)) (*UntagProjectOutput, error) { - if params == nil { - params = &UntagProjectInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UntagProject", params, optFns, c.addOperationUntagProjectMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UntagProjectOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UntagProjectInput struct { - - // The ID of the project to remove tags from. - // - // This member is required. - Id *string - - // The tags to remove from the project. - // - // This member is required. - Tags []string - - noSmithyDocumentSerde -} - -type UntagProjectOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUntagProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpUntagProject{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUntagProject{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UntagProject"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUntagProjectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUntagProject(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUntagProject(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UntagProject", - } -} diff --git a/service/codestar/api_op_UpdateProject.go b/service/codestar/api_op_UpdateProject.go deleted file mode 100644 index e044501329e..00000000000 --- a/service/codestar/api_op_UpdateProject.go +++ /dev/null @@ -1,143 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates a project in AWS CodeStar. -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 ID of the project you want to update. - // - // This member is required. - Id *string - - // The description of the project, if any. - Description *string - - // The name of the project you want to update. - Name *string - - noSmithyDocumentSerde -} - -type UpdateProjectOutput struct { - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateProjectMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateProject{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateProject{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateProject"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateProjectValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateProject(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateProject(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateProject", - } -} diff --git a/service/codestar/api_op_UpdateTeamMember.go b/service/codestar/api_op_UpdateTeamMember.go deleted file mode 100644 index 125f8aa807c..00000000000 --- a/service/codestar/api_op_UpdateTeamMember.go +++ /dev/null @@ -1,169 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -// Updates a team member's attributes in an AWS CodeStar project. For example, you -// can change a team member's role in the project, or change whether they have -// remote access to project resources. -func (c *Client) UpdateTeamMember(ctx context.Context, params *UpdateTeamMemberInput, optFns ...func(*Options)) (*UpdateTeamMemberOutput, error) { - if params == nil { - params = &UpdateTeamMemberInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateTeamMember", params, optFns, c.addOperationUpdateTeamMemberMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateTeamMemberOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateTeamMemberInput struct { - - // The ID of the project. - // - // This member is required. - ProjectId *string - - // The Amazon Resource Name (ARN) of the user for whom you want to change team - // membership attributes. - // - // This member is required. - UserArn *string - - // The role assigned to the user in the project. Project roles have different - // levels of access. For more information, see [Working with Teams]in the AWS CodeStar User Guide. - // - // [Working with Teams]: http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html - ProjectRole *string - - // Whether a team member is allowed to remotely access project resources using the - // SSH public key associated with the user's profile. Even if this is set to True, - // the user must associate a public key with their profile before the user can - // access resources. - RemoteAccessAllowed *bool - - noSmithyDocumentSerde -} - -type UpdateTeamMemberOutput struct { - - // The project role granted to the user. - ProjectRole *string - - // Whether a team member is allowed to remotely access project resources using the - // SSH public key associated with the user's profile. - RemoteAccessAllowed *bool - - // The Amazon Resource Name (ARN) of the user whose team membership attributes - // were updated. - UserArn *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateTeamMemberMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateTeamMember{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateTeamMember{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateTeamMember"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateTeamMemberValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateTeamMember(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateTeamMember(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateTeamMember", - } -} diff --git a/service/codestar/api_op_UpdateUserProfile.go b/service/codestar/api_op_UpdateUserProfile.go deleted file mode 100644 index 3e587edb3f9..00000000000 --- a/service/codestar/api_op_UpdateUserProfile.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "time" -) - -// Updates a user's profile in AWS CodeStar. The user profile is not -// project-specific. Information in the user profile is displayed wherever the -// user's information appears to other users in AWS CodeStar. -func (c *Client) UpdateUserProfile(ctx context.Context, params *UpdateUserProfileInput, optFns ...func(*Options)) (*UpdateUserProfileOutput, error) { - if params == nil { - params = &UpdateUserProfileInput{} - } - - result, metadata, err := c.invokeOperation(ctx, "UpdateUserProfile", params, optFns, c.addOperationUpdateUserProfileMiddlewares) - if err != nil { - return nil, err - } - - out := result.(*UpdateUserProfileOutput) - out.ResultMetadata = metadata - return out, nil -} - -type UpdateUserProfileInput struct { - - // The name that will be displayed as the friendly name for the user in AWS - // CodeStar. - // - // This member is required. - UserArn *string - - // The name that is displayed as the friendly name for the user in AWS CodeStar. - DisplayName *string - - // The email address that is displayed as part of the user's profile in AWS - // CodeStar. - EmailAddress *string - - // The SSH public key associated with the user in AWS CodeStar. If a project owner - // allows the user remote access to project resources, this public key will be used - // along with the user's private key for SSH access. - SshPublicKey *string - - noSmithyDocumentSerde -} - -type UpdateUserProfileOutput struct { - - // The Amazon Resource Name (ARN) of the user in IAM. - // - // This member is required. - UserArn *string - - // The date the user profile was created, in timestamp format. - CreatedTimestamp *time.Time - - // The name that is displayed as the friendly name for the user in AWS CodeStar. - DisplayName *string - - // The email address that is displayed as part of the user's profile in AWS - // CodeStar. - EmailAddress *string - - // The date the user profile was last modified, in timestamp format. - LastModifiedTimestamp *time.Time - - // The SSH public key associated with the user in AWS CodeStar. This is the public - // portion of the public/private keypair the user can use to access project - // resources if a project owner allows the user remote access to those resources. - SshPublicKey *string - - // Metadata pertaining to the operation's result. - ResultMetadata middleware.Metadata - - noSmithyDocumentSerde -} - -func (c *Client) addOperationUpdateUserProfileMiddlewares(stack *middleware.Stack, options Options) (err error) { - if err := stack.Serialize.Add(&setOperationInputMiddleware{}, middleware.After); err != nil { - return err - } - err = stack.Serialize.Add(&awsAwsjson11_serializeOpUpdateUserProfile{}, middleware.After) - if err != nil { - return err - } - err = stack.Deserialize.Add(&awsAwsjson11_deserializeOpUpdateUserProfile{}, middleware.After) - if err != nil { - return err - } - if err := addProtocolFinalizerMiddlewares(stack, options, "UpdateUserProfile"); err != nil { - return fmt.Errorf("add protocol finalizers: %v", err) - } - - if err = addlegacyEndpointContextSetter(stack, options); err != nil { - return err - } - if err = addSetLoggerMiddleware(stack, options); err != nil { - return err - } - if err = addClientRequestID(stack); err != nil { - return err - } - if err = addComputeContentLength(stack); err != nil { - return err - } - if err = addResolveEndpointMiddleware(stack, options); err != nil { - return err - } - if err = addComputePayloadSHA256(stack); err != nil { - return err - } - if err = addRetry(stack, options); err != nil { - return err - } - if err = addRawResponseToMetadata(stack); err != nil { - return err - } - if err = addRecordResponseTiming(stack); err != nil { - return err - } - if err = addClientUserAgent(stack, options); err != nil { - return err - } - if err = smithyhttp.AddErrorCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = smithyhttp.AddCloseResponseBodyMiddleware(stack); err != nil { - return err - } - if err = addSetLegacyContextSigningOptionsMiddleware(stack); err != nil { - return err - } - if err = addTimeOffsetBuild(stack, c); err != nil { - return err - } - if err = addUserAgentRetryMode(stack, options); err != nil { - return err - } - if err = addOpUpdateUserProfileValidationMiddleware(stack); err != nil { - return err - } - if err = stack.Initialize.Add(newServiceMetadataMiddleware_opUpdateUserProfile(options.Region), middleware.Before); err != nil { - return err - } - if err = addRecursionDetection(stack); err != nil { - return err - } - if err = addRequestIDRetrieverMiddleware(stack); err != nil { - return err - } - if err = addResponseErrorMiddleware(stack); err != nil { - return err - } - if err = addRequestResponseLogging(stack, options); err != nil { - return err - } - if err = addDisableHTTPSMiddleware(stack, options); err != nil { - return err - } - return nil -} - -func newServiceMetadataMiddleware_opUpdateUserProfile(region string) *awsmiddleware.RegisterServiceMetadata { - return &awsmiddleware.RegisterServiceMetadata{ - Region: region, - ServiceID: ServiceID, - OperationName: "UpdateUserProfile", - } -} diff --git a/service/codestar/auth.go b/service/codestar/auth.go deleted file mode 100644 index d1458c7736b..00000000000 --- a/service/codestar/auth.go +++ /dev/null @@ -1,284 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - smithy "github.com/aws/smithy-go" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" -) - -func bindAuthParamsRegion(_ interface{}, params *AuthResolverParameters, _ interface{}, options Options) { - params.Region = options.Region -} - -type setLegacyContextSigningOptionsMiddleware struct { -} - -func (*setLegacyContextSigningOptionsMiddleware) ID() string { - return "setLegacyContextSigningOptions" -} - -func (m *setLegacyContextSigningOptionsMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - schemeID := rscheme.Scheme.SchemeID() - - if sn := awsmiddleware.GetSigningName(ctx); sn != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningName(&rscheme.SignerProperties, sn) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningName(&rscheme.SignerProperties, sn) - } - } - - if sr := awsmiddleware.GetSigningRegion(ctx); sr != "" { - if schemeID == "aws.auth#sigv4" { - smithyhttp.SetSigV4SigningRegion(&rscheme.SignerProperties, sr) - } else if schemeID == "aws.auth#sigv4a" { - smithyhttp.SetSigV4ASigningRegions(&rscheme.SignerProperties, []string{sr}) - } - } - - return next.HandleFinalize(ctx, in) -} - -func addSetLegacyContextSigningOptionsMiddleware(stack *middleware.Stack) error { - return stack.Finalize.Insert(&setLegacyContextSigningOptionsMiddleware{}, "Signing", middleware.Before) -} - -type withAnonymous struct { - resolver AuthSchemeResolver -} - -var _ AuthSchemeResolver = (*withAnonymous)(nil) - -func (v *withAnonymous) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - opts, err := v.resolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return nil, err - } - - opts = append(opts, &smithyauth.Option{ - SchemeID: smithyauth.SchemeIDAnonymous, - }) - return opts, nil -} - -func wrapWithAnonymousAuth(options *Options) { - if _, ok := options.AuthSchemeResolver.(*defaultAuthSchemeResolver); !ok { - return - } - - options.AuthSchemeResolver = &withAnonymous{ - resolver: options.AuthSchemeResolver, - } -} - -// AuthResolverParameters contains the set of inputs necessary for auth scheme -// resolution. -type AuthResolverParameters struct { - // The name of the operation being invoked. - Operation string - - // The region in which the operation is being invoked. - Region string -} - -func bindAuthResolverParams(ctx context.Context, operation string, input interface{}, options Options) *AuthResolverParameters { - params := &AuthResolverParameters{ - Operation: operation, - } - - bindAuthParamsRegion(ctx, params, input, options) - - return params -} - -// AuthSchemeResolver returns a set of possible authentication options for an -// operation. -type AuthSchemeResolver interface { - ResolveAuthSchemes(context.Context, *AuthResolverParameters) ([]*smithyauth.Option, error) -} - -type defaultAuthSchemeResolver struct{} - -var _ AuthSchemeResolver = (*defaultAuthSchemeResolver)(nil) - -func (*defaultAuthSchemeResolver) ResolveAuthSchemes(ctx context.Context, params *AuthResolverParameters) ([]*smithyauth.Option, error) { - if overrides, ok := operationAuthOptions[params.Operation]; ok { - return overrides(params), nil - } - return serviceAuthOptions(params), nil -} - -var operationAuthOptions = map[string]func(*AuthResolverParameters) []*smithyauth.Option{} - -func serviceAuthOptions(params *AuthResolverParameters) []*smithyauth.Option { - return []*smithyauth.Option{ - { - SchemeID: smithyauth.SchemeIDSigV4, - SignerProperties: func() smithy.Properties { - var props smithy.Properties - smithyhttp.SetSigV4SigningName(&props, "codestar") - smithyhttp.SetSigV4SigningRegion(&props, params.Region) - return props - }(), - }, - } -} - -type resolveAuthSchemeMiddleware struct { - operation string - options Options -} - -func (*resolveAuthSchemeMiddleware) ID() string { - return "ResolveAuthScheme" -} - -func (m *resolveAuthSchemeMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - params := bindAuthResolverParams(ctx, m.operation, getOperationInput(ctx), m.options) - options, err := m.options.AuthSchemeResolver.ResolveAuthSchemes(ctx, params) - if err != nil { - return out, metadata, fmt.Errorf("resolve auth scheme: %w", err) - } - - scheme, ok := m.selectScheme(options) - if !ok { - return out, metadata, fmt.Errorf("could not select an auth scheme") - } - - ctx = setResolvedAuthScheme(ctx, scheme) - return next.HandleFinalize(ctx, in) -} - -func (m *resolveAuthSchemeMiddleware) selectScheme(options []*smithyauth.Option) (*resolvedAuthScheme, bool) { - for _, option := range options { - if option.SchemeID == smithyauth.SchemeIDAnonymous { - return newResolvedAuthScheme(smithyhttp.NewAnonymousScheme(), option), true - } - - for _, scheme := range m.options.AuthSchemes { - if scheme.SchemeID() != option.SchemeID { - continue - } - - if scheme.IdentityResolver(m.options) != nil { - return newResolvedAuthScheme(scheme, option), true - } - } - } - - return nil, false -} - -type resolvedAuthSchemeKey struct{} - -type resolvedAuthScheme struct { - Scheme smithyhttp.AuthScheme - IdentityProperties smithy.Properties - SignerProperties smithy.Properties -} - -func newResolvedAuthScheme(scheme smithyhttp.AuthScheme, option *smithyauth.Option) *resolvedAuthScheme { - return &resolvedAuthScheme{ - Scheme: scheme, - IdentityProperties: option.IdentityProperties, - SignerProperties: option.SignerProperties, - } -} - -func setResolvedAuthScheme(ctx context.Context, scheme *resolvedAuthScheme) context.Context { - return middleware.WithStackValue(ctx, resolvedAuthSchemeKey{}, scheme) -} - -func getResolvedAuthScheme(ctx context.Context) *resolvedAuthScheme { - v, _ := middleware.GetStackValue(ctx, resolvedAuthSchemeKey{}).(*resolvedAuthScheme) - return v -} - -type getIdentityMiddleware struct { - options Options -} - -func (*getIdentityMiddleware) ID() string { - return "GetIdentity" -} - -func (m *getIdentityMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - resolver := rscheme.Scheme.IdentityResolver(m.options) - if resolver == nil { - return out, metadata, fmt.Errorf("no identity resolver") - } - - identity, err := resolver.GetIdentity(ctx, rscheme.IdentityProperties) - if err != nil { - return out, metadata, fmt.Errorf("get identity: %w", err) - } - - ctx = setIdentity(ctx, identity) - return next.HandleFinalize(ctx, in) -} - -type identityKey struct{} - -func setIdentity(ctx context.Context, identity smithyauth.Identity) context.Context { - return middleware.WithStackValue(ctx, identityKey{}, identity) -} - -func getIdentity(ctx context.Context) smithyauth.Identity { - v, _ := middleware.GetStackValue(ctx, identityKey{}).(smithyauth.Identity) - return v -} - -type signRequestMiddleware struct { -} - -func (*signRequestMiddleware) ID() string { - return "Signing" -} - -func (m *signRequestMiddleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unexpected transport type %T", in.Request) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - identity := getIdentity(ctx) - if identity == nil { - return out, metadata, fmt.Errorf("no identity") - } - - signer := rscheme.Scheme.Signer() - if signer == nil { - return out, metadata, fmt.Errorf("no signer") - } - - if err := signer.SignRequest(ctx, req, identity, rscheme.SignerProperties); err != nil { - return out, metadata, fmt.Errorf("sign request: %w", err) - } - - return next.HandleFinalize(ctx, in) -} diff --git a/service/codestar/deserializers.go b/service/codestar/deserializers.go deleted file mode 100644 index 97254e4d5ad..00000000000 --- a/service/codestar/deserializers.go +++ /dev/null @@ -1,4549 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "bytes" - "context" - "encoding/json" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws/protocol/restjson" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - smithy "github.com/aws/smithy-go" - smithyio "github.com/aws/smithy-go/io" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithytime "github.com/aws/smithy-go/time" - smithyhttp "github.com/aws/smithy-go/transport/http" - "io" - "strings" - "time" -) - -func deserializeS3Expires(v string) (*time.Time, error) { - t, err := smithytime.ParseHTTPDate(v) - if err != nil { - return nil, nil - } - return &t, nil -} - -type awsAwsjson11_deserializeOpAssociateTeamMember struct { -} - -func (*awsAwsjson11_deserializeOpAssociateTeamMember) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpAssociateTeamMember) HandleDeserialize(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_deserializeOpErrorAssociateTeamMember(response, &metadata) - } - output := &AssociateTeamMemberOutput{} - 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_deserializeOpDocumentAssociateTeamMemberOutput(&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_deserializeOpErrorAssociateTeamMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("InvalidServiceRoleException", errorCode): - return awsAwsjson11_deserializeErrorInvalidServiceRoleException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ProjectConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorProjectConfigurationException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("TeamMemberAlreadyAssociatedException", errorCode): - return awsAwsjson11_deserializeErrorTeamMemberAlreadyAssociatedException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpCreateProject struct { -} - -func (*awsAwsjson11_deserializeOpCreateProject) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpCreateProject) HandleDeserialize(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_deserializeOpErrorCreateProject(response, &metadata) - } - output := &CreateProjectOutput{} - 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_deserializeOpDocumentCreateProjectOutput(&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_deserializeOpErrorCreateProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("InvalidServiceRoleException", errorCode): - return awsAwsjson11_deserializeErrorInvalidServiceRoleException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ProjectAlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorProjectAlreadyExistsException(response, errorBody) - - case strings.EqualFold("ProjectConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorProjectConfigurationException(response, errorBody) - - case strings.EqualFold("ProjectCreationFailedException", errorCode): - return awsAwsjson11_deserializeErrorProjectCreationFailedException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpCreateUserProfile struct { -} - -func (*awsAwsjson11_deserializeOpCreateUserProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpCreateUserProfile) HandleDeserialize(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_deserializeOpErrorCreateUserProfile(response, &metadata) - } - output := &CreateUserProfileOutput{} - 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_deserializeOpDocumentCreateUserProfileOutput(&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_deserializeOpErrorCreateUserProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("UserProfileAlreadyExistsException", errorCode): - return awsAwsjson11_deserializeErrorUserProfileAlreadyExistsException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDeleteProject struct { -} - -func (*awsAwsjson11_deserializeOpDeleteProject) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_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) - 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_deserializeOpErrorDeleteProject(response, &metadata) - } - 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 = awsAwsjson11_deserializeOpDocumentDeleteProjectOutput(&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_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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("InvalidServiceRoleException", errorCode): - return awsAwsjson11_deserializeErrorInvalidServiceRoleException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDeleteUserProfile struct { -} - -func (*awsAwsjson11_deserializeOpDeleteUserProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDeleteUserProfile) HandleDeserialize(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_deserializeOpErrorDeleteUserProfile(response, &metadata) - } - output := &DeleteUserProfileOutput{} - 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_deserializeOpDocumentDeleteUserProfileOutput(&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_deserializeOpErrorDeleteUserProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDescribeProject struct { -} - -func (*awsAwsjson11_deserializeOpDescribeProject) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDescribeProject) HandleDeserialize(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_deserializeOpErrorDescribeProject(response, &metadata) - } - output := &DescribeProjectOutput{} - 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_deserializeOpDocumentDescribeProjectOutput(&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_deserializeOpErrorDescribeProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("InvalidServiceRoleException", errorCode): - return awsAwsjson11_deserializeErrorInvalidServiceRoleException(response, errorBody) - - case strings.EqualFold("ProjectConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorProjectConfigurationException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDescribeUserProfile struct { -} - -func (*awsAwsjson11_deserializeOpDescribeUserProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDescribeUserProfile) HandleDeserialize(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_deserializeOpErrorDescribeUserProfile(response, &metadata) - } - output := &DescribeUserProfileOutput{} - 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_deserializeOpDocumentDescribeUserProfileOutput(&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_deserializeOpErrorDescribeUserProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("UserProfileNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserProfileNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpDisassociateTeamMember struct { -} - -func (*awsAwsjson11_deserializeOpDisassociateTeamMember) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpDisassociateTeamMember) HandleDeserialize(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_deserializeOpErrorDisassociateTeamMember(response, &metadata) - } - output := &DisassociateTeamMemberOutput{} - 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_deserializeOpDocumentDisassociateTeamMemberOutput(&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_deserializeOpErrorDisassociateTeamMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("InvalidServiceRoleException", errorCode): - return awsAwsjson11_deserializeErrorInvalidServiceRoleException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpListProjects struct { -} - -func (*awsAwsjson11_deserializeOpListProjects) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_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) - 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_deserializeOpErrorListProjects(response, &metadata) - } - output := &ListProjectsOutput{} - 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_deserializeOpDocumentListProjectsOutput(&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_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)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpListResources struct { -} - -func (*awsAwsjson11_deserializeOpListResources) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpListResources) HandleDeserialize(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_deserializeOpErrorListResources(response, &metadata) - } - output := &ListResourcesOutput{} - 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_deserializeOpDocumentListResourcesOutput(&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_deserializeOpErrorListResources(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpListTagsForProject struct { -} - -func (*awsAwsjson11_deserializeOpListTagsForProject) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpListTagsForProject) HandleDeserialize(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_deserializeOpErrorListTagsForProject(response, &metadata) - } - output := &ListTagsForProjectOutput{} - 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_deserializeOpDocumentListTagsForProjectOutput(&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_deserializeOpErrorListTagsForProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpListTeamMembers struct { -} - -func (*awsAwsjson11_deserializeOpListTeamMembers) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpListTeamMembers) HandleDeserialize(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_deserializeOpErrorListTeamMembers(response, &metadata) - } - output := &ListTeamMembersOutput{} - 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_deserializeOpDocumentListTeamMembersOutput(&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_deserializeOpErrorListTeamMembers(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpListUserProfiles struct { -} - -func (*awsAwsjson11_deserializeOpListUserProfiles) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpListUserProfiles) HandleDeserialize(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_deserializeOpErrorListUserProfiles(response, &metadata) - } - output := &ListUserProfilesOutput{} - 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_deserializeOpDocumentListUserProfilesOutput(&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_deserializeOpErrorListUserProfiles(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("InvalidNextTokenException", errorCode): - return awsAwsjson11_deserializeErrorInvalidNextTokenException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpTagProject struct { -} - -func (*awsAwsjson11_deserializeOpTagProject) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpTagProject) HandleDeserialize(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_deserializeOpErrorTagProject(response, &metadata) - } - output := &TagProjectOutput{} - 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_deserializeOpDocumentTagProjectOutput(&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_deserializeOpErrorTagProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUntagProject struct { -} - -func (*awsAwsjson11_deserializeOpUntagProject) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUntagProject) HandleDeserialize(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_deserializeOpErrorUntagProject(response, &metadata) - } - output := &UntagProjectOutput{} - 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_deserializeOpDocumentUntagProjectOutput(&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_deserializeOpErrorUntagProject(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUpdateProject struct { -} - -func (*awsAwsjson11_deserializeOpUpdateProject) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_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) - 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_deserializeOpErrorUpdateProject(response, &metadata) - } - output := &UpdateProjectOutput{} - 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_deserializeOpDocumentUpdateProjectOutput(&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_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)} - } - errorBody := bytes.NewReader(errorBuffer.Bytes()) - - errorCode := "UnknownError" - errorMessage := errorCode - - headerCode := response.Header.Get("X-Amzn-ErrorType") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUpdateTeamMember struct { -} - -func (*awsAwsjson11_deserializeOpUpdateTeamMember) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUpdateTeamMember) HandleDeserialize(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_deserializeOpErrorUpdateTeamMember(response, &metadata) - } - output := &UpdateTeamMemberOutput{} - 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_deserializeOpDocumentUpdateTeamMemberOutput(&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_deserializeOpErrorUpdateTeamMember(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("ConcurrentModificationException", errorCode): - return awsAwsjson11_deserializeErrorConcurrentModificationException(response, errorBody) - - case strings.EqualFold("InvalidServiceRoleException", errorCode): - return awsAwsjson11_deserializeErrorInvalidServiceRoleException(response, errorBody) - - case strings.EqualFold("LimitExceededException", errorCode): - return awsAwsjson11_deserializeErrorLimitExceededException(response, errorBody) - - case strings.EqualFold("ProjectConfigurationException", errorCode): - return awsAwsjson11_deserializeErrorProjectConfigurationException(response, errorBody) - - case strings.EqualFold("ProjectNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorProjectNotFoundException(response, errorBody) - - case strings.EqualFold("TeamMemberNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorTeamMemberNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -type awsAwsjson11_deserializeOpUpdateUserProfile struct { -} - -func (*awsAwsjson11_deserializeOpUpdateUserProfile) ID() string { - return "OperationDeserializer" -} - -func (m *awsAwsjson11_deserializeOpUpdateUserProfile) HandleDeserialize(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_deserializeOpErrorUpdateUserProfile(response, &metadata) - } - output := &UpdateUserProfileOutput{} - 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_deserializeOpDocumentUpdateUserProfileOutput(&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_deserializeOpErrorUpdateUserProfile(response *smithyhttp.Response, metadata *middleware.Metadata) error { - var errorBuffer bytes.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") - - var buff [1024]byte - ringBuffer := smithyio.NewRingBuffer(buff[:]) - - body := io.TeeReader(errorBody, ringBuffer) - decoder := json.NewDecoder(body) - decoder.UseNumber() - bodyInfo, err := getProtocolErrorInfo(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 typ, ok := resolveProtocolErrorType(headerCode, bodyInfo); ok { - errorCode = restjson.SanitizeErrorCode(typ) - } - if len(bodyInfo.Message) != 0 { - errorMessage = bodyInfo.Message - } - switch { - case strings.EqualFold("UserProfileNotFoundException", errorCode): - return awsAwsjson11_deserializeErrorUserProfileNotFoundException(response, errorBody) - - case strings.EqualFold("ValidationException", errorCode): - return awsAwsjson11_deserializeErrorValidationException(response, errorBody) - - default: - genericError := &smithy.GenericAPIError{ - Code: errorCode, - Message: errorMessage, - } - return genericError - - } -} - -func awsAwsjson11_deserializeErrorConcurrentModificationException(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.ConcurrentModificationException{} - err := awsAwsjson11_deserializeDocumentConcurrentModificationException(&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_deserializeErrorInvalidNextTokenException(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.InvalidNextTokenException{} - err := awsAwsjson11_deserializeDocumentInvalidNextTokenException(&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_deserializeErrorInvalidServiceRoleException(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.InvalidServiceRoleException{} - err := awsAwsjson11_deserializeDocumentInvalidServiceRoleException(&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_deserializeErrorLimitExceededException(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.LimitExceededException{} - err := awsAwsjson11_deserializeDocumentLimitExceededException(&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_deserializeErrorProjectAlreadyExistsException(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.ProjectAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentProjectAlreadyExistsException(&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_deserializeErrorProjectConfigurationException(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.ProjectConfigurationException{} - err := awsAwsjson11_deserializeDocumentProjectConfigurationException(&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_deserializeErrorProjectCreationFailedException(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.ProjectCreationFailedException{} - err := awsAwsjson11_deserializeDocumentProjectCreationFailedException(&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_deserializeErrorProjectNotFoundException(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.ProjectNotFoundException{} - err := awsAwsjson11_deserializeDocumentProjectNotFoundException(&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_deserializeErrorTeamMemberAlreadyAssociatedException(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.TeamMemberAlreadyAssociatedException{} - err := awsAwsjson11_deserializeDocumentTeamMemberAlreadyAssociatedException(&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_deserializeErrorTeamMemberNotFoundException(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.TeamMemberNotFoundException{} - err := awsAwsjson11_deserializeDocumentTeamMemberNotFoundException(&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_deserializeErrorUserProfileAlreadyExistsException(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.UserProfileAlreadyExistsException{} - err := awsAwsjson11_deserializeDocumentUserProfileAlreadyExistsException(&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_deserializeErrorUserProfileNotFoundException(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.UserProfileNotFoundException{} - err := awsAwsjson11_deserializeDocumentUserProfileNotFoundException(&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_deserializeErrorValidationException(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.ValidationException{} - err := awsAwsjson11_deserializeDocumentValidationException(&output, shape) - - if err != nil { - var snapshot bytes.Buffer - io.Copy(&snapshot, ringBuffer) - err = &smithy.DeserializationError{ - Err: fmt.Errorf("failed to decode response body, %w", err), - Snapshot: snapshot.Bytes(), - } - return err - } - - errorBody.Seek(0, io.SeekStart) - return output -} - -func awsAwsjson11_deserializeDocumentConcurrentModificationException(v **types.ConcurrentModificationException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ConcurrentModificationException - if *v == nil { - sv = &types.ConcurrentModificationException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentInvalidNextTokenException(v **types.InvalidNextTokenException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.InvalidNextTokenException - if *v == nil { - sv = &types.InvalidNextTokenException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentInvalidServiceRoleException(v **types.InvalidServiceRoleException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.InvalidServiceRoleException - if *v == nil { - sv = &types.InvalidServiceRoleException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentProjectAlreadyExistsException(v **types.ProjectAlreadyExistsException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ProjectAlreadyExistsException - if *v == nil { - sv = &types.ProjectAlreadyExistsException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentProjectConfigurationException(v **types.ProjectConfigurationException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ProjectConfigurationException - if *v == nil { - sv = &types.ProjectConfigurationException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentProjectCreationFailedException(v **types.ProjectCreationFailedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ProjectCreationFailedException - if *v == nil { - sv = &types.ProjectCreationFailedException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentProjectNotFoundException(v **types.ProjectNotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ProjectNotFoundException - if *v == nil { - sv = &types.ProjectNotFoundException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentProjectsList(v *[]types.ProjectSummary, 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.ProjectSummary - if *v == nil { - cv = []types.ProjectSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.ProjectSummary - destAddr := &col - if err := awsAwsjson11_deserializeDocumentProjectSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentProjectStatus(v **types.ProjectStatus, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ProjectStatus - if *v == nil { - sv = &types.ProjectStatus{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "reason": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Reason to be of type string, got %T instead", value) - } - sv.Reason = ptr.String(jtv) - } - - case "state": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected State to be of type string, got %T instead", value) - } - sv.State = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentProjectSummary(v **types.ProjectSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ProjectSummary - if *v == nil { - sv = &types.ProjectSummary{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "projectArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value) - } - sv.ProjectArn = ptr.String(jtv) - } - - case "projectId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value) - } - sv.ProjectId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentResource(v **types.Resource, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.Resource - if *v == nil { - sv = &types.Resource{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - 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) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentResourcesResult(v *[]types.Resource, 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.Resource - if *v == nil { - cv = []types.Resource{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.Resource - destAddr := &col - if err := awsAwsjson11_deserializeDocumentResource(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentTags(v *map[string]string, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var mv map[string]string - if *v == nil { - mv = map[string]string{} - } else { - mv = *v - } - - for key, value := range shape { - var parsedVal string - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected TagValue to be of type string, got %T instead", value) - } - parsedVal = jtv - } - mv[key] = parsedVal - - } - *v = mv - return nil -} - -func awsAwsjson11_deserializeDocumentTeamMember(v **types.TeamMember, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.TeamMember - if *v == nil { - sv = &types.TeamMember{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "projectRole": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Role to be of type string, got %T instead", value) - } - sv.ProjectRole = ptr.String(jtv) - } - - case "remoteAccessAllowed": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected RemoteAccessAllowed to be of type *bool, got %T instead", value) - } - sv.RemoteAccessAllowed = ptr.Bool(jtv) - } - - case "userArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserArn to be of type string, got %T instead", value) - } - sv.UserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentTeamMemberAlreadyAssociatedException(v **types.TeamMemberAlreadyAssociatedException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.TeamMemberAlreadyAssociatedException - if *v == nil { - sv = &types.TeamMemberAlreadyAssociatedException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentTeamMemberNotFoundException(v **types.TeamMemberNotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.TeamMemberNotFoundException - if *v == nil { - sv = &types.TeamMemberNotFoundException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentTeamMemberResult(v *[]types.TeamMember, 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.TeamMember - if *v == nil { - cv = []types.TeamMember{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.TeamMember - destAddr := &col - if err := awsAwsjson11_deserializeDocumentTeamMember(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentUserProfileAlreadyExistsException(v **types.UserProfileAlreadyExistsException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.UserProfileAlreadyExistsException - if *v == nil { - sv = &types.UserProfileAlreadyExistsException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentUserProfileNotFoundException(v **types.UserProfileNotFoundException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.UserProfileNotFoundException - if *v == nil { - sv = &types.UserProfileNotFoundException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentUserProfilesList(v *[]types.UserProfileSummary, 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.UserProfileSummary - if *v == nil { - cv = []types.UserProfileSummary{} - } else { - cv = *v - } - - for _, value := range shape { - var col types.UserProfileSummary - destAddr := &col - if err := awsAwsjson11_deserializeDocumentUserProfileSummary(&destAddr, value); err != nil { - return err - } - col = *destAddr - cv = append(cv, col) - - } - *v = cv - return nil -} - -func awsAwsjson11_deserializeDocumentUserProfileSummary(v **types.UserProfileSummary, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.UserProfileSummary - if *v == nil { - sv = &types.UserProfileSummary{} - } 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 UserProfileDisplayName to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "emailAddress": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Email to be of type string, got %T instead", value) - } - sv.EmailAddress = ptr.String(jtv) - } - - case "sshPublicKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SshPublicKey to be of type string, got %T instead", value) - } - sv.SshPublicKey = ptr.String(jtv) - } - - case "userArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserArn to be of type string, got %T instead", value) - } - sv.UserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeDocumentValidationException(v **types.ValidationException, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", 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.ValidationException - if *v == nil { - sv = &types.ValidationException{} - } 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 Message to be of type string, got %T instead", value) - } - sv.Message = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentAssociateTeamMemberOutput(v **AssociateTeamMemberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *AssociateTeamMemberOutput - if *v == nil { - sv = &AssociateTeamMemberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "clientRequestToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientRequestToken to be of type string, got %T instead", value) - } - sv.ClientRequestToken = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentCreateProjectOutput(v **CreateProjectOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateProjectOutput - if *v == nil { - sv = &CreateProjectOutput{} - } 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 ProjectArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "clientRequestToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientRequestToken to be of type string, got %T instead", value) - } - sv.ClientRequestToken = ptr.String(jtv) - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "projectTemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectTemplateId to be of type string, got %T instead", value) - } - sv.ProjectTemplateId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentCreateUserProfileOutput(v **CreateUserProfileOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *CreateUserProfileOutput - if *v == nil { - sv = &CreateUserProfileOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "createdTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreatedTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "displayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserProfileDisplayName to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "emailAddress": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Email to be of type string, got %T instead", value) - } - sv.EmailAddress = ptr.String(jtv) - } - - case "lastModifiedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastModifiedTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "sshPublicKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SshPublicKey to be of type string, got %T instead", value) - } - sv.SshPublicKey = ptr.String(jtv) - } - - case "userArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserArn to be of type string, got %T instead", value) - } - sv.UserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_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 "projectArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectArn to be of type string, got %T instead", value) - } - sv.ProjectArn = ptr.String(jtv) - } - - case "stackId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StackId to be of type string, got %T instead", value) - } - sv.StackId = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDeleteUserProfileOutput(v **DeleteUserProfileOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DeleteUserProfileOutput - if *v == nil { - sv = &DeleteUserProfileOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "userArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserArn to be of type string, got %T instead", value) - } - sv.UserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDescribeProjectOutput(v **DescribeProjectOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeProjectOutput - if *v == nil { - sv = &DescribeProjectOutput{} - } 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 ProjectArn to be of type string, got %T instead", value) - } - sv.Arn = ptr.String(jtv) - } - - case "clientRequestToken": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ClientRequestToken to be of type string, got %T instead", value) - } - sv.ClientRequestToken = ptr.String(jtv) - } - - case "createdTimeStamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimeStamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreatedTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "description": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectDescription to be of type string, got %T instead", value) - } - sv.Description = ptr.String(jtv) - } - - case "id": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectId to be of type string, got %T instead", value) - } - sv.Id = ptr.String(jtv) - } - - case "name": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectName to be of type string, got %T instead", value) - } - sv.Name = ptr.String(jtv) - } - - case "projectTemplateId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected ProjectTemplateId to be of type string, got %T instead", value) - } - sv.ProjectTemplateId = ptr.String(jtv) - } - - case "stackId": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected StackId to be of type string, got %T instead", value) - } - sv.StackId = ptr.String(jtv) - } - - case "status": - if err := awsAwsjson11_deserializeDocumentProjectStatus(&sv.Status, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDescribeUserProfileOutput(v **DescribeUserProfileOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DescribeUserProfileOutput - if *v == nil { - sv = &DescribeUserProfileOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "createdTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreatedTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "displayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserProfileDisplayName to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "emailAddress": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Email to be of type string, got %T instead", value) - } - sv.EmailAddress = ptr.String(jtv) - } - - case "lastModifiedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastModifiedTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "sshPublicKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SshPublicKey to be of type string, got %T instead", value) - } - sv.SshPublicKey = ptr.String(jtv) - } - - case "userArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserArn to be of type string, got %T instead", value) - } - sv.UserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentDisassociateTeamMemberOutput(v **DisassociateTeamMemberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *DisassociateTeamMemberOutput - if *v == nil { - sv = &DisassociateTeamMemberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListProjectsOutput(v **ListProjectsOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListProjectsOutput - if *v == nil { - sv = &ListProjectsOutput{} - } 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 PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "projects": - if err := awsAwsjson11_deserializeDocumentProjectsList(&sv.Projects, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListResourcesOutput(v **ListResourcesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListResourcesOutput - if *v == nil { - sv = &ListResourcesOutput{} - } 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 PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "resources": - if err := awsAwsjson11_deserializeDocumentResourcesResult(&sv.Resources, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListTagsForProjectOutput(v **ListTagsForProjectOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListTagsForProjectOutput - if *v == nil { - sv = &ListTagsForProjectOutput{} - } 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 PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "tags": - if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListTeamMembersOutput(v **ListTeamMembersOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListTeamMembersOutput - if *v == nil { - sv = &ListTeamMembersOutput{} - } 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 PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "teamMembers": - if err := awsAwsjson11_deserializeDocumentTeamMemberResult(&sv.TeamMembers, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentListUserProfilesOutput(v **ListUserProfilesOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *ListUserProfilesOutput - if *v == nil { - sv = &ListUserProfilesOutput{} - } 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 PaginationToken to be of type string, got %T instead", value) - } - sv.NextToken = ptr.String(jtv) - } - - case "userProfiles": - if err := awsAwsjson11_deserializeDocumentUserProfilesList(&sv.UserProfiles, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentTagProjectOutput(v **TagProjectOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *TagProjectOutput - if *v == nil { - sv = &TagProjectOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "tags": - if err := awsAwsjson11_deserializeDocumentTags(&sv.Tags, value); err != nil { - return err - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentUntagProjectOutput(v **UntagProjectOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UntagProjectOutput - if *v == nil { - sv = &UntagProjectOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentUpdateProjectOutput(v **UpdateProjectOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateProjectOutput - if *v == nil { - sv = &UpdateProjectOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentUpdateTeamMemberOutput(v **UpdateTeamMemberOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateTeamMemberOutput - if *v == nil { - sv = &UpdateTeamMemberOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "projectRole": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Role to be of type string, got %T instead", value) - } - sv.ProjectRole = ptr.String(jtv) - } - - case "remoteAccessAllowed": - if value != nil { - jtv, ok := value.(bool) - if !ok { - return fmt.Errorf("expected RemoteAccessAllowed to be of type *bool, got %T instead", value) - } - sv.RemoteAccessAllowed = ptr.Bool(jtv) - } - - case "userArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserArn to be of type string, got %T instead", value) - } - sv.UserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -func awsAwsjson11_deserializeOpDocumentUpdateUserProfileOutput(v **UpdateUserProfileOutput, value interface{}) error { - if v == nil { - return fmt.Errorf("unexpected nil of type %T", v) - } - if value == nil { - return nil - } - - shape, ok := value.(map[string]interface{}) - if !ok { - return fmt.Errorf("unexpected JSON type %v", value) - } - - var sv *UpdateUserProfileOutput - if *v == nil { - sv = &UpdateUserProfileOutput{} - } else { - sv = *v - } - - for key, value := range shape { - switch key { - case "createdTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.CreatedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected CreatedTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "displayName": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserProfileDisplayName to be of type string, got %T instead", value) - } - sv.DisplayName = ptr.String(jtv) - } - - case "emailAddress": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected Email to be of type string, got %T instead", value) - } - sv.EmailAddress = ptr.String(jtv) - } - - case "lastModifiedTimestamp": - if value != nil { - switch jtv := value.(type) { - case json.Number: - f64, err := jtv.Float64() - if err != nil { - return err - } - sv.LastModifiedTimestamp = ptr.Time(smithytime.ParseEpochSeconds(f64)) - - default: - return fmt.Errorf("expected LastModifiedTimestamp to be a JSON Number, got %T instead", value) - - } - } - - case "sshPublicKey": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected SshPublicKey to be of type string, got %T instead", value) - } - sv.SshPublicKey = ptr.String(jtv) - } - - case "userArn": - if value != nil { - jtv, ok := value.(string) - if !ok { - return fmt.Errorf("expected UserArn to be of type string, got %T instead", value) - } - sv.UserArn = ptr.String(jtv) - } - - default: - _, _ = key, value - - } - } - *v = sv - return nil -} - -type protocolErrorInfo struct { - Type string `json:"__type"` - Message string - Code any // nonstandard for awsjson but some services do present the type here -} - -func getProtocolErrorInfo(decoder *json.Decoder) (protocolErrorInfo, error) { - var errInfo protocolErrorInfo - if err := decoder.Decode(&errInfo); err != nil { - if err == io.EOF { - return errInfo, nil - } - return errInfo, err - } - - return errInfo, nil -} - -func resolveProtocolErrorType(headerType string, bodyInfo protocolErrorInfo) (string, bool) { - if len(headerType) != 0 { - return headerType, true - } else if len(bodyInfo.Type) != 0 { - return bodyInfo.Type, true - } else if code, ok := bodyInfo.Code.(string); ok && len(code) != 0 { - return code, true - } - return "", false -} diff --git a/service/codestar/doc.go b/service/codestar/doc.go deleted file mode 100644 index c1bf0fb80c2..00000000000 --- a/service/codestar/doc.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -// Package codestar provides the API client, operations, and parameter types for -// AWS CodeStar. -// -// # AWS CodeStar -// -// This is the API reference for AWS CodeStar. This reference provides -// descriptions of the operations and data types for the AWS CodeStar API along -// with usage examples. -// -// You can use the AWS CodeStar API to work with: -// -// Projects and their resources, by calling the following: -// -// - DeleteProject , which deletes a project. -// -// - DescribeProject , which lists the attributes of a project. -// -// - ListProjects , which lists all projects associated with your AWS account. -// -// - ListResources , which lists the resources associated with a project. -// -// - ListTagsForProject , which lists the tags associated with a project. -// -// - TagProject , which adds tags to a project. -// -// - UntagProject , which removes tags from a project. -// -// - UpdateProject , which updates the attributes of a project. -// -// Teams and team members, by calling the following: -// -// - AssociateTeamMember , which adds an IAM user to the team for a project. -// -// - DisassociateTeamMember , which removes an IAM user from the team for a -// project. -// -// - ListTeamMembers , which lists all the IAM users in the team for a project, -// including their roles and attributes. -// -// - UpdateTeamMember , which updates a team member's attributes in a project. -// -// Users, by calling the following: -// -// - CreateUserProfile , which creates a user profile that contains data -// associated with the user across all projects. -// -// - DeleteUserProfile , which deletes all user profile information across all -// projects. -// -// - DescribeUserProfile , which describes the profile of a user. -// -// - ListUserProfiles , which lists all user profiles. -// -// - UpdateUserProfile , which updates the profile for a user. -package codestar diff --git a/service/codestar/endpoints.go b/service/codestar/endpoints.go deleted file mode 100644 index 6667374f378..00000000000 --- a/service/codestar/endpoints.go +++ /dev/null @@ -1,531 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "errors" - "fmt" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalConfig "github.com/aws/aws-sdk-go-v2/internal/configsources" - "github.com/aws/aws-sdk-go-v2/internal/endpoints" - "github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn" - internalendpoints "github.com/aws/aws-sdk-go-v2/service/codestar/internal/endpoints" - smithyauth "github.com/aws/smithy-go/auth" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/middleware" - "github.com/aws/smithy-go/ptr" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" - "net/url" - "os" - "strings" -) - -// EndpointResolverOptions is the service endpoint resolver options -type EndpointResolverOptions = internalendpoints.Options - -// EndpointResolver interface for resolving service endpoints. -type EndpointResolver interface { - ResolveEndpoint(region string, options EndpointResolverOptions) (aws.Endpoint, error) -} - -var _ EndpointResolver = &internalendpoints.Resolver{} - -// NewDefaultEndpointResolver constructs a new service endpoint resolver -func NewDefaultEndpointResolver() *internalendpoints.Resolver { - return internalendpoints.New() -} - -// EndpointResolverFunc is a helper utility that wraps a function so it satisfies -// the EndpointResolver interface. This is useful when you want to add additional -// endpoint resolving logic, or stub out specific endpoints with custom values. -type EndpointResolverFunc func(region string, options EndpointResolverOptions) (aws.Endpoint, error) - -func (fn EndpointResolverFunc) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return fn(region, options) -} - -// EndpointResolverFromURL returns an EndpointResolver configured using the -// provided endpoint url. By default, the resolved endpoint resolver uses the -// client region as signing region, and the endpoint source is set to -// EndpointSourceCustom.You can provide functional options to configure endpoint -// values for the resolved endpoint. -func EndpointResolverFromURL(url string, optFns ...func(*aws.Endpoint)) EndpointResolver { - e := aws.Endpoint{URL: url, Source: aws.EndpointSourceCustom} - for _, fn := range optFns { - fn(&e) - } - - return EndpointResolverFunc( - func(region string, options EndpointResolverOptions) (aws.Endpoint, error) { - if len(e.SigningRegion) == 0 { - e.SigningRegion = region - } - return e, nil - }, - ) -} - -type ResolveEndpoint struct { - Resolver EndpointResolver - Options EndpointResolverOptions -} - -func (*ResolveEndpoint) ID() string { - return "ResolveEndpoint" -} - -func (m *ResolveEndpoint) HandleSerialize(ctx context.Context, in middleware.SerializeInput, next middleware.SerializeHandler) ( - out middleware.SerializeOutput, metadata middleware.Metadata, err error, -) { - if !awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleSerialize(ctx, in) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.Resolver == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - eo := m.Options - eo.Logger = middleware.GetLogger(ctx) - - var endpoint aws.Endpoint - endpoint, err = m.Resolver.ResolveEndpoint(awsmiddleware.GetRegion(ctx), eo) - if err != nil { - nf := (&aws.EndpointNotFoundError{}) - if errors.As(err, &nf) { - ctx = awsmiddleware.SetRequiresLegacyEndpoints(ctx, false) - return next.HandleSerialize(ctx, in) - } - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - req.URL, err = url.Parse(endpoint.URL) - if err != nil { - return out, metadata, fmt.Errorf("failed to parse endpoint URL: %w", err) - } - - if len(awsmiddleware.GetSigningName(ctx)) == 0 { - signingName := endpoint.SigningName - if len(signingName) == 0 { - signingName = "codestar" - } - ctx = awsmiddleware.SetSigningName(ctx, signingName) - } - ctx = awsmiddleware.SetEndpointSource(ctx, endpoint.Source) - ctx = smithyhttp.SetHostnameImmutable(ctx, endpoint.HostnameImmutable) - ctx = awsmiddleware.SetSigningRegion(ctx, endpoint.SigningRegion) - ctx = awsmiddleware.SetPartitionID(ctx, endpoint.PartitionID) - return next.HandleSerialize(ctx, in) -} -func addResolveEndpointMiddleware(stack *middleware.Stack, o Options) error { - return stack.Serialize.Insert(&ResolveEndpoint{ - Resolver: o.EndpointResolver, - Options: o.EndpointOptions, - }, "OperationSerializer", middleware.Before) -} - -func removeResolveEndpointMiddleware(stack *middleware.Stack) error { - _, err := stack.Serialize.Remove((&ResolveEndpoint{}).ID()) - return err -} - -type wrappedEndpointResolver struct { - awsResolver aws.EndpointResolverWithOptions -} - -func (w *wrappedEndpointResolver) ResolveEndpoint(region string, options EndpointResolverOptions) (endpoint aws.Endpoint, err error) { - return w.awsResolver.ResolveEndpoint(ServiceID, region, options) -} - -type awsEndpointResolverAdaptor func(service, region string) (aws.Endpoint, error) - -func (a awsEndpointResolverAdaptor) ResolveEndpoint(service, region string, options ...interface{}) (aws.Endpoint, error) { - return a(service, region) -} - -var _ aws.EndpointResolverWithOptions = awsEndpointResolverAdaptor(nil) - -// withEndpointResolver returns an aws.EndpointResolverWithOptions that first delegates endpoint resolution to the awsResolver. -// If awsResolver returns aws.EndpointNotFoundError error, the v1 resolver middleware will swallow the error, -// and set an appropriate context flag such that fallback will occur when EndpointResolverV2 is invoked -// via its middleware. -// -// If another error (besides aws.EndpointNotFoundError) is returned, then that error will be propagated. -func withEndpointResolver(awsResolver aws.EndpointResolver, awsResolverWithOptions aws.EndpointResolverWithOptions) EndpointResolver { - var resolver aws.EndpointResolverWithOptions - - if awsResolverWithOptions != nil { - resolver = awsResolverWithOptions - } else if awsResolver != nil { - resolver = awsEndpointResolverAdaptor(awsResolver.ResolveEndpoint) - } - - return &wrappedEndpointResolver{ - awsResolver: resolver, - } -} - -func finalizeClientEndpointResolverOptions(options *Options) { - options.EndpointOptions.LogDeprecated = options.ClientLogMode.IsDeprecatedUsage() - - if len(options.EndpointOptions.ResolvedRegion) == 0 { - const fipsInfix = "-fips-" - const fipsPrefix = "fips-" - const fipsSuffix = "-fips" - - if strings.Contains(options.Region, fipsInfix) || - strings.Contains(options.Region, fipsPrefix) || - strings.Contains(options.Region, fipsSuffix) { - options.EndpointOptions.ResolvedRegion = strings.ReplaceAll(strings.ReplaceAll(strings.ReplaceAll( - options.Region, fipsInfix, "-"), fipsPrefix, ""), fipsSuffix, "") - options.EndpointOptions.UseFIPSEndpoint = aws.FIPSEndpointStateEnabled - } - } - -} - -func resolveEndpointResolverV2(options *Options) { - if options.EndpointResolverV2 == nil { - options.EndpointResolverV2 = NewDefaultEndpointResolverV2() - } -} - -func resolveBaseEndpoint(cfg aws.Config, o *Options) { - if cfg.BaseEndpoint != nil { - o.BaseEndpoint = cfg.BaseEndpoint - } - - _, g := os.LookupEnv("AWS_ENDPOINT_URL") - _, s := os.LookupEnv("AWS_ENDPOINT_URL_CODESTAR") - - if g && !s { - return - } - - value, found, err := internalConfig.ResolveServiceBaseEndpoint(context.Background(), "CodeStar", cfg.ConfigSources) - if found && err == nil { - o.BaseEndpoint = &value - } -} - -func bindRegion(region string) *string { - if region == "" { - return nil - } - return aws.String(endpoints.MapFIPSRegion(region)) -} - -// EndpointParameters provides the parameters that influence how endpoints are -// resolved. -type EndpointParameters struct { - // The AWS region used to dispatch the request. - // - // Parameter is - // required. - // - // AWS::Region - Region *string - - // When true, use the dual-stack endpoint. If the configured endpoint does not - // support dual-stack, dispatching the request MAY return an error. - // - // Defaults to - // false if no value is provided. - // - // AWS::UseDualStack - UseDualStack *bool - - // When true, send this request to the FIPS-compliant regional endpoint. If the - // configured endpoint does not have a FIPS compliant endpoint, dispatching the - // request will return an error. - // - // Defaults to false if no value is - // provided. - // - // AWS::UseFIPS - UseFIPS *bool - - // Override the endpoint used to send this request - // - // Parameter is - // required. - // - // SDK::Endpoint - Endpoint *string -} - -// ValidateRequired validates required parameters are set. -func (p EndpointParameters) ValidateRequired() error { - if p.UseDualStack == nil { - return fmt.Errorf("parameter UseDualStack is required") - } - - if p.UseFIPS == nil { - return fmt.Errorf("parameter UseFIPS is required") - } - - return nil -} - -// WithDefaults returns a shallow copy of EndpointParameterswith default values -// applied to members where applicable. -func (p EndpointParameters) WithDefaults() EndpointParameters { - if p.UseDualStack == nil { - p.UseDualStack = ptr.Bool(false) - } - - if p.UseFIPS == nil { - p.UseFIPS = ptr.Bool(false) - } - return p -} - -type stringSlice []string - -func (s stringSlice) Get(i int) *string { - if i < 0 || i >= len(s) { - return nil - } - - v := s[i] - return &v -} - -// EndpointResolverV2 provides the interface for resolving service endpoints. -type EndpointResolverV2 interface { - // ResolveEndpoint attempts to resolve the endpoint with the provided options, - // returning the endpoint if found. Otherwise an error is returned. - ResolveEndpoint(ctx context.Context, params EndpointParameters) ( - smithyendpoints.Endpoint, error, - ) -} - -// resolver provides the implementation for resolving endpoints. -type resolver struct{} - -func NewDefaultEndpointResolverV2() EndpointResolverV2 { - return &resolver{} -} - -// ResolveEndpoint attempts to resolve the endpoint with the provided options, -// returning the endpoint if found. Otherwise an error is returned. -func (r *resolver) ResolveEndpoint( - ctx context.Context, params EndpointParameters, -) ( - endpoint smithyendpoints.Endpoint, err error, -) { - params = params.WithDefaults() - if err = params.ValidateRequired(); err != nil { - return endpoint, fmt.Errorf("endpoint parameters are not valid, %w", err) - } - _UseDualStack := *params.UseDualStack - _UseFIPS := *params.UseFIPS - - if exprVal := params.Endpoint; exprVal != nil { - _Endpoint := *exprVal - _ = _Endpoint - if _UseFIPS == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: FIPS and custom endpoint are not supported") - } - if _UseDualStack == true { - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Dualstack and custom endpoint are not supported") - } - uriString := _Endpoint - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - if exprVal := params.Region; exprVal != nil { - _Region := *exprVal - _ = _Region - if exprVal := awsrulesfn.GetPartition(_Region); exprVal != nil { - _PartitionResult := *exprVal - _ = _PartitionResult - if _UseFIPS == true { - if _UseDualStack == true { - if true == _PartitionResult.SupportsFIPS { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://codestar-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS and DualStack are enabled, but this partition does not support one or both") - } - } - if _UseFIPS == true { - if _PartitionResult.SupportsFIPS == true { - uriString := func() string { - var out strings.Builder - out.WriteString("https://codestar-fips.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "FIPS is enabled but this partition does not support FIPS") - } - if _UseDualStack == true { - if true == _PartitionResult.SupportsDualStack { - uriString := func() string { - var out strings.Builder - out.WriteString("https://codestar.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DualStackDnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "DualStack is enabled but this partition does not support DualStack") - } - uriString := func() string { - var out strings.Builder - out.WriteString("https://codestar.") - out.WriteString(_Region) - out.WriteString(".") - out.WriteString(_PartitionResult.DnsSuffix) - return out.String() - }() - - uri, err := url.Parse(uriString) - if err != nil { - return endpoint, fmt.Errorf("Failed to parse uri: %s", uriString) - } - - return smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - }, nil - } - return endpoint, fmt.Errorf("Endpoint resolution failed. Invalid operation or environment input.") - } - return endpoint, fmt.Errorf("endpoint rule error, %s", "Invalid Configuration: Missing Region") -} - -type endpointParamsBinder interface { - bindEndpointParams(*EndpointParameters) -} - -func bindEndpointParams(ctx context.Context, input interface{}, options Options) *EndpointParameters { - params := &EndpointParameters{} - - params.Region = bindRegion(options.Region) - params.UseDualStack = aws.Bool(options.EndpointOptions.UseDualStackEndpoint == aws.DualStackEndpointStateEnabled) - params.UseFIPS = aws.Bool(options.EndpointOptions.UseFIPSEndpoint == aws.FIPSEndpointStateEnabled) - params.Endpoint = options.BaseEndpoint - - if b, ok := input.(endpointParamsBinder); ok { - b.bindEndpointParams(params) - } - - return params -} - -type resolveEndpointV2Middleware struct { - options Options -} - -func (*resolveEndpointV2Middleware) ID() string { - return "ResolveEndpointV2" -} - -func (m *resolveEndpointV2Middleware) HandleFinalize(ctx context.Context, in middleware.FinalizeInput, next middleware.FinalizeHandler) ( - out middleware.FinalizeOutput, metadata middleware.Metadata, err error, -) { - if awsmiddleware.GetRequiresLegacyEndpoints(ctx) { - return next.HandleFinalize(ctx, in) - } - - if err := checkAccountID(getIdentity(ctx), m.options.AccountIDEndpointMode); err != nil { - return out, metadata, fmt.Errorf("invalid accountID set: %w", err) - } - - req, ok := in.Request.(*smithyhttp.Request) - if !ok { - return out, metadata, fmt.Errorf("unknown transport type %T", in.Request) - } - - if m.options.EndpointResolverV2 == nil { - return out, metadata, fmt.Errorf("expected endpoint resolver to not be nil") - } - - params := bindEndpointParams(ctx, getOperationInput(ctx), m.options) - endpt, err := m.options.EndpointResolverV2.ResolveEndpoint(ctx, *params) - if err != nil { - return out, metadata, fmt.Errorf("failed to resolve service endpoint, %w", err) - } - - if endpt.URI.RawPath == "" && req.URL.RawPath != "" { - endpt.URI.RawPath = endpt.URI.Path - } - req.URL.Scheme = endpt.URI.Scheme - req.URL.Host = endpt.URI.Host - req.URL.Path = smithyhttp.JoinPath(endpt.URI.Path, req.URL.Path) - req.URL.RawPath = smithyhttp.JoinPath(endpt.URI.RawPath, req.URL.RawPath) - for k := range endpt.Headers { - req.Header.Set(k, endpt.Headers.Get(k)) - } - - rscheme := getResolvedAuthScheme(ctx) - if rscheme == nil { - return out, metadata, fmt.Errorf("no resolved auth scheme") - } - - opts, _ := smithyauth.GetAuthOptions(&endpt.Properties) - for _, o := range opts { - rscheme.SignerProperties.SetAll(&o.SignerProperties) - } - - return next.HandleFinalize(ctx, in) -} diff --git a/service/codestar/endpoints_config_test.go b/service/codestar/endpoints_config_test.go deleted file mode 100644 index ae2c83cbccb..00000000000 --- a/service/codestar/endpoints_config_test.go +++ /dev/null @@ -1,139 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - "os" - "reflect" - "testing" -) - -type mockConfigSource struct { - global string - service string - ignore bool -} - -// GetIgnoreConfiguredEndpoints is used in knowing when to disable configured -// endpoints feature. -func (m mockConfigSource) GetIgnoreConfiguredEndpoints(context.Context) (bool, bool, error) { - return m.ignore, m.ignore, nil -} - -// GetServiceBaseEndpoint is used to retrieve a normalized SDK ID for use -// with configured endpoints. -func (m mockConfigSource) GetServiceBaseEndpoint(ctx context.Context, sdkID string) (string, bool, error) { - if m.service != "" { - return m.service, true, nil - } - return "", false, nil -} - -func TestResolveBaseEndpoint(t *testing.T) { - cases := map[string]struct { - envGlobal string - envService string - envIgnore bool - configGlobal string - configService string - configIgnore bool - clientEndpoint *string - expectURL *string - }{ - "env ignore": { - envGlobal: "https://env-global.dev", - envService: "https://env-codestar.dev", - envIgnore: true, - configGlobal: "http://config-global.dev", - configService: "http://config-codestar.dev", - expectURL: nil, - }, - "env global": { - envGlobal: "https://env-global.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-codestar.dev", - expectURL: aws.String("https://env-global.dev"), - }, - "env service": { - envGlobal: "https://env-global.dev", - envService: "https://env-codestar.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-codestar.dev", - expectURL: aws.String("https://env-codestar.dev"), - }, - "config ignore": { - envGlobal: "https://env-global.dev", - envService: "https://env-codestar.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-codestar.dev", - configIgnore: true, - expectURL: nil, - }, - "config global": { - configGlobal: "http://config-global.dev", - expectURL: aws.String("http://config-global.dev"), - }, - "config service": { - configGlobal: "http://config-global.dev", - configService: "http://config-codestar.dev", - expectURL: aws.String("http://config-codestar.dev"), - }, - "client": { - envGlobal: "https://env-global.dev", - envService: "https://env-codestar.dev", - configGlobal: "http://config-global.dev", - configService: "http://config-codestar.dev", - clientEndpoint: aws.String("https://client-codestar.dev"), - expectURL: aws.String("https://client-codestar.dev"), - }, - } - - for name, c := range cases { - t.Run(name, func(t *testing.T) { - os.Clearenv() - - awsConfig := aws.Config{} - ignore := c.envIgnore || c.configIgnore - - if c.configGlobal != "" && !ignore { - awsConfig.BaseEndpoint = aws.String(c.configGlobal) - } - - if c.envGlobal != "" { - t.Setenv("AWS_ENDPOINT_URL", c.envGlobal) - if !ignore { - awsConfig.BaseEndpoint = aws.String(c.envGlobal) - } - } - - if c.envService != "" { - t.Setenv("AWS_ENDPOINT_URL_CODESTAR", c.envService) - } - - awsConfig.ConfigSources = []interface{}{ - mockConfigSource{ - global: c.envGlobal, - service: c.envService, - ignore: c.envIgnore, - }, - mockConfigSource{ - global: c.configGlobal, - service: c.configService, - ignore: c.configIgnore, - }, - } - - client := NewFromConfig(awsConfig, func(o *Options) { - if c.clientEndpoint != nil { - o.BaseEndpoint = c.clientEndpoint - } - }) - - if e, a := c.expectURL, client.options.BaseEndpoint; !reflect.DeepEqual(e, a) { - t.Errorf("expect endpoint %v , got %v", e, a) - } - }) - } -} diff --git a/service/codestar/endpoints_test.go b/service/codestar/endpoints_test.go deleted file mode 100644 index 299226f2807..00000000000 --- a/service/codestar/endpoints_test.go +++ /dev/null @@ -1,1264 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - smithy "github.com/aws/smithy-go" - smithyendpoints "github.com/aws/smithy-go/endpoints" - "github.com/aws/smithy-go/ptr" - "net/http" - "net/url" - "reflect" - "strings" - "testing" -) - -// For region ap-northeast-1 with FIPS disabled and DualStack disabled -func TestEndpointCase0(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("ap-northeast-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.ap-northeast-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region ap-northeast-2 with FIPS disabled and DualStack disabled -func TestEndpointCase1(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("ap-northeast-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.ap-northeast-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region ap-southeast-1 with FIPS disabled and DualStack disabled -func TestEndpointCase2(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("ap-southeast-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.ap-southeast-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region ap-southeast-2 with FIPS disabled and DualStack disabled -func TestEndpointCase3(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("ap-southeast-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.ap-southeast-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region ca-central-1 with FIPS disabled and DualStack disabled -func TestEndpointCase4(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("ca-central-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.ca-central-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region eu-central-1 with FIPS disabled and DualStack disabled -func TestEndpointCase5(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("eu-central-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.eu-central-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region eu-north-1 with FIPS disabled and DualStack disabled -func TestEndpointCase6(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("eu-north-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.eu-north-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region eu-west-1 with FIPS disabled and DualStack disabled -func TestEndpointCase7(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("eu-west-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.eu-west-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region eu-west-2 with FIPS disabled and DualStack disabled -func TestEndpointCase8(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("eu-west-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.eu-west-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase9(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-2 with FIPS disabled and DualStack disabled -func TestEndpointCase10(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-east-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-west-1 with FIPS disabled and DualStack disabled -func TestEndpointCase11(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-west-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-west-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-west-2 with FIPS disabled and DualStack disabled -func TestEndpointCase12(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-west-2"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-west-2.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase13(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar-fips.us-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase14(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar-fips.us-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase15(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS enabled and DualStack enabled -func TestEndpointCase16(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar-fips.cn-north-1.api.amazonwebservices.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS enabled and DualStack disabled -func TestEndpointCase17(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar-fips.cn-north-1.amazonaws.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS disabled and DualStack enabled -func TestEndpointCase18(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.cn-north-1.api.amazonwebservices.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region cn-north-1 with FIPS disabled and DualStack disabled -func TestEndpointCase19(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("cn-north-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.cn-north-1.amazonaws.com.cn") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase20(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar-fips.us-gov-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase21(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar-fips.us-gov-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase22(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-gov-east-1.api.aws") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-gov-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase23(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-gov-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-gov-east-1.amazonaws.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase24(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase25(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar-fips.us-iso-east-1.c2s.ic.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase26(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-iso-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase27(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-iso-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-iso-east-1.c2s.ic.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-isob-east-1 with FIPS enabled and DualStack enabled -func TestEndpointCase28(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "FIPS and DualStack are enabled, but this partition does not support one or both", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-isob-east-1 with FIPS enabled and DualStack disabled -func TestEndpointCase29(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar-fips.us-isob-east-1.sc2s.sgov.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For region us-isob-east-1 with FIPS disabled and DualStack enabled -func TestEndpointCase30(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "DualStack is enabled but this partition does not support DualStack", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For region us-isob-east-1 with FIPS disabled and DualStack disabled -func TestEndpointCase31(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-isob-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://codestar.us-isob-east-1.sc2s.sgov.gov") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with region set and fips disabled and dualstack disabled -func TestEndpointCase32(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://example.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with region not set and fips disabled and dualstack disabled -func TestEndpointCase33(t *testing.T) { - var params = EndpointParameters{ - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err != nil { - t.Fatalf("expect no error, got %v", err) - } - - uri, _ := url.Parse("https://example.com") - - expectEndpoint := smithyendpoints.Endpoint{ - URI: *uri, - Headers: http.Header{}, - Properties: smithy.Properties{}, - } - - if e, a := expectEndpoint.URI, result.URI; e != a { - t.Errorf("expect %v URI, got %v", e, a) - } - - if !reflect.DeepEqual(expectEndpoint.Headers, result.Headers) { - t.Errorf("expect headers to match\n%v != %v", expectEndpoint.Headers, result.Headers) - } - - if !reflect.DeepEqual(expectEndpoint.Properties, result.Properties) { - t.Errorf("expect properties to match\n%v != %v", expectEndpoint.Properties, result.Properties) - } -} - -// For custom endpoint with fips enabled and dualstack disabled -func TestEndpointCase34(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(true), - UseDualStack: ptr.Bool(false), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: FIPS and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// For custom endpoint with fips disabled and dualstack enabled -func TestEndpointCase35(t *testing.T) { - var params = EndpointParameters{ - Region: ptr.String("us-east-1"), - UseFIPS: ptr.Bool(false), - UseDualStack: ptr.Bool(true), - Endpoint: ptr.String("https://example.com"), - } - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: Dualstack and custom endpoint are not supported", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} - -// Missing region -func TestEndpointCase36(t *testing.T) { - var params = EndpointParameters{} - - resolver := NewDefaultEndpointResolverV2() - result, err := resolver.ResolveEndpoint(context.Background(), params) - _, _ = result, err - - if err == nil { - t.Fatalf("expect error, got none") - } - if e, a := "Invalid Configuration: Missing Region", err.Error(); !strings.Contains(a, e) { - t.Errorf("expect %v error in %v", e, a) - } -} diff --git a/service/codestar/generated.json b/service/codestar/generated.json deleted file mode 100644 index e6abab0fcd5..00000000000 --- a/service/codestar/generated.json +++ /dev/null @@ -1,49 +0,0 @@ -{ - "dependencies": { - "github.com/aws/aws-sdk-go-v2": "v1.4.0", - "github.com/aws/aws-sdk-go-v2/internal/configsources": "v0.0.0-00010101000000-000000000000", - "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2": "v2.0.0-00010101000000-000000000000", - "github.com/aws/smithy-go": "v1.4.0" - }, - "files": [ - "api_client.go", - "api_client_test.go", - "api_op_AssociateTeamMember.go", - "api_op_CreateProject.go", - "api_op_CreateUserProfile.go", - "api_op_DeleteProject.go", - "api_op_DeleteUserProfile.go", - "api_op_DescribeProject.go", - "api_op_DescribeUserProfile.go", - "api_op_DisassociateTeamMember.go", - "api_op_ListProjects.go", - "api_op_ListResources.go", - "api_op_ListTagsForProject.go", - "api_op_ListTeamMembers.go", - "api_op_ListUserProfiles.go", - "api_op_TagProject.go", - "api_op_UntagProject.go", - "api_op_UpdateProject.go", - "api_op_UpdateTeamMember.go", - "api_op_UpdateUserProfile.go", - "auth.go", - "deserializers.go", - "doc.go", - "endpoints.go", - "endpoints_config_test.go", - "endpoints_test.go", - "generated.json", - "internal/endpoints/endpoints.go", - "internal/endpoints/endpoints_test.go", - "options.go", - "protocol_test.go", - "serializers.go", - "snapshot_test.go", - "types/errors.go", - "types/types.go", - "validators.go" - ], - "go": "1.15", - "module": "github.com/aws/aws-sdk-go-v2/service/codestar", - "unstable": false -} diff --git a/service/codestar/go.mod b/service/codestar/go.mod deleted file mode 100644 index 1c008f9259c..00000000000 --- a/service/codestar/go.mod +++ /dev/null @@ -1,16 +0,0 @@ -module github.com/aws/aws-sdk-go-v2/service/codestar - -go 1.21 - -require ( - github.com/aws/aws-sdk-go-v2 v1.30.4 - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.16 - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.16 - github.com/aws/smithy-go v1.20.4 -) - -replace github.com/aws/aws-sdk-go-v2 => ../../ - -replace github.com/aws/aws-sdk-go-v2/internal/configsources => ../../internal/configsources/ - -replace github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 => ../../internal/endpoints/v2/ diff --git a/service/codestar/go.sum b/service/codestar/go.sum deleted file mode 100644 index 472f5906e46..00000000000 --- a/service/codestar/go.sum +++ /dev/null @@ -1,2 +0,0 @@ -github.com/aws/smithy-go v1.20.4 h1:2HK1zBdPgRbjFOHlfeQZfpC4r72MOb9bZkiFwggKO+4= -github.com/aws/smithy-go v1.20.4/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= diff --git a/service/codestar/go_module_metadata.go b/service/codestar/go_module_metadata.go deleted file mode 100644 index 397f0587c1a..00000000000 --- a/service/codestar/go_module_metadata.go +++ /dev/null @@ -1,6 +0,0 @@ -// Code generated by internal/repotools/cmd/updatemodulemeta DO NOT EDIT. - -package codestar - -// goModuleVersion is the tagged release for this module -const goModuleVersion = "1.23.4" diff --git a/service/codestar/internal/endpoints/endpoints.go b/service/codestar/internal/endpoints/endpoints.go deleted file mode 100644 index 301c9f826af..00000000000 --- a/service/codestar/internal/endpoints/endpoints.go +++ /dev/null @@ -1,337 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "github.com/aws/aws-sdk-go-v2/aws" - endpoints "github.com/aws/aws-sdk-go-v2/internal/endpoints/v2" - "github.com/aws/smithy-go/logging" - "regexp" -) - -// Options is the endpoint resolver configuration options -type Options struct { - // Logger is a logging implementation that log events should be sent to. - Logger logging.Logger - - // LogDeprecated indicates that deprecated endpoints should be logged to the - // provided logger. - LogDeprecated bool - - // ResolvedRegion is used to override the region to be resolved, rather then the - // using the value passed to the ResolveEndpoint method. This value is used by the - // SDK to translate regions like fips-us-east-1 or us-east-1-fips to an alternative - // name. You must not set this value directly in your application. - ResolvedRegion string - - // DisableHTTPS informs the resolver to return an endpoint that does not use the - // HTTPS scheme. - DisableHTTPS bool - - // UseDualStackEndpoint specifies the resolver must resolve a dual-stack endpoint. - UseDualStackEndpoint aws.DualStackEndpointState - - // UseFIPSEndpoint specifies the resolver must resolve a FIPS endpoint. - UseFIPSEndpoint aws.FIPSEndpointState -} - -func (o Options) GetResolvedRegion() string { - return o.ResolvedRegion -} - -func (o Options) GetDisableHTTPS() bool { - return o.DisableHTTPS -} - -func (o Options) GetUseDualStackEndpoint() aws.DualStackEndpointState { - return o.UseDualStackEndpoint -} - -func (o Options) GetUseFIPSEndpoint() aws.FIPSEndpointState { - return o.UseFIPSEndpoint -} - -func transformToSharedOptions(options Options) endpoints.Options { - return endpoints.Options{ - Logger: options.Logger, - LogDeprecated: options.LogDeprecated, - ResolvedRegion: options.ResolvedRegion, - DisableHTTPS: options.DisableHTTPS, - UseDualStackEndpoint: options.UseDualStackEndpoint, - UseFIPSEndpoint: options.UseFIPSEndpoint, - } -} - -// Resolver CodeStar endpoint resolver -type Resolver struct { - partitions endpoints.Partitions -} - -// ResolveEndpoint resolves the service endpoint for the given region and options -func (r *Resolver) ResolveEndpoint(region string, options Options) (endpoint aws.Endpoint, err error) { - if len(region) == 0 { - return endpoint, &aws.MissingRegionError{} - } - - opt := transformToSharedOptions(options) - return r.partitions.ResolveEndpoint(region, opt) -} - -// New returns a new Resolver -func New() *Resolver { - return &Resolver{ - partitions: defaultPartitions, - } -} - -var partitionRegexp = struct { - Aws *regexp.Regexp - AwsCn *regexp.Regexp - AwsIso *regexp.Regexp - AwsIsoB *regexp.Regexp - AwsIsoE *regexp.Regexp - AwsIsoF *regexp.Regexp - AwsUsGov *regexp.Regexp -}{ - - Aws: regexp.MustCompile("^(us|eu|ap|sa|ca|me|af|il)\\-\\w+\\-\\d+$"), - AwsCn: regexp.MustCompile("^cn\\-\\w+\\-\\d+$"), - AwsIso: regexp.MustCompile("^us\\-iso\\-\\w+\\-\\d+$"), - AwsIsoB: regexp.MustCompile("^us\\-isob\\-\\w+\\-\\d+$"), - AwsIsoE: regexp.MustCompile("^eu\\-isoe\\-\\w+\\-\\d+$"), - AwsIsoF: regexp.MustCompile("^us\\-isof\\-\\w+\\-\\d+$"), - AwsUsGov: regexp.MustCompile("^us\\-gov\\-\\w+\\-\\d+$"), -} - -var defaultPartitions = endpoints.Partitions{ - { - ID: "aws", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "codestar.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "codestar-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "codestar-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "codestar.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.Aws, - IsRegionalized: true, - Endpoints: endpoints.Endpoints{ - endpoints.EndpointKey{ - Region: "ap-northeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-northeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ap-southeast-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "ca-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-central-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-north-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "eu-west-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-east-2", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-1", - }: endpoints.Endpoint{}, - endpoints.EndpointKey{ - Region: "us-west-2", - }: endpoints.Endpoint{}, - }, - }, - { - ID: "aws-cn", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "codestar.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "codestar-fips.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "codestar-fips.{region}.api.amazonwebservices.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "codestar.{region}.amazonaws.com.cn", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsCn, - IsRegionalized: true, - }, - { - ID: "aws-iso", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "codestar-fips.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "codestar.{region}.c2s.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIso, - IsRegionalized: true, - }, - { - ID: "aws-iso-b", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "codestar-fips.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "codestar.{region}.sc2s.sgov.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoB, - IsRegionalized: true, - }, - { - ID: "aws-iso-e", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "codestar-fips.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "codestar.{region}.cloud.adc-e.uk", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoE, - IsRegionalized: true, - }, - { - ID: "aws-iso-f", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "codestar-fips.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "codestar.{region}.csp.hci.ic.gov", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsIsoF, - IsRegionalized: true, - }, - { - ID: "aws-us-gov", - Defaults: map[endpoints.DefaultKey]endpoints.Endpoint{ - { - Variant: endpoints.DualStackVariant, - }: { - Hostname: "codestar.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant, - }: { - Hostname: "codestar-fips.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: endpoints.FIPSVariant | endpoints.DualStackVariant, - }: { - Hostname: "codestar-fips.{region}.api.aws", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - { - Variant: 0, - }: { - Hostname: "codestar.{region}.amazonaws.com", - Protocols: []string{"https"}, - SignatureVersions: []string{"v4"}, - }, - }, - RegionRegex: partitionRegexp.AwsUsGov, - IsRegionalized: true, - }, -} diff --git a/service/codestar/internal/endpoints/endpoints_test.go b/service/codestar/internal/endpoints/endpoints_test.go deleted file mode 100644 index 08e5da2d833..00000000000 --- a/service/codestar/internal/endpoints/endpoints_test.go +++ /dev/null @@ -1,11 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package endpoints - -import ( - "testing" -) - -func TestRegexCompile(t *testing.T) { - _ = defaultPartitions -} diff --git a/service/codestar/options.go b/service/codestar/options.go deleted file mode 100644 index 83723066ced..00000000000 --- a/service/codestar/options.go +++ /dev/null @@ -1,227 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "github.com/aws/aws-sdk-go-v2/aws" - awsmiddleware "github.com/aws/aws-sdk-go-v2/aws/middleware" - internalauthsmithy "github.com/aws/aws-sdk-go-v2/internal/auth/smithy" - smithyauth "github.com/aws/smithy-go/auth" - "github.com/aws/smithy-go/logging" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "net/http" -) - -type HTTPClient interface { - Do(*http.Request) (*http.Response, error) -} - -type Options struct { - // Set of options to modify how an operation is invoked. These apply to all - // operations invoked for this client. Use functional options on operation call to - // modify this list for per operation behavior. - APIOptions []func(*middleware.Stack) error - - // Indicates how aws account ID is applied in endpoint2.0 routing - AccountIDEndpointMode aws.AccountIDEndpointMode - - // The optional application specific identifier appended to the User-Agent header. - AppID string - - // This endpoint will be given as input to an EndpointResolverV2. It is used for - // providing a custom base endpoint that is subject to modifications by the - // processing EndpointResolverV2. - BaseEndpoint *string - - // Configures the events that will be sent to the configured logger. - ClientLogMode aws.ClientLogMode - - // The credentials object to use when signing requests. - Credentials aws.CredentialsProvider - - // The configuration DefaultsMode that the SDK should use when constructing the - // clients initial default settings. - DefaultsMode aws.DefaultsMode - - // The endpoint options to be used when attempting to resolve an endpoint. - EndpointOptions EndpointResolverOptions - - // The service endpoint resolver. - // - // Deprecated: Deprecated: EndpointResolver and WithEndpointResolver. Providing a - // value for this field will likely prevent you from using any endpoint-related - // service features released after the introduction of EndpointResolverV2 and - // BaseEndpoint. - // - // To migrate an EndpointResolver implementation that uses a custom endpoint, set - // the client option BaseEndpoint instead. - EndpointResolver EndpointResolver - - // Resolves the endpoint used for a particular service operation. This should be - // used over the deprecated EndpointResolver. - EndpointResolverV2 EndpointResolverV2 - - // Signature Version 4 (SigV4) Signer - HTTPSignerV4 HTTPSignerV4 - - // The logger writer interface to write logging messages to. - Logger logging.Logger - - // The region to send requests to. (Required) - Region string - - // RetryMaxAttempts specifies the maximum number attempts an API client will call - // an operation that fails with a retryable error. A value of 0 is ignored, and - // will not be used to configure the API client created default retryer, or modify - // per operation call's retry max attempts. - // - // If specified in an operation call's functional options with a value that is - // different than the constructed client's Options, the Client's Retryer will be - // wrapped to use the operation's specific RetryMaxAttempts value. - RetryMaxAttempts int - - // RetryMode specifies the retry mode the API client will be created with, if - // Retryer option is not also specified. - // - // When creating a new API Clients this member will only be used if the Retryer - // Options member is nil. This value will be ignored if Retryer is not nil. - // - // Currently does not support per operation call overrides, may in the future. - RetryMode aws.RetryMode - - // Retryer guides how HTTP requests should be retried in case of recoverable - // failures. When nil the API client will use a default retryer. The kind of - // default retry created by the API client can be changed with the RetryMode - // option. - Retryer aws.Retryer - - // The RuntimeEnvironment configuration, only populated if the DefaultsMode is set - // to DefaultsModeAuto and is initialized using config.LoadDefaultConfig . You - // should not populate this structure programmatically, or rely on the values here - // within your applications. - RuntimeEnvironment aws.RuntimeEnvironment - - // The initial DefaultsMode used when the client options were constructed. If the - // DefaultsMode was set to aws.DefaultsModeAuto this will store what the resolved - // value was at that point in time. - // - // Currently does not support per operation call overrides, may in the future. - resolvedDefaultsMode aws.DefaultsMode - - // The HTTP client to invoke API calls with. Defaults to client's default HTTP - // implementation if nil. - HTTPClient HTTPClient - - // The auth scheme resolver which determines how to authenticate for each - // operation. - AuthSchemeResolver AuthSchemeResolver - - // The list of auth schemes supported by the client. - AuthSchemes []smithyhttp.AuthScheme -} - -// Copy creates a clone where the APIOptions list is deep copied. -func (o Options) Copy() Options { - to := o - to.APIOptions = make([]func(*middleware.Stack) error, len(o.APIOptions)) - copy(to.APIOptions, o.APIOptions) - - return to -} - -func (o Options) GetIdentityResolver(schemeID string) smithyauth.IdentityResolver { - if schemeID == "aws.auth#sigv4" { - return getSigV4IdentityResolver(o) - } - if schemeID == "smithy.api#noAuth" { - return &smithyauth.AnonymousIdentityResolver{} - } - return nil -} - -// WithAPIOptions returns a functional option for setting the Client's APIOptions -// option. -func WithAPIOptions(optFns ...func(*middleware.Stack) error) func(*Options) { - return func(o *Options) { - o.APIOptions = append(o.APIOptions, optFns...) - } -} - -// Deprecated: EndpointResolver and WithEndpointResolver. Providing a value for -// this field will likely prevent you from using any endpoint-related service -// features released after the introduction of EndpointResolverV2 and BaseEndpoint. -// -// To migrate an EndpointResolver implementation that uses a custom endpoint, set -// the client option BaseEndpoint instead. -func WithEndpointResolver(v EndpointResolver) func(*Options) { - return func(o *Options) { - o.EndpointResolver = v - } -} - -// WithEndpointResolverV2 returns a functional option for setting the Client's -// EndpointResolverV2 option. -func WithEndpointResolverV2(v EndpointResolverV2) func(*Options) { - return func(o *Options) { - o.EndpointResolverV2 = v - } -} - -func getSigV4IdentityResolver(o Options) smithyauth.IdentityResolver { - if o.Credentials != nil { - return &internalauthsmithy.CredentialsProviderAdapter{Provider: o.Credentials} - } - return nil -} - -// WithSigV4SigningName applies an override to the authentication workflow to -// use the given signing name for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing name from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningName(name string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningName(ctx, name), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningName", fn), - middleware.Before, - ) - }) - } -} - -// WithSigV4SigningRegion applies an override to the authentication workflow to -// use the given signing region for SigV4-authenticated operations. -// -// This is an advanced setting. The value here is FINAL, taking precedence over -// the resolved signing region from both auth scheme resolution and endpoint -// resolution. -func WithSigV4SigningRegion(region string) func(*Options) { - fn := func(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, - ) { - return next.HandleInitialize(awsmiddleware.SetSigningRegion(ctx, region), in) - } - return func(o *Options) { - o.APIOptions = append(o.APIOptions, func(s *middleware.Stack) error { - return s.Initialize.Add( - middleware.InitializeMiddlewareFunc("withSigV4SigningRegion", fn), - middleware.Before, - ) - }) - } -} - -func ignoreAnonymousAuth(options *Options) { - if aws.IsCredentialsProvider(options.Credentials, (*aws.AnonymousCredentials)(nil)) { - options.Credentials = nil - } -} diff --git a/service/codestar/protocol_test.go b/service/codestar/protocol_test.go deleted file mode 100644 index 35fdb2021fc..00000000000 --- a/service/codestar/protocol_test.go +++ /dev/null @@ -1,3 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar diff --git a/service/codestar/serializers.go b/service/codestar/serializers.go deleted file mode 100644 index 65dc4e16de6..00000000000 --- a/service/codestar/serializers.go +++ /dev/null @@ -1,1614 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "bytes" - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/encoding/httpbinding" - smithyjson "github.com/aws/smithy-go/encoding/json" - "github.com/aws/smithy-go/middleware" - smithyhttp "github.com/aws/smithy-go/transport/http" - "path" -) - -type awsAwsjson11_serializeOpAssociateTeamMember struct { -} - -func (*awsAwsjson11_serializeOpAssociateTeamMember) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpAssociateTeamMember) 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.(*AssociateTeamMemberInput) - _ = 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("CodeStar_20170419.AssociateTeamMember") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentAssociateTeamMemberInput(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_serializeOpCreateProject struct { -} - -func (*awsAwsjson11_serializeOpCreateProject) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpCreateProject) 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.(*CreateProjectInput) - _ = 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("CodeStar_20170419.CreateProject") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentCreateProjectInput(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_serializeOpCreateUserProfile struct { -} - -func (*awsAwsjson11_serializeOpCreateUserProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpCreateUserProfile) 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.(*CreateUserProfileInput) - _ = 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("CodeStar_20170419.CreateUserProfile") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentCreateUserProfileInput(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_serializeOpDeleteProject struct { -} - -func (*awsAwsjson11_serializeOpDeleteProject) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_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)} - } - - 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("CodeStar_20170419.DeleteProject") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDeleteProjectInput(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_serializeOpDeleteUserProfile struct { -} - -func (*awsAwsjson11_serializeOpDeleteUserProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpDeleteUserProfile) 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.(*DeleteUserProfileInput) - _ = 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("CodeStar_20170419.DeleteUserProfile") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDeleteUserProfileInput(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_serializeOpDescribeProject struct { -} - -func (*awsAwsjson11_serializeOpDescribeProject) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpDescribeProject) 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.(*DescribeProjectInput) - _ = 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("CodeStar_20170419.DescribeProject") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDescribeProjectInput(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_serializeOpDescribeUserProfile struct { -} - -func (*awsAwsjson11_serializeOpDescribeUserProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpDescribeUserProfile) 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.(*DescribeUserProfileInput) - _ = 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("CodeStar_20170419.DescribeUserProfile") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDescribeUserProfileInput(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_serializeOpDisassociateTeamMember struct { -} - -func (*awsAwsjson11_serializeOpDisassociateTeamMember) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpDisassociateTeamMember) 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.(*DisassociateTeamMemberInput) - _ = 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("CodeStar_20170419.DisassociateTeamMember") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentDisassociateTeamMemberInput(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_serializeOpListProjects struct { -} - -func (*awsAwsjson11_serializeOpListProjects) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpListProjects) 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.(*ListProjectsInput) - _ = 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("CodeStar_20170419.ListProjects") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListProjectsInput(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_serializeOpListResources struct { -} - -func (*awsAwsjson11_serializeOpListResources) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpListResources) 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.(*ListResourcesInput) - _ = 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("CodeStar_20170419.ListResources") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListResourcesInput(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_serializeOpListTagsForProject struct { -} - -func (*awsAwsjson11_serializeOpListTagsForProject) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpListTagsForProject) 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.(*ListTagsForProjectInput) - _ = 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("CodeStar_20170419.ListTagsForProject") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListTagsForProjectInput(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_serializeOpListTeamMembers struct { -} - -func (*awsAwsjson11_serializeOpListTeamMembers) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpListTeamMembers) 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.(*ListTeamMembersInput) - _ = 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("CodeStar_20170419.ListTeamMembers") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListTeamMembersInput(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_serializeOpListUserProfiles struct { -} - -func (*awsAwsjson11_serializeOpListUserProfiles) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpListUserProfiles) 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.(*ListUserProfilesInput) - _ = 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("CodeStar_20170419.ListUserProfiles") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentListUserProfilesInput(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_serializeOpTagProject struct { -} - -func (*awsAwsjson11_serializeOpTagProject) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpTagProject) 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.(*TagProjectInput) - _ = 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("CodeStar_20170419.TagProject") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentTagProjectInput(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_serializeOpUntagProject struct { -} - -func (*awsAwsjson11_serializeOpUntagProject) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpUntagProject) 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.(*UntagProjectInput) - _ = 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("CodeStar_20170419.UntagProject") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentUntagProjectInput(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_serializeOpUpdateProject struct { -} - -func (*awsAwsjson11_serializeOpUpdateProject) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_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)} - } - - 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("CodeStar_20170419.UpdateProject") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_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 = httpBindingEncoder.Encode(request.Request); err != nil { - return out, metadata, &smithy.SerializationError{Err: err} - } - in.Request = request - - return next.HandleSerialize(ctx, in) -} - -type awsAwsjson11_serializeOpUpdateTeamMember struct { -} - -func (*awsAwsjson11_serializeOpUpdateTeamMember) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpUpdateTeamMember) 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.(*UpdateTeamMemberInput) - _ = 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("CodeStar_20170419.UpdateTeamMember") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentUpdateTeamMemberInput(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_serializeOpUpdateUserProfile struct { -} - -func (*awsAwsjson11_serializeOpUpdateUserProfile) ID() string { - return "OperationSerializer" -} - -func (m *awsAwsjson11_serializeOpUpdateUserProfile) 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.(*UpdateUserProfileInput) - _ = 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("CodeStar_20170419.UpdateUserProfile") - - jsonEncoder := smithyjson.NewEncoder() - if err := awsAwsjson11_serializeOpDocumentUpdateUserProfileInput(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) -} -func awsAwsjson11_serializeDocumentCode(v *types.Code, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Destination != nil { - ok := object.Key("destination") - if err := awsAwsjson11_serializeDocumentCodeDestination(v.Destination, ok); err != nil { - return err - } - } - - if v.Source != nil { - ok := object.Key("source") - if err := awsAwsjson11_serializeDocumentCodeSource(v.Source, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeDocumentCodeCommitCodeDestination(v *types.CodeCommitCodeDestination, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - return nil -} - -func awsAwsjson11_serializeDocumentCodeDestination(v *types.CodeDestination, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.CodeCommit != nil { - ok := object.Key("codeCommit") - if err := awsAwsjson11_serializeDocumentCodeCommitCodeDestination(v.CodeCommit, ok); err != nil { - return err - } - } - - if v.GitHub != nil { - ok := object.Key("gitHub") - if err := awsAwsjson11_serializeDocumentGitHubCodeDestination(v.GitHub, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeDocumentCodeSource(v *types.CodeSource, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.S3 != nil { - ok := object.Key("s3") - if err := awsAwsjson11_serializeDocumentS3Location(v.S3, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeDocumentGitHubCodeDestination(v *types.GitHubCodeDestination, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Description != nil { - ok := object.Key("description") - ok.String(*v.Description) - } - - { - ok := object.Key("issuesEnabled") - ok.Boolean(v.IssuesEnabled) - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.Owner != nil { - ok := object.Key("owner") - ok.String(*v.Owner) - } - - { - ok := object.Key("privateRepository") - ok.Boolean(v.PrivateRepository) - } - - if v.Token != nil { - ok := object.Key("token") - ok.String(*v.Token) - } - - if v.Type != nil { - ok := object.Key("type") - ok.String(*v.Type) - } - - return nil -} - -func awsAwsjson11_serializeDocumentS3Location(v *types.S3Location, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.BucketKey != nil { - ok := object.Key("bucketKey") - ok.String(*v.BucketKey) - } - - if v.BucketName != nil { - ok := object.Key("bucketName") - ok.String(*v.BucketName) - } - - return nil -} - -func awsAwsjson11_serializeDocumentSourceCode(v []types.Code, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - if err := awsAwsjson11_serializeDocumentCode(&v[i], av); err != nil { - return err - } - } - return nil -} - -func awsAwsjson11_serializeDocumentTagKeys(v []string, value smithyjson.Value) error { - array := value.Array() - defer array.Close() - - for i := range v { - av := array.Value() - av.String(v[i]) - } - return nil -} - -func awsAwsjson11_serializeDocumentTags(v map[string]string, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - for key := range v { - om := object.Key(key) - om.String(v[key]) - } - return nil -} - -func awsAwsjson11_serializeDocumentTemplateParameterMap(v map[string]string, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - for key := range v { - om := object.Key(key) - om.String(v[key]) - } - return nil -} - -func awsAwsjson11_serializeDocumentToolchain(v *types.Toolchain, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.RoleArn != nil { - ok := object.Key("roleArn") - ok.String(*v.RoleArn) - } - - if v.Source != nil { - ok := object.Key("source") - if err := awsAwsjson11_serializeDocumentToolchainSource(v.Source, ok); err != nil { - return err - } - } - - if v.StackParameters != nil { - ok := object.Key("stackParameters") - if err := awsAwsjson11_serializeDocumentTemplateParameterMap(v.StackParameters, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeDocumentToolchainSource(v *types.ToolchainSource, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.S3 != nil { - ok := object.Key("s3") - if err := awsAwsjson11_serializeDocumentS3Location(v.S3, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentAssociateTeamMemberInput(v *AssociateTeamMemberInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.ProjectId != nil { - ok := object.Key("projectId") - ok.String(*v.ProjectId) - } - - if v.ProjectRole != nil { - ok := object.Key("projectRole") - ok.String(*v.ProjectRole) - } - - if v.RemoteAccessAllowed != nil { - ok := object.Key("remoteAccessAllowed") - ok.Boolean(*v.RemoteAccessAllowed) - } - - if v.UserArn != nil { - ok := object.Key("userArn") - ok.String(*v.UserArn) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentCreateProjectInput(v *CreateProjectInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.Description != nil { - ok := object.Key("description") - ok.String(*v.Description) - } - - if v.Id != nil { - ok := object.Key("id") - ok.String(*v.Id) - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - if v.SourceCode != nil { - ok := object.Key("sourceCode") - if err := awsAwsjson11_serializeDocumentSourceCode(v.SourceCode, ok); err != nil { - return err - } - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } - } - - if v.Toolchain != nil { - ok := object.Key("toolchain") - if err := awsAwsjson11_serializeDocumentToolchain(v.Toolchain, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentCreateUserProfileInput(v *CreateUserProfileInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DisplayName != nil { - ok := object.Key("displayName") - ok.String(*v.DisplayName) - } - - if v.EmailAddress != nil { - ok := object.Key("emailAddress") - ok.String(*v.EmailAddress) - } - - if v.SshPublicKey != nil { - ok := object.Key("sshPublicKey") - ok.String(*v.SshPublicKey) - } - - if v.UserArn != nil { - ok := object.Key("userArn") - ok.String(*v.UserArn) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentDeleteProjectInput(v *DeleteProjectInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ClientRequestToken != nil { - ok := object.Key("clientRequestToken") - ok.String(*v.ClientRequestToken) - } - - if v.DeleteStack { - ok := object.Key("deleteStack") - ok.Boolean(v.DeleteStack) - } - - if v.Id != nil { - ok := object.Key("id") - ok.String(*v.Id) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentDeleteUserProfileInput(v *DeleteUserProfileInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.UserArn != nil { - ok := object.Key("userArn") - ok.String(*v.UserArn) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentDescribeProjectInput(v *DescribeProjectInput, 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_serializeOpDocumentDescribeUserProfileInput(v *DescribeUserProfileInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.UserArn != nil { - ok := object.Key("userArn") - ok.String(*v.UserArn) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentDisassociateTeamMemberInput(v *DisassociateTeamMemberInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ProjectId != nil { - ok := object.Key("projectId") - ok.String(*v.ProjectId) - } - - if v.UserArn != nil { - ok := object.Key("userArn") - ok.String(*v.UserArn) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentListProjectsInput(v *ListProjectsInput, 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) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentListResourcesInput(v *ListResourcesInput, 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.ProjectId != nil { - ok := object.Key("projectId") - ok.String(*v.ProjectId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentListTagsForProjectInput(v *ListTagsForProjectInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Id != nil { - ok := object.Key("id") - ok.String(*v.Id) - } - - if v.MaxResults != nil { - ok := object.Key("maxResults") - ok.Integer(*v.MaxResults) - } - - if v.NextToken != nil { - ok := object.Key("nextToken") - ok.String(*v.NextToken) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentListTeamMembersInput(v *ListTeamMembersInput, 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.ProjectId != nil { - ok := object.Key("projectId") - ok.String(*v.ProjectId) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentListUserProfilesInput(v *ListUserProfilesInput, 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) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentTagProjectInput(v *TagProjectInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Id != nil { - ok := object.Key("id") - ok.String(*v.Id) - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsAwsjson11_serializeDocumentTags(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentUntagProjectInput(v *UntagProjectInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.Id != nil { - ok := object.Key("id") - ok.String(*v.Id) - } - - if v.Tags != nil { - ok := object.Key("tags") - if err := awsAwsjson11_serializeDocumentTagKeys(v.Tags, ok); err != nil { - return err - } - } - - return nil -} - -func awsAwsjson11_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) - } - - if v.Id != nil { - ok := object.Key("id") - ok.String(*v.Id) - } - - if v.Name != nil { - ok := object.Key("name") - ok.String(*v.Name) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentUpdateTeamMemberInput(v *UpdateTeamMemberInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.ProjectId != nil { - ok := object.Key("projectId") - ok.String(*v.ProjectId) - } - - if v.ProjectRole != nil { - ok := object.Key("projectRole") - ok.String(*v.ProjectRole) - } - - if v.RemoteAccessAllowed != nil { - ok := object.Key("remoteAccessAllowed") - ok.Boolean(*v.RemoteAccessAllowed) - } - - if v.UserArn != nil { - ok := object.Key("userArn") - ok.String(*v.UserArn) - } - - return nil -} - -func awsAwsjson11_serializeOpDocumentUpdateUserProfileInput(v *UpdateUserProfileInput, value smithyjson.Value) error { - object := value.Object() - defer object.Close() - - if v.DisplayName != nil { - ok := object.Key("displayName") - ok.String(*v.DisplayName) - } - - if v.EmailAddress != nil { - ok := object.Key("emailAddress") - ok.String(*v.EmailAddress) - } - - if v.SshPublicKey != nil { - ok := object.Key("sshPublicKey") - ok.String(*v.SshPublicKey) - } - - if v.UserArn != nil { - ok := object.Key("userArn") - ok.String(*v.UserArn) - } - - return nil -} diff --git a/service/codestar/snapshot/api_op_AssociateTeamMember.go.snap b/service/codestar/snapshot/api_op_AssociateTeamMember.go.snap deleted file mode 100644 index 0fc83d1d957..00000000000 --- a/service/codestar/snapshot/api_op_AssociateTeamMember.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -AssociateTeamMember - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_CreateProject.go.snap b/service/codestar/snapshot/api_op_CreateProject.go.snap deleted file mode 100644 index aee612e4e3e..00000000000 --- a/service/codestar/snapshot/api_op_CreateProject.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -CreateProject - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_CreateUserProfile.go.snap b/service/codestar/snapshot/api_op_CreateUserProfile.go.snap deleted file mode 100644 index fb95b261251..00000000000 --- a/service/codestar/snapshot/api_op_CreateUserProfile.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -CreateUserProfile - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_DeleteProject.go.snap b/service/codestar/snapshot/api_op_DeleteProject.go.snap deleted file mode 100644 index 982324944cc..00000000000 --- a/service/codestar/snapshot/api_op_DeleteProject.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -DeleteProject - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_DeleteUserProfile.go.snap b/service/codestar/snapshot/api_op_DeleteUserProfile.go.snap deleted file mode 100644 index 326ab5a1aed..00000000000 --- a/service/codestar/snapshot/api_op_DeleteUserProfile.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -DeleteUserProfile - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_DescribeProject.go.snap b/service/codestar/snapshot/api_op_DescribeProject.go.snap deleted file mode 100644 index e4f9b47209a..00000000000 --- a/service/codestar/snapshot/api_op_DescribeProject.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -DescribeProject - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_DescribeUserProfile.go.snap b/service/codestar/snapshot/api_op_DescribeUserProfile.go.snap deleted file mode 100644 index f329faedb8e..00000000000 --- a/service/codestar/snapshot/api_op_DescribeUserProfile.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -DescribeUserProfile - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_DisassociateTeamMember.go.snap b/service/codestar/snapshot/api_op_DisassociateTeamMember.go.snap deleted file mode 100644 index 90c83c9c4f7..00000000000 --- a/service/codestar/snapshot/api_op_DisassociateTeamMember.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -DisassociateTeamMember - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_ListProjects.go.snap b/service/codestar/snapshot/api_op_ListProjects.go.snap deleted file mode 100644 index 5d2650a7376..00000000000 --- a/service/codestar/snapshot/api_op_ListProjects.go.snap +++ /dev/null @@ -1,35 +0,0 @@ -ListProjects - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_ListResources.go.snap b/service/codestar/snapshot/api_op_ListResources.go.snap deleted file mode 100644 index f2ac9ac6c30..00000000000 --- a/service/codestar/snapshot/api_op_ListResources.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -ListResources - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_ListTagsForProject.go.snap b/service/codestar/snapshot/api_op_ListTagsForProject.go.snap deleted file mode 100644 index 6daa7a9313a..00000000000 --- a/service/codestar/snapshot/api_op_ListTagsForProject.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -ListTagsForProject - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_ListTeamMembers.go.snap b/service/codestar/snapshot/api_op_ListTeamMembers.go.snap deleted file mode 100644 index f066eb9f944..00000000000 --- a/service/codestar/snapshot/api_op_ListTeamMembers.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -ListTeamMembers - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_ListUserProfiles.go.snap b/service/codestar/snapshot/api_op_ListUserProfiles.go.snap deleted file mode 100644 index 30098f5b6cc..00000000000 --- a/service/codestar/snapshot/api_op_ListUserProfiles.go.snap +++ /dev/null @@ -1,35 +0,0 @@ -ListUserProfiles - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_TagProject.go.snap b/service/codestar/snapshot/api_op_TagProject.go.snap deleted file mode 100644 index 2d85a86985e..00000000000 --- a/service/codestar/snapshot/api_op_TagProject.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -TagProject - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_UntagProject.go.snap b/service/codestar/snapshot/api_op_UntagProject.go.snap deleted file mode 100644 index 23cad89e1b9..00000000000 --- a/service/codestar/snapshot/api_op_UntagProject.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -UntagProject - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_UpdateProject.go.snap b/service/codestar/snapshot/api_op_UpdateProject.go.snap deleted file mode 100644 index ffc902fb388..00000000000 --- a/service/codestar/snapshot/api_op_UpdateProject.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -UpdateProject - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_UpdateTeamMember.go.snap b/service/codestar/snapshot/api_op_UpdateTeamMember.go.snap deleted file mode 100644 index ec33836fd55..00000000000 --- a/service/codestar/snapshot/api_op_UpdateTeamMember.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -UpdateTeamMember - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot/api_op_UpdateUserProfile.go.snap b/service/codestar/snapshot/api_op_UpdateUserProfile.go.snap deleted file mode 100644 index b3993a2363a..00000000000 --- a/service/codestar/snapshot/api_op_UpdateUserProfile.go.snap +++ /dev/null @@ -1,36 +0,0 @@ -UpdateUserProfile - Initialize stack step - RegisterServiceMetadata - legacyEndpointContextSetter - SetLogger - OperationInputValidation - Serialize stack step - setOperationInput - ResolveEndpoint - OperationSerializer - Build stack step - ClientRequestID - ComputeContentLength - UserAgent - AddTimeOffsetMiddleware - RecursionDetection - Finalize stack step - ResolveAuthScheme - GetIdentity - ResolveEndpointV2 - disableHTTPS - ComputePayloadHash - Retry - RetryMetricsHeader - setLegacyContextSigningOptions - Signing - Deserialize stack step - AddRawResponseToMetadata - ErrorCloseResponseBody - CloseResponseBody - ResponseErrorWrapper - RequestIDRetriever - OperationDeserializer - AddTimeOffsetMiddleware - RecordResponseTiming - RequestResponseLogger diff --git a/service/codestar/snapshot_test.go b/service/codestar/snapshot_test.go deleted file mode 100644 index da5683e22ed..00000000000 --- a/service/codestar/snapshot_test.go +++ /dev/null @@ -1,494 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -//go:build snapshot - -package codestar - -import ( - "context" - "errors" - "fmt" - "github.com/aws/smithy-go/middleware" - "io" - "io/fs" - "os" - "testing" -) - -const ssprefix = "snapshot" - -type snapshotOK struct{} - -func (snapshotOK) Error() string { return "error: success" } - -func createp(path string) (*os.File, error) { - if err := os.Mkdir(ssprefix, 0700); err != nil && !errors.Is(err, fs.ErrExist) { - return nil, err - } - return os.Create(path) -} - -func sspath(op string) string { - return fmt.Sprintf("%s/api_op_%s.go.snap", ssprefix, op) -} - -func updateSnapshot(stack *middleware.Stack, operation string) error { - f, err := createp(sspath(operation)) - if err != nil { - return err - } - defer f.Close() - if _, err := f.Write([]byte(stack.String())); err != nil { - return err - } - return snapshotOK{} -} - -func testSnapshot(stack *middleware.Stack, operation string) error { - f, err := os.Open(sspath(operation)) - if errors.Is(err, fs.ErrNotExist) { - return snapshotOK{} - } - if err != nil { - return err - } - defer f.Close() - expected, err := io.ReadAll(f) - if err != nil { - return err - } - if actual := stack.String(); actual != string(expected) { - return fmt.Errorf("%s != %s", expected, actual) - } - return snapshotOK{} -} -func TestCheckSnapshot_AssociateTeamMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.AssociateTeamMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "AssociateTeamMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_CreateProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_CreateUserProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateUserProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "CreateUserProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DeleteUserProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteUserProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DeleteUserProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DescribeProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DescribeUserProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeUserProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DescribeUserProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_DisassociateTeamMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociateTeamMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "DisassociateTeamMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListProjects(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListProjects(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListProjects") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListResources(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListResources(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListResources") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListTagsForProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTagsForProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListTagsForProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListTeamMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTeamMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListTeamMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_ListUserProfiles(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListUserProfiles(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "ListUserProfiles") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_TagProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "TagProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UntagProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UntagProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateTeamMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateTeamMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateTeamMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestCheckSnapshot_UpdateUserProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateUserProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return testSnapshot(stack, "UpdateUserProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} -func TestUpdateSnapshot_AssociateTeamMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.AssociateTeamMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "AssociateTeamMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_CreateUserProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.CreateUserProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "CreateUserProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DeleteUserProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.DeleteUserProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DeleteUserProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DescribeUserProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.DescribeUserProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DescribeUserProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_DisassociateTeamMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.DisassociateTeamMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "DisassociateTeamMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListProjects(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListProjects(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListProjects") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListResources(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListResources(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListResources") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListTagsForProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTagsForProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListTagsForProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListTeamMembers(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListTeamMembers(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListTeamMembers") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_ListUserProfiles(t *testing.T) { - svc := New(Options{}) - _, err := svc.ListUserProfiles(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "ListUserProfiles") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_TagProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.TagProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "TagProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UntagProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.UntagProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UntagProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateProject(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateProject(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateProject") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateTeamMember(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateTeamMember(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateTeamMember") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} - -func TestUpdateSnapshot_UpdateUserProfile(t *testing.T) { - svc := New(Options{}) - _, err := svc.UpdateUserProfile(context.Background(), nil, func(o *Options) { - o.APIOptions = append(o.APIOptions, func(stack *middleware.Stack) error { - return updateSnapshot(stack, "UpdateUserProfile") - }) - }) - if _, ok := err.(snapshotOK); !ok && err != nil { - t.Fatal(err) - } -} diff --git a/service/codestar/types/errors.go b/service/codestar/types/errors.go deleted file mode 100644 index 1288f82e806..00000000000 --- a/service/codestar/types/errors.go +++ /dev/null @@ -1,355 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - "fmt" - smithy "github.com/aws/smithy-go" -) - -// Another modification is being made. That modification must complete before you -// can make your change. -type ConcurrentModificationException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ConcurrentModificationException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ConcurrentModificationException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ConcurrentModificationException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ConcurrentModificationException" - } - return *e.ErrorCodeOverride -} -func (e *ConcurrentModificationException) ErrorFault() smithy.ErrorFault { return smithy.FaultServer } - -// The next token is not valid. -type InvalidNextTokenException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidNextTokenException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidNextTokenException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidNextTokenException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidNextTokenException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidNextTokenException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The service role is not valid. -type InvalidServiceRoleException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *InvalidServiceRoleException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *InvalidServiceRoleException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *InvalidServiceRoleException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "InvalidServiceRoleException" - } - return *e.ErrorCodeOverride -} -func (e *InvalidServiceRoleException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A resource limit has been exceeded. -type LimitExceededException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *LimitExceededException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *LimitExceededException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *LimitExceededException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "LimitExceededException" - } - return *e.ErrorCodeOverride -} -func (e *LimitExceededException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// An AWS CodeStar project with the same ID already exists in this region for the -// AWS account. AWS CodeStar project IDs must be unique within a region for the AWS -// account. -type ProjectAlreadyExistsException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ProjectAlreadyExistsException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ProjectAlreadyExistsException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ProjectAlreadyExistsException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ProjectAlreadyExistsException" - } - return *e.ErrorCodeOverride -} -func (e *ProjectAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// Project configuration information is required but not specified. -type ProjectConfigurationException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ProjectConfigurationException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ProjectConfigurationException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ProjectConfigurationException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ProjectConfigurationException" - } - return *e.ErrorCodeOverride -} -func (e *ProjectConfigurationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The project creation request was valid, but a nonspecific exception or error -// occurred during project creation. The project could not be created in AWS -// CodeStar. -type ProjectCreationFailedException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ProjectCreationFailedException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ProjectCreationFailedException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ProjectCreationFailedException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ProjectCreationFailedException" - } - return *e.ErrorCodeOverride -} -func (e *ProjectCreationFailedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified AWS CodeStar project was not found. -type ProjectNotFoundException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ProjectNotFoundException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ProjectNotFoundException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ProjectNotFoundException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ProjectNotFoundException" - } - return *e.ErrorCodeOverride -} -func (e *ProjectNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The team member is already associated with a role in this project. -type TeamMemberAlreadyAssociatedException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TeamMemberAlreadyAssociatedException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TeamMemberAlreadyAssociatedException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TeamMemberAlreadyAssociatedException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TeamMemberAlreadyAssociatedException" - } - return *e.ErrorCodeOverride -} -func (e *TeamMemberAlreadyAssociatedException) ErrorFault() smithy.ErrorFault { - return smithy.FaultClient -} - -// The specified team member was not found. -type TeamMemberNotFoundException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *TeamMemberNotFoundException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *TeamMemberNotFoundException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *TeamMemberNotFoundException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "TeamMemberNotFoundException" - } - return *e.ErrorCodeOverride -} -func (e *TeamMemberNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// A user profile with that name already exists in this region for the AWS -// account. AWS CodeStar user profile names must be unique within a region for the -// AWS account. -type UserProfileAlreadyExistsException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *UserProfileAlreadyExistsException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *UserProfileAlreadyExistsException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *UserProfileAlreadyExistsException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "UserProfileAlreadyExistsException" - } - return *e.ErrorCodeOverride -} -func (e *UserProfileAlreadyExistsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The user profile was not found. -type UserProfileNotFoundException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *UserProfileNotFoundException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *UserProfileNotFoundException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *UserProfileNotFoundException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "UserProfileNotFoundException" - } - return *e.ErrorCodeOverride -} -func (e *UserProfileNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } - -// The specified input is either not valid, or it could not be validated. -type ValidationException struct { - Message *string - - ErrorCodeOverride *string - - noSmithyDocumentSerde -} - -func (e *ValidationException) Error() string { - return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage()) -} -func (e *ValidationException) ErrorMessage() string { - if e.Message == nil { - return "" - } - return *e.Message -} -func (e *ValidationException) ErrorCode() string { - if e == nil || e.ErrorCodeOverride == nil { - return "ValidationException" - } - return *e.ErrorCodeOverride -} -func (e *ValidationException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient } diff --git a/service/codestar/types/types.go b/service/codestar/types/types.go deleted file mode 100644 index 788de4e5f67..00000000000 --- a/service/codestar/types/types.go +++ /dev/null @@ -1,258 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package types - -import ( - smithydocument "github.com/aws/smithy-go/document" -) - -// Location and destination information about the source code files provided with -// the project request. The source code is uploaded to the new project source -// repository after project creation. -type Code struct { - - // The repository to be created in AWS CodeStar. Valid values are AWS CodeCommit - // or GitHub. After AWS CodeStar provisions the new repository, the source code - // files provided with the project request are placed in the repository. - // - // This member is required. - Destination *CodeDestination - - // The location where the source code files provided with the project request are - // stored. AWS CodeStar retrieves the files during project creation. - // - // This member is required. - Source *CodeSource - - noSmithyDocumentSerde -} - -// Information about the AWS CodeCommit repository to be created in AWS CodeStar. -// This is where the source code files provided with the project request will be -// uploaded after project creation. -type CodeCommitCodeDestination struct { - - // The name of the AWS CodeCommit repository to be created in AWS CodeStar. - // - // This member is required. - Name *string - - noSmithyDocumentSerde -} - -// The repository to be created in AWS CodeStar. Valid values are AWS CodeCommit -// or GitHub. After AWS CodeStar provisions the new repository, the source code -// files provided with the project request are placed in the repository. -type CodeDestination struct { - - // Information about the AWS CodeCommit repository to be created in AWS CodeStar. - // This is where the source code files provided with the project request will be - // uploaded after project creation. - CodeCommit *CodeCommitCodeDestination - - // Information about the GitHub repository to be created in AWS CodeStar. This is - // where the source code files provided with the project request will be uploaded - // after project creation. - GitHub *GitHubCodeDestination - - noSmithyDocumentSerde -} - -// The location where the source code files provided with the project request are -// stored. AWS CodeStar retrieves the files during project creation. -type CodeSource struct { - - // Information about the Amazon S3 location where the source code files provided - // with the project request are stored. - // - // This member is required. - S3 *S3Location - - noSmithyDocumentSerde -} - -// Information about the GitHub repository to be created in AWS CodeStar. This is -// where the source code files provided with the project request will be uploaded -// after project creation. -type GitHubCodeDestination struct { - - // Whether to enable issues for the GitHub repository. - // - // This member is required. - IssuesEnabled bool - - // Name of the GitHub repository to be created in AWS CodeStar. - // - // This member is required. - Name *string - - // The GitHub username for the owner of the GitHub repository to be created in AWS - // CodeStar. If this repository should be owned by a GitHub organization, provide - // its name. - // - // This member is required. - Owner *string - - // Whether the GitHub repository is to be a private repository. - // - // This member is required. - PrivateRepository bool - - // The GitHub user's personal access token for the GitHub repository. - // - // This member is required. - Token *string - - // The type of GitHub repository to be created in AWS CodeStar. Valid values are - // User or Organization. - // - // This member is required. - Type *string - - // Description for the GitHub repository to be created in AWS CodeStar. This - // description displays in GitHub after the repository is created. - Description *string - - noSmithyDocumentSerde -} - -// An indication of whether a project creation or deletion is failed or successful. -type ProjectStatus struct { - - // The phase of completion for a project creation or deletion. - // - // This member is required. - State *string - - // In the case of a project creation or deletion failure, a reason for the failure. - Reason *string - - noSmithyDocumentSerde -} - -// Information about the metadata for a project. -type ProjectSummary struct { - - // The Amazon Resource Name (ARN) of the project. - ProjectArn *string - - // The ID of the project. - ProjectId *string - - noSmithyDocumentSerde -} - -// Information about a resource for a project. -type Resource struct { - - // The Amazon Resource Name (ARN) of the resource. - // - // This member is required. - Id *string - - noSmithyDocumentSerde -} - -// The Amazon S3 location where the source code files provided with the project -// request are stored. -type S3Location struct { - - // The Amazon S3 object key where the source code files provided with the project - // request are stored. - BucketKey *string - - // The Amazon S3 bucket name where the source code files provided with the project - // request are stored. - BucketName *string - - noSmithyDocumentSerde -} - -// Information about a team member in a project. -type TeamMember struct { - - // The role assigned to the user in the project. Project roles have different - // levels of access. For more information, see [Working with Teams]in the AWS CodeStar User Guide. - // - // [Working with Teams]: http://docs.aws.amazon.com/codestar/latest/userguide/working-with-teams.html - // - // This member is required. - ProjectRole *string - - // The Amazon Resource Name (ARN) of the user in IAM. - // - // This member is required. - UserArn *string - - // Whether the user is allowed to remotely access project resources using an SSH - // public/private key pair. - RemoteAccessAllowed *bool - - noSmithyDocumentSerde -} - -// The toolchain template file provided with the project request. AWS CodeStar -// uses the template to provision the toolchain stack in AWS CloudFormation. -type Toolchain struct { - - // The Amazon S3 location where the toolchain template file provided with the - // project request is stored. AWS CodeStar retrieves the file during project - // creation. - // - // This member is required. - Source *ToolchainSource - - // The service role ARN for AWS CodeStar to use for the toolchain template during - // stack provisioning. - RoleArn *string - - // The list of parameter overrides to be passed into the toolchain template during - // stack provisioning, if any. - StackParameters map[string]string - - noSmithyDocumentSerde -} - -// The Amazon S3 location where the toolchain template file provided with the -// project request is stored. AWS CodeStar retrieves the file during project -// creation. -type ToolchainSource struct { - - // The Amazon S3 bucket where the toolchain template file provided with the - // project request is stored. - // - // This member is required. - S3 *S3Location - - noSmithyDocumentSerde -} - -// Information about a user's profile in AWS CodeStar. -type UserProfileSummary struct { - - // The display name of a user in AWS CodeStar. For example, this could be set to - // both first and last name ("Mary Major") or a single name ("Mary"). The display - // name is also used to generate the initial icon associated with the user in AWS - // CodeStar projects. If spaces are included in the display name, the first - // character that appears after the space will be used as the second character in - // the user initial icon. The initial icon displays a maximum of two characters, so - // a display name with more than one space (for example "Mary Jane Major") would - // generate an initial icon using the first character and the first character after - // the space ("MJ", not "MM"). - DisplayName *string - - // The email address associated with the user. - EmailAddress *string - - // The SSH public key associated with the user in AWS CodeStar. If a project owner - // allows the user remote access to project resources, this public key will be used - // along with the user's private key for SSH access. - SshPublicKey *string - - // The Amazon Resource Name (ARN) of the user in IAM. - UserArn *string - - noSmithyDocumentSerde -} - -type noSmithyDocumentSerde = smithydocument.NoSerde diff --git a/service/codestar/validators.go b/service/codestar/validators.go deleted file mode 100644 index ce7f1f43e18..00000000000 --- a/service/codestar/validators.go +++ /dev/null @@ -1,825 +0,0 @@ -// Code generated by smithy-go-codegen DO NOT EDIT. - -package codestar - -import ( - "context" - "fmt" - "github.com/aws/aws-sdk-go-v2/service/codestar/types" - smithy "github.com/aws/smithy-go" - "github.com/aws/smithy-go/middleware" -) - -type validateOpAssociateTeamMember struct { -} - -func (*validateOpAssociateTeamMember) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpAssociateTeamMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*AssociateTeamMemberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpAssociateTeamMemberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateProject struct { -} - -func (*validateOpCreateProject) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateProjectInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateProjectInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpCreateUserProfile struct { -} - -func (*validateOpCreateUserProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpCreateUserProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*CreateUserProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpCreateUserProfileInput(input); err != nil { - return out, metadata, err - } - 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 validateOpDeleteUserProfile struct { -} - -func (*validateOpDeleteUserProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDeleteUserProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DeleteUserProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDeleteUserProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeProject struct { -} - -func (*validateOpDescribeProject) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeProjectInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeProjectInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDescribeUserProfile struct { -} - -func (*validateOpDescribeUserProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDescribeUserProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DescribeUserProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDescribeUserProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpDisassociateTeamMember struct { -} - -func (*validateOpDisassociateTeamMember) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpDisassociateTeamMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*DisassociateTeamMemberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpDisassociateTeamMemberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListResources struct { -} - -func (*validateOpListResources) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListResources) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListResourcesInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListResourcesInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTagsForProject struct { -} - -func (*validateOpListTagsForProject) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTagsForProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTagsForProjectInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTagsForProjectInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpListTeamMembers struct { -} - -func (*validateOpListTeamMembers) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpListTeamMembers) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*ListTeamMembersInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpListTeamMembersInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpTagProject struct { -} - -func (*validateOpTagProject) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpTagProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*TagProjectInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpTagProjectInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUntagProject struct { -} - -func (*validateOpUntagProject) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUntagProject) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UntagProjectInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUntagProjectInput(input); err != nil { - return out, metadata, err - } - 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 validateOpUpdateTeamMember struct { -} - -func (*validateOpUpdateTeamMember) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateTeamMember) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateTeamMemberInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateTeamMemberInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -type validateOpUpdateUserProfile struct { -} - -func (*validateOpUpdateUserProfile) ID() string { - return "OperationInputValidation" -} - -func (m *validateOpUpdateUserProfile) HandleInitialize(ctx context.Context, in middleware.InitializeInput, next middleware.InitializeHandler) ( - out middleware.InitializeOutput, metadata middleware.Metadata, err error, -) { - input, ok := in.Parameters.(*UpdateUserProfileInput) - if !ok { - return out, metadata, fmt.Errorf("unknown input parameters type %T", in.Parameters) - } - if err := validateOpUpdateUserProfileInput(input); err != nil { - return out, metadata, err - } - return next.HandleInitialize(ctx, in) -} - -func addOpAssociateTeamMemberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpAssociateTeamMember{}, middleware.After) -} - -func addOpCreateProjectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateProject{}, middleware.After) -} - -func addOpCreateUserProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpCreateUserProfile{}, middleware.After) -} - -func addOpDeleteProjectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteProject{}, middleware.After) -} - -func addOpDeleteUserProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDeleteUserProfile{}, middleware.After) -} - -func addOpDescribeProjectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeProject{}, middleware.After) -} - -func addOpDescribeUserProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDescribeUserProfile{}, middleware.After) -} - -func addOpDisassociateTeamMemberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpDisassociateTeamMember{}, middleware.After) -} - -func addOpListResourcesValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListResources{}, middleware.After) -} - -func addOpListTagsForProjectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTagsForProject{}, middleware.After) -} - -func addOpListTeamMembersValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpListTeamMembers{}, middleware.After) -} - -func addOpTagProjectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpTagProject{}, middleware.After) -} - -func addOpUntagProjectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUntagProject{}, middleware.After) -} - -func addOpUpdateProjectValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateProject{}, middleware.After) -} - -func addOpUpdateTeamMemberValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateTeamMember{}, middleware.After) -} - -func addOpUpdateUserProfileValidationMiddleware(stack *middleware.Stack) error { - return stack.Initialize.Add(&validateOpUpdateUserProfile{}, middleware.After) -} - -func validateCode(v *types.Code) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Code"} - if v.Source == nil { - invalidParams.Add(smithy.NewErrParamRequired("Source")) - } else if v.Source != nil { - if err := validateCodeSource(v.Source); err != nil { - invalidParams.AddNested("Source", err.(smithy.InvalidParamsError)) - } - } - if v.Destination == nil { - invalidParams.Add(smithy.NewErrParamRequired("Destination")) - } else if v.Destination != nil { - if err := validateCodeDestination(v.Destination); err != nil { - invalidParams.AddNested("Destination", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCodeCommitCodeDestination(v *types.CodeCommitCodeDestination) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CodeCommitCodeDestination"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCodeDestination(v *types.CodeDestination) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CodeDestination"} - if v.CodeCommit != nil { - if err := validateCodeCommitCodeDestination(v.CodeCommit); err != nil { - invalidParams.AddNested("CodeCommit", err.(smithy.InvalidParamsError)) - } - } - if v.GitHub != nil { - if err := validateGitHubCodeDestination(v.GitHub); err != nil { - invalidParams.AddNested("GitHub", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateCodeSource(v *types.CodeSource) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CodeSource"} - if v.S3 == nil { - invalidParams.Add(smithy.NewErrParamRequired("S3")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateGitHubCodeDestination(v *types.GitHubCodeDestination) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "GitHubCodeDestination"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.Type == nil { - invalidParams.Add(smithy.NewErrParamRequired("Type")) - } - if v.Owner == nil { - invalidParams.Add(smithy.NewErrParamRequired("Owner")) - } - if v.Token == nil { - invalidParams.Add(smithy.NewErrParamRequired("Token")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateSourceCode(v []types.Code) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "SourceCode"} - for i := range v { - if err := validateCode(&v[i]); err != nil { - invalidParams.AddNested(fmt.Sprintf("[%d]", i), err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateToolchain(v *types.Toolchain) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "Toolchain"} - if v.Source == nil { - invalidParams.Add(smithy.NewErrParamRequired("Source")) - } else if v.Source != nil { - if err := validateToolchainSource(v.Source); err != nil { - invalidParams.AddNested("Source", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateToolchainSource(v *types.ToolchainSource) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ToolchainSource"} - if v.S3 == nil { - invalidParams.Add(smithy.NewErrParamRequired("S3")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpAssociateTeamMemberInput(v *AssociateTeamMemberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "AssociateTeamMemberInput"} - if v.ProjectId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProjectId")) - } - if v.UserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserArn")) - } - if v.ProjectRole == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProjectRole")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateProjectInput(v *CreateProjectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateProjectInput"} - if v.Name == nil { - invalidParams.Add(smithy.NewErrParamRequired("Name")) - } - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.SourceCode != nil { - if err := validateSourceCode(v.SourceCode); err != nil { - invalidParams.AddNested("SourceCode", err.(smithy.InvalidParamsError)) - } - } - if v.Toolchain != nil { - if err := validateToolchain(v.Toolchain); err != nil { - invalidParams.AddNested("Toolchain", err.(smithy.InvalidParamsError)) - } - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpCreateUserProfileInput(v *CreateUserProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "CreateUserProfileInput"} - if v.UserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserArn")) - } - if v.DisplayName == nil { - invalidParams.Add(smithy.NewErrParamRequired("DisplayName")) - } - if v.EmailAddress == nil { - invalidParams.Add(smithy.NewErrParamRequired("EmailAddress")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteProjectInput(v *DeleteProjectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteProjectInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDeleteUserProfileInput(v *DeleteUserProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DeleteUserProfileInput"} - if v.UserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeProjectInput(v *DescribeProjectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeProjectInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDescribeUserProfileInput(v *DescribeUserProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DescribeUserProfileInput"} - if v.UserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpDisassociateTeamMemberInput(v *DisassociateTeamMemberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "DisassociateTeamMemberInput"} - if v.ProjectId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProjectId")) - } - if v.UserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListResourcesInput(v *ListResourcesInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListResourcesInput"} - if v.ProjectId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProjectId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTagsForProjectInput(v *ListTagsForProjectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTagsForProjectInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpListTeamMembersInput(v *ListTeamMembersInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "ListTeamMembersInput"} - if v.ProjectId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProjectId")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpTagProjectInput(v *TagProjectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "TagProjectInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.Tags == nil { - invalidParams.Add(smithy.NewErrParamRequired("Tags")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUntagProjectInput(v *UntagProjectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UntagProjectInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if v.Tags == nil { - invalidParams.Add(smithy.NewErrParamRequired("Tags")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateProjectInput(v *UpdateProjectInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateProjectInput"} - if v.Id == nil { - invalidParams.Add(smithy.NewErrParamRequired("Id")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateTeamMemberInput(v *UpdateTeamMemberInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateTeamMemberInput"} - if v.ProjectId == nil { - invalidParams.Add(smithy.NewErrParamRequired("ProjectId")) - } - if v.UserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} - -func validateOpUpdateUserProfileInput(v *UpdateUserProfileInput) error { - if v == nil { - return nil - } - invalidParams := smithy.InvalidParamsError{Context: "UpdateUserProfileInput"} - if v.UserArn == nil { - invalidParams.Add(smithy.NewErrParamRequired("UserArn")) - } - if invalidParams.Len() > 0 { - return invalidParams - } else { - return nil - } -} diff --git a/service/internal/integrationtest/codestar/smoke_test.go b/service/internal/integrationtest/codestar/smoke_test.go deleted file mode 100644 index 923575655e4..00000000000 --- a/service/internal/integrationtest/codestar/smoke_test.go +++ /dev/null @@ -1,31 +0,0 @@ -//go:build integration -// +build integration - -package codestar - -import ( - "context" - "testing" - "time" - - "github.com/aws/aws-sdk-go-v2/service/codestar" - - "github.com/aws/aws-sdk-go-v2/service/internal/integrationtest" -) - -func TestInteg_00_ListProjects(t *testing.T) { - ctx, cancelFn := context.WithTimeout(context.Background(), 5*time.Second) - defer cancelFn() - - cfg, err := integrationtest.LoadConfigWithDefaultRegion("us-west-2") - if err != nil { - t.Fatalf("failed to load config, %v", err) - } - - client := codestar.NewFromConfig(cfg) - params := &codestar.ListProjectsInput{} - _, err = client.ListProjects(ctx, params) - if err != nil { - t.Errorf("expect no error, got %v", err) - } -}